feat(starship, glzr): Add more rules

This commit is contained in:
js0ny 2025-03-20 20:13:46 +00:00
parent 972dfa8c5e
commit 9f85a746dc
2 changed files with 83 additions and 9 deletions

View file

@ -1,4 +1,5 @@
# $DOTFILES/common/starship.toml # $DOTFILES/common/starship.toml
# vim:foldmethod=marker
# Date: 2025-01-26 # Date: 2025-01-26
# Description: Use one starship config for all shells # Description: Use one starship config for all shells
@ -8,10 +9,11 @@
# Modified from the Powerline Preset # Modified from the Powerline Preset
"$schema" = 'https://starship.rs/config-schema.json' "$schema" = 'https://starship.rs/config-schema.json'
palette = "catppuccin_mocha"
# {{{ format # {{{ format
format = """ format = """
$sudo\
$jobs\ $jobs\
$os\ $os\
$time\ $time\
@ -24,6 +26,7 @@ $git_branch\
$git_status\ $git_status\
[](fg:#FCA17D bg:#86BBD8)\ [](fg:#FCA17D bg:#86BBD8)\
$custom\ $custom\
$bun\
$c\ $c\
$cmake\ $cmake\
$cobol\ $cobol\
@ -76,7 +79,7 @@ $shell\
""" """
# }}} # }}}
# {{{ TODO # {{{ TODO:
# #
# $buf\ # $buf\
# $nix_shell\ # $nix_shell\
@ -92,7 +95,6 @@ $shell\
# $direnv\ # $direnv\
# $env_var\ # $env_var\
# $crystal\ # $crystal\
# $custom\
# $sudo\ # $sudo\
# $cmd_duration\ # $cmd_duration\
# $line_break\ # $line_break\
@ -231,6 +233,39 @@ format = '[$all_status$ahead_behind ]($style)'
# }}} # }}}
# {{{ Part 4 # {{{ Part 4
[custom.just]
detect_files = ["Justfile", "justfile", ".Justfile", ".justfile"]
style = "bg:#86BBD8 fg:#794427"
format = "[ Just ]($style)"
[custom.dotenv]
detect_files = [
".env",
".env.local",
".env.development",
".env.test",
".env.production",
".env.staging",
]
style = "bg:#86BBD8 fg:#794427"
format = "[  ]($style)"
[custom.tex]
detect_extensions = ["tex", "bib"]
style = "bg:#86BBD8 fg:#794427"
format = "[  ]($style)"
[custom.readme]
detect_files = [
"README.md",
"readme.md",
"README",
"readme",
"README.org",
"readme.org",
]
style = "bg:#86BBD8 fg:#794427"
format = "[ 󰂺 ]($style)"
[c] [c]
symbol = " " symbol = " "
style = "bg:#86BBD8 fg:#794427" style = "bg:#86BBD8 fg:#794427"
@ -335,6 +370,30 @@ symbol = " "
style = "bg:#86BBD8 fg:#794427" style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)' format = '[ $symbol ($version) ]($style)'
[ruby]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[bun]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[typst]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[zig]
symbol = "↯ "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[kotlin]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
# }}} # }}}
@ -394,8 +453,3 @@ mantle = "#181825"
crust = "#11111b" crust = "#11111b"
# }}} # }}}
[custom.just]
detect_files = ["Justfile", "justfile", ".Justfile", ".justfile"]
style = "bg:#86BBD8 fg:#794427"
format = "[Just]($style)"

View file

@ -146,7 +146,9 @@ window_rules:
window_title: { regex: ".*? - Peek" } window_title: { regex: ".*? - Peek" }
- window_process: { equals: "Lively" } - window_process: { equals: "Lively" }
window_class: { regex: "HwndWrapper" } window_class: { regex: "HwndWrapper" }
# Ignore Quake-style consoles.
- window_process: { equals: "WindowsTerminal" } - window_process: { equals: "WindowsTerminal" }
window_class: { equals: "CASCADIA_HOSTING_WINDOW_CLASS" }
- commands: ["set-floating"] - commands: ["set-floating"]
match: match:
# Razer Synapse # Razer Synapse
@ -155,7 +157,25 @@ window_rules:
- window_process: { equals: "AutoHotkeyUX" } - window_process: { equals: "AutoHotkeyUX" }
- window_process: { equals: "ApplicationFrameHost" } - window_process: { equals: "ApplicationFrameHost" }
window_title: { regex: "Settings|设置" } window_title: { regex: "Settings|设置" }
- window_process: { equals: "QQ" }
window_title: { equals: "图片查看器" }
# 微信图片视图
- window_process: { equals: "WeChat" }
window_class: { equals: "ImagePreviewWnd" }
# 微信朋友圈视图
- window_process: { equals: "WeChat" }
window_class: { equals: "SnsWnd" }
- window_process: { equals: "setup" }
window_title: { equals: "Visual Studio Installer" }
# JetBrains IDEs Floating Dialogs
- window_class: { equals: "SunAwtDialog" }
window_process:
{ regex: "rider64|idea64|goland64|rustrover64|clion64|pycharm64" }
## Browser
- window_process: { equals: "vivaldi" }
window_title: { regex: "^Vivaldi 设置.*$" }
- window_process: { equals: "vivaldi" }
window_title: { regex: "^Bitwarden - Vivaldi$" }
binding_modes: binding_modes:
# When enabled, the focused window can be resized via arrow keys or HJKL. # When enabled, the focused window can be resized via arrow keys or HJKL.
- name: "resize" - name: "resize"