mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
sync from Linux
This commit is contained in:
parent
8bb2d9fbe8
commit
2a0fd9b83f
16 changed files with 317 additions and 617 deletions
61
platforms/linux/fastfetch.jsonc
Normal file
61
platforms/linux/fastfetch.jsonc
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// ~/.config/fastfetch/config.jsonc
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
// "type": "auto",
|
||||
"source": "arch_small",
|
||||
"padding": {
|
||||
"top": 2,
|
||||
"left": 1,
|
||||
"right": 2
|
||||
}
|
||||
},
|
||||
"general": {
|
||||
"multithreading": true
|
||||
},
|
||||
"display": {
|
||||
"separator": " ",
|
||||
"key": {
|
||||
"width": 10,
|
||||
"paddingLeft": 2,
|
||||
"type": "icon"
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "title",
|
||||
"format": "{#1}───────────── {#}{user-name-colored}@{host-name-colored}"
|
||||
},
|
||||
{
|
||||
"type": "colors",
|
||||
"symbol": "diamond",
|
||||
"paddingLeft": 15
|
||||
},
|
||||
"os",
|
||||
// "host",
|
||||
// "kernel",
|
||||
// "uptime",
|
||||
{
|
||||
"type": "packages"
|
||||
},
|
||||
"shell",
|
||||
"display",
|
||||
// "de",
|
||||
// "wm",
|
||||
// "wmtheme",
|
||||
// "theme",
|
||||
// "icons",
|
||||
// "font",
|
||||
// "cursor",
|
||||
"terminal",
|
||||
// "terminalfont",
|
||||
"cpu",
|
||||
"gpu",
|
||||
"memory",
|
||||
// "swap",
|
||||
"disk",
|
||||
// "battery",
|
||||
"poweradapter",
|
||||
"locale"
|
||||
]
|
||||
}
|
||||
|
|
@ -8,5 +8,7 @@
|
|||
# Linking:
|
||||
# ln -sf $DOTFILES/platforms/linux/hyprland/code-flags.conf ~/.config/
|
||||
|
||||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
||||
# --enable-features=UseOzonePlatform
|
||||
# --ozone-platform=wayland
|
||||
--ozone-platform-hint=x11
|
||||
# --enable-wayland-ime
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
# Linking:
|
||||
# ln -sf $DOTFILES/platforms/linux/hyprland/electron-flags.conf ~/.config/
|
||||
|
||||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
||||
--enable-icd
|
||||
# --enable-features=UseOzonePlatform
|
||||
# --ozone-platform=wayland
|
||||
# --enable-icd
|
||||
# --enable-wayland-ime
|
||||
--ozone-platform-hint=x11
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ $menu = wofi --show drun
|
|||
|
||||
# exec-once = $terminal
|
||||
# exec-once = nm-applet &
|
||||
exec-once = waybar & hyprpaper & mako & systemctl --user start hyprpolkitagent
|
||||
exec-once = waybar & hyprpaper & mako & systemctl --user start hyprpolkitagent & fcitx5
|
||||
|
||||
|
||||
#############################
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ $DOTFILES = "$HOME/.dotfiles"
|
|||
|
||||
### Load Configs ###
|
||||
|
||||
Get-ChildItem -Path $DOTFILES/powershell -Filter *.ps1 | ForEach-Object {. $_}
|
||||
Get-ChildItem -Path $DOTFILES/powershell_private -Filter *.ps1 | ForEach-Object {. $_}
|
||||
Get-ChildItem -Path $(Join-Path $DOTFILES "tools" "powershell") -Filter *.ps1 | ForEach-Object {. $_}
|
||||
|
||||
## Aliases ###
|
||||
|
||||
|
|
|
|||
43
scripts/Rename-FilesWithZeroPadding.ps1
Normal file
43
scripts/Rename-FilesWithZeroPadding.ps1
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
Rename files with a specified extension in a folder, padding the numeric part with zeros.
|
||||
.PARAMETER ext
|
||||
The extension of the files to rename, without the dot. Default is "md".
|
||||
.PARAMETER Numeral
|
||||
If specified, the files will be renamed in the order of their numeric part.
|
||||
.EXAMPLE
|
||||
Rename-FilesWithZeroPadding.ps1 -ext "txt"
|
||||
Renames all files with the extension "txt" in the current folder, padding the numeric part with zeros.
|
||||
For example: '1.txt', '2.txt', ... '12.txt' -> '01.txt', '02.txt', ... '12.txt'.
|
||||
.EXAMPLE
|
||||
Rename-FilesWithZeroPadding.ps1 -Numeral # This set the Numeral switch to false
|
||||
Renames all files with the default extension "md" in the current folder, in the order of their filenames.
|
||||
For example: 'file1.md', 'file2.md', ... 'file12.md' -> '01.md', '02.md', ... '12.md'.
|
||||
#>
|
||||
param(
|
||||
[string]$ext = "md",
|
||||
[switch]$Numeral
|
||||
)
|
||||
if ($Numeral) {
|
||||
$files = $files | Sort-Object { [int]($_.BaseName -replace '\D', '') }
|
||||
}
|
||||
else {
|
||||
$files = Get-ChildItem -Filter "*.$ext" | Sort-Object Name
|
||||
$fnamecnt = 1
|
||||
}
|
||||
$cnt = $files.Count
|
||||
|
||||
$paddingLength = $cnt.ToString().Length
|
||||
|
||||
foreach ($file in $files) {
|
||||
if ($Numeral) {
|
||||
$number = [int]($file.BaseName -replace '\D', '')
|
||||
$newNumber = $number.ToString().PadLeft($paddingLength, '0')
|
||||
$newName = "$newNumber.$ext"
|
||||
}
|
||||
else {
|
||||
$newName = ($fnamecnt++).ToString().PadLeft($paddingLength, '0') + ".$ext"
|
||||
}
|
||||
|
||||
Rename-Item -Path $file.FullName -NewName $newName
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
[colors.primary]
|
||||
background = "#303446"
|
||||
foreground = "#c6d0f5"
|
||||
dim_foreground = "#838ba7"
|
||||
bright_foreground = "#c6d0f5"
|
||||
|
||||
[colors.cursor]
|
||||
text = "#303446"
|
||||
cursor = "#f2d5cf"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
text = "#303446"
|
||||
cursor = "#babbf1"
|
||||
|
||||
[colors.search.matches]
|
||||
foreground = "#303446"
|
||||
background = "#a5adce"
|
||||
|
||||
[colors.search.focused_match]
|
||||
foreground = "#303446"
|
||||
background = "#a6d189"
|
||||
|
||||
[colors.footer_bar]
|
||||
foreground = "#303446"
|
||||
background = "#a5adce"
|
||||
|
||||
[colors.hints.start]
|
||||
foreground = "#303446"
|
||||
background = "#e5c890"
|
||||
|
||||
[colors.hints.end]
|
||||
foreground = "#303446"
|
||||
background = "#a5adce"
|
||||
|
||||
[colors.selection]
|
||||
text = "#303446"
|
||||
background = "#f2d5cf"
|
||||
|
||||
[colors.normal]
|
||||
black = "#51576d"
|
||||
red = "#e78284"
|
||||
green = "#a6d189"
|
||||
yellow = "#e5c890"
|
||||
blue = "#8caaee"
|
||||
magenta = "#f4b8e4"
|
||||
cyan = "#81c8be"
|
||||
white = "#b5bfe2"
|
||||
|
||||
[colors.bright]
|
||||
black = "#626880"
|
||||
red = "#e78284"
|
||||
green = "#a6d189"
|
||||
yellow = "#e5c890"
|
||||
blue = "#8caaee"
|
||||
magenta = "#f4b8e4"
|
||||
cyan = "#81c8be"
|
||||
white = "#a5adce"
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 16
|
||||
color = "#ef9f76"
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 17
|
||||
color = "#f2d5cf"
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Win11Light.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style
|
||||
x:Key="ItemBulletSelectedStyle"
|
||||
BasedOn="{StaticResource ItemBulletSelectedStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#ca9ee6" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource ItemGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#a5adce" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource QueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#c6d0f5" />
|
||||
<Setter Property="CaretBrush" Value="#c6d0f5" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource QuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#a5adce" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource WindowBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#414559" />
|
||||
<Setter Property="Background" Value="#303446" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource ItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b5bfe2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource ItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#a5adce" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource SeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#626880" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource ItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c6d0f5" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource ItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b5bfe2" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#414559</SolidColorBrush>
|
||||
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource ThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border
|
||||
Background="#414559"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource SearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#949cbb" />
|
||||
</Style>
|
||||
<Style x:Key="SearchIconPosition" BasedOn="{StaticResource SearchIconPosition}" TargetType="{x:Type Canvas}">
|
||||
<Setter Property="Background" Value="#303446" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#737994" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ca9ee6" />
|
||||
</Style>
|
||||
<Style x:Key="ItemGlyphSelectedStyle" BasedOn="{StaticResource ItemGlyphSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c6d0f5" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource ClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#a5adce" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource DateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#a5adce" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource PreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#303446" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource PreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8caaee" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource PreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#51576d" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource PreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8caaee" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -52,6 +52,34 @@ const colemak = {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const vforward = {
|
||||
add: function (key) { // 转发即将被 unmap 的键
|
||||
return api.vmap(`vfor${key}`, key)
|
||||
},
|
||||
cancel: function (key) { // 删除转发生成的键
|
||||
api.vunmap(`vfor${key}`)
|
||||
api.vunmap(key)
|
||||
},
|
||||
use: function (key) {
|
||||
return `vfor${key}`
|
||||
}
|
||||
}
|
||||
|
||||
const vcolemak = {
|
||||
forward: function (key) { // 转发即将被 unmap 的键
|
||||
api.vmap(key, `vcol${key}`)
|
||||
api.vunmap(`vcol${key}`)
|
||||
|
||||
},
|
||||
use: function (key) {
|
||||
return `vcol${key}`
|
||||
},
|
||||
map: function (a, b) {
|
||||
api.vmap(vcolemak.use(a), vforward.use(b))
|
||||
}
|
||||
}
|
||||
|
||||
const forwardFactory = {
|
||||
push: function (mapLists) { // forward original keys
|
||||
for (let key in mapLists) {
|
||||
|
|
@ -72,6 +100,35 @@ const forwardFactory = {
|
|||
}
|
||||
}
|
||||
}
|
||||
const vforwardFactory = {
|
||||
push: function (mapLists) { // forward original keys
|
||||
for (let key in mapLists) {
|
||||
vforward.add(mapLists[key])
|
||||
}
|
||||
},
|
||||
map: function (mapLists) {
|
||||
for (let key in mapLists) {
|
||||
vcolemak.map(key, mapLists[key])
|
||||
}
|
||||
},
|
||||
pull: function (mapLists) {
|
||||
for (let key in mapLists) {
|
||||
vforward.cancel(mapLists[key])
|
||||
}
|
||||
for (let key in mapLists) {
|
||||
vcolemak.forward(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const parseSearchResponse = function (response) {
|
||||
const res = JSON.parse(response.text);
|
||||
return res.map(r => r.phrase);
|
||||
};
|
||||
|
||||
const _addSearchAlias = function (alias, name, searchUrl, searchPrefix = 's', acUrl = "https://duckduckgo.com/ac/?q=", parseResponse = parseSearchResponse) {
|
||||
api.addSearchAlias(alias, name, searchUrl, searchPrefix, acUrl, parseResponse);
|
||||
}
|
||||
// #endregion
|
||||
// #region Keymap
|
||||
const mapLists = {
|
||||
|
|
@ -124,6 +181,9 @@ const vmapLists = {
|
|||
|
||||
forwardFactory.push(mapLists)
|
||||
forwardFactory.map(mapLists)
|
||||
|
||||
vforwardFactory.push(vmapLists)
|
||||
vforwardFactory.map(vmapLists)
|
||||
// 鼠标点击
|
||||
api.unmap('gi')
|
||||
api.unmap('[[')
|
||||
|
|
@ -138,30 +198,32 @@ forwardFactory.pull(mapLists)
|
|||
|
||||
|
||||
// #region Search Alias
|
||||
api.addSearchAlias('f', 'Felo', 'https://felo.ai/search?q=', 's', 'https://duckduckgo.com/ac/?q=', function (response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function (r) {
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('p', 'Perplexity', 'https://www.perplexity.ai/?q=', 's', 'https://duckduckgo.com/ac/?q=', function (response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function (r) {
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('r', 'Raindrop', 'https://app.raindrop.io/my/0/', 's', 'https://duckduckgo.com/ac/?q=', function (response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function (r) {
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('c', 'ChatGPT', 'https://chatgpt.com/?q=', 's', 'https://duckduckgo.com/ac/?q=', function (response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function (r) {
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.unmap('os') // StackOverflow
|
||||
api.vunmap('ss')
|
||||
api.unmap('ob') // Baidu
|
||||
api.vunmap('sb')
|
||||
api.unmap('og') // Google
|
||||
api.vunmap('sg')
|
||||
api.unmap('od') // DuckDuckGo
|
||||
api.vunmap('sd')
|
||||
|
||||
/// Common
|
||||
_addSearchAlias('dd', 'DuckDuckGo', 'https://duckduckgo.com/?q=')
|
||||
_addSearchAlias('gg', 'Google', 'https://www.google.com/search?q=')
|
||||
_addSearchAlias('bd', 'Baidu', 'https://www.baidu.com/s?wd=')
|
||||
_addSearchAlias('bi', 'Bing', 'https://www.bing.com/search?q=')
|
||||
/// AI Search
|
||||
_addSearchAlias('fe', 'Felo', 'https://felo.ai/search?q=')
|
||||
_addSearchAlias('pp', 'Perplexity', 'https://www.perplexity.ai/?q=')
|
||||
_addSearchAlias('cg', 'ChatGPT', 'https://chat.openai.com/?q=')
|
||||
/// EECS Related
|
||||
_addSearchAlias('gh', 'GitHub', 'https://github.com/search?type=repositories&q=')
|
||||
_addSearchAlias('so', 'StackOverflow', 'https://stackoverflow.com/search?q=')
|
||||
_addSearchAlias('aw', 'ArchWiki', 'https://wiki.archlinux.org/index.php?search=')
|
||||
/// Software
|
||||
_addSearchAlias('sc', 'Scoop', 'https://scoop.sh/#/apps?q=')
|
||||
_addSearchAlias('br', 'Brew', 'https://duckduckgo.com/?q=!brew ')
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Site-specific
|
||||
|
|
@ -184,10 +246,10 @@ api.mapkey('S', 'Start/Stop Generating', function () {
|
|||
var btn = document.querySelector('button.h-8:nth-child(2)');
|
||||
btn.click();
|
||||
}, { domain: /chatgpt.com/ });
|
||||
//api.mapkey('tm', 'Toggle Model', function () {
|
||||
// var btn = document.querySelector('#radix -\: r2i\:');
|
||||
// btn.click();
|
||||
//}, { domain: /chatgpt.com/ });
|
||||
|
||||
// perplexity.ai
|
||||
api.unmap('<Ctrl-i>', /perplexity.ai/);
|
||||
|
||||
|
||||
// #endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -135,3 +135,10 @@ if status is-interactive
|
|||
set IPYTHONDIR $XDG_CONFIG_HOME/ipython
|
||||
end
|
||||
end
|
||||
|
||||
# Coursier: Scala dependency manager
|
||||
if command -v coursier > /dev/null
|
||||
set -gx PATH "$PATH:/home/js0ny/.local/share/coursier/bin"
|
||||
end
|
||||
|
||||
test -d /opt/miniconda3 && source /opt/miniconda3/etc/fish/conf.d/conda.fish
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
# ln -sf $DOTFILES/tools/fish ~/.config/fish
|
||||
|
||||
if command -v starship > /dev/null
|
||||
set -gx STARSHIP_CONFIG $DOTFILES/tools/starship/starship_fish.toml
|
||||
set STARSHIP_CONFIG "~/.dotfiles/tools/starship/starship_fish.toml"
|
||||
starship init fish | source
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,3 +21,7 @@ if status is-interactive
|
|||
# Default / Fallback case
|
||||
end
|
||||
end
|
||||
|
||||
# bun
|
||||
set --export BUN_INSTALL "$HOME/.bun"
|
||||
set --export PATH $BUN_INSTALL/bin $PATH
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Use starship to set prompt
|
||||
$ENV:STARSHIP_CONFIG = Join-Path $DOTFILES "tools" "starship" "starship_pwsh.toml"
|
||||
|
||||
# Invoke-Expression (&starship init powershell)
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
# Below is the backup of original prompt function
|
||||
# $promptTime = $true
|
||||
|
|
|
|||
|
|
@ -1,202 +0,0 @@
|
|||
# starship.toml
|
||||
# ~/.config/starship.toml
|
||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||
|
||||
add_newline = true
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
format = '[\[$time\]](purple)'
|
||||
time_format = '%H:%M'
|
||||
|
||||
[username]
|
||||
format = '[$user](bold)'
|
||||
show_always = true
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
ssh_symbol = ' '
|
||||
|
||||
[directory]
|
||||
truncation_length = 2
|
||||
truncate_to_repo = true
|
||||
read_only = " "
|
||||
style ="bold cyan"
|
||||
truncation_symbol = ".../"
|
||||
|
||||
[directory.substitutions]
|
||||
"~/Documents" = " "
|
||||
"~/Downloads" = " "
|
||||
"~/Music" = " "
|
||||
"~/Pictures" = " "
|
||||
"Source" = " "
|
||||
"src" = " "
|
||||
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[buf]
|
||||
symbol = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[crystal]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[fennel]
|
||||
symbol = " "
|
||||
|
||||
[fossil_branch]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = ' '
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[guix_shell]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[haxe]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[kotlin]
|
||||
symbol = " "
|
||||
|
||||
[lua]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[ocaml]
|
||||
symbol = " "
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
AlmaLinux = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Kali = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
RockyLinux = " "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Void = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[pijul_channel]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[rlang]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = " "
|
||||
|
||||
[zig]
|
||||
symbol = " "
|
||||
|
||||
[gradle]
|
||||
symbol = " "
|
||||
|
|
@ -1,208 +1,144 @@
|
|||
# starship.toml
|
||||
# ~/.config/starship.toml
|
||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||
continuation_prompt = "[r % ](bold cyan) " # Doesn't work in fish
|
||||
format = """
|
||||
[](#9A348E)\
|
||||
$os\
|
||||
$username\
|
||||
[](bg:#DA627D fg:#9A348E)\
|
||||
$directory\
|
||||
[](fg:#DA627D bg:#FCA17D)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:#FCA17D bg:#86BBD8)\
|
||||
$c\
|
||||
$elixir\
|
||||
$elm\
|
||||
$golang\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$java\
|
||||
$julia\
|
||||
$nodejs\
|
||||
$nim\
|
||||
$rust\
|
||||
$scala\
|
||||
[](fg:#86BBD8 bg:#06969A)\
|
||||
$docker_context\
|
||||
[](fg:#06969A bg:#33658A)\
|
||||
$time\
|
||||
[ ](fg:#33658A)\
|
||||
"""
|
||||
|
||||
add_newline = true
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
format = '[\[$time\]](purple)'
|
||||
time_format = '%H:%M'
|
||||
# Disable the blank line at the start of the prompt
|
||||
# add_newline = false
|
||||
|
||||
# You can also replace your username with a neat symbol like or disable this
|
||||
# and use the os module below
|
||||
[username]
|
||||
format = '[$user](bold)'
|
||||
show_always = true
|
||||
style_user = "bg:#9A348E"
|
||||
style_root = "bg:#9A348E"
|
||||
format = '[$user ]($style)'
|
||||
disabled = false
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
ssh_symbol = ' '
|
||||
|
||||
[character]
|
||||
success_symbol = "[ >](bold green)"
|
||||
error_symbol = "[ >](bold red)"
|
||||
vimcmd_symbol = "[ <](bold green)"
|
||||
# An alternative to the username module which displays a symbol that
|
||||
# represents the current operating system
|
||||
[os]
|
||||
style = "bg:#9A348E"
|
||||
disabled = true # Disabled by default
|
||||
|
||||
[directory]
|
||||
truncation_length = 2
|
||||
truncate_to_repo = true
|
||||
read_only = " "
|
||||
style = "bold cyan"
|
||||
truncation_symbol = ".../"
|
||||
style = "bg:#DA627D"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
# Here is how you can shorten some long paths by text replacement
|
||||
# similar to mapped_locations in Oh My Posh:
|
||||
[directory.substitutions]
|
||||
"~/Documents" = " "
|
||||
"~/Downloads" = " "
|
||||
"~/Music" = " "
|
||||
"~/Pictures" = " "
|
||||
"Source" = " "
|
||||
"src" = " "
|
||||
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[buf]
|
||||
symbol = " "
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
# Keep in mind that the order matters. For example:
|
||||
# "Important Documents" = " "
|
||||
# will not be replaced, because "Documents" was already substituted before.
|
||||
# So either put "Important Documents" before "Documents" or use the substituted version:
|
||||
# "Important " = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[crystal]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
style = "bg:#06969A"
|
||||
format = '[ $symbol $context ]($style)'
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[fennel]
|
||||
symbol = " "
|
||||
|
||||
[fossil_branch]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
symbol = ""
|
||||
style = "bg:#FCA17D"
|
||||
format = '[ $symbol $branch ]($style)'
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = ' '
|
||||
[git_status]
|
||||
style = "bg:#FCA17D"
|
||||
format = '[$all_status$ahead_behind ]($style)'
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[guix_shell]
|
||||
symbol = " "
|
||||
[gradle]
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[haxe]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[kotlin]
|
||||
symbol = " "
|
||||
|
||||
[lua]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = " "
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[ocaml]
|
||||
symbol = " "
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
AlmaLinux = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Kali = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
RockyLinux = " "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Void = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[pijul_channel]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[rlang]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[swift]
|
||||
symbol = " "
|
||||
|
||||
[zig]
|
||||
symbol = " "
|
||||
|
||||
[gradle]
|
||||
symbol = " "
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%R" # Hour:Minute Format
|
||||
style = "bg:#33658A"
|
||||
format = '[ ♥ $time ]($style)'
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
# Author: js0ny
|
||||
# Sourced by user's zshrc 在用户的 zshrc 中被引用
|
||||
|
||||
export STARSHIP_CONFIG=$DOTFILES/tools/starship/starship_zsh.toml
|
||||
# export STARSHIP_CONFIG=$DOTFILES/tools/starship/starship_zsh.toml
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue