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
# vim:foldmethod=marker
# Date: 2025-01-26
# Description: Use one starship config for all shells
@ -8,10 +9,11 @@
# Modified from the Powerline Preset
"$schema" = 'https://starship.rs/config-schema.json'
palette = "catppuccin_mocha"
# {{{ format
format = """
$sudo\
$jobs\
$os\
$time\
@ -24,6 +26,7 @@ $git_branch\
$git_status\
[](fg:#FCA17D bg:#86BBD8)\
$custom\
$bun\
$c\
$cmake\
$cobol\
@ -76,7 +79,7 @@ $shell\
"""
# }}}
# {{{ TODO
# {{{ TODO:
#
# $buf\
# $nix_shell\
@ -92,7 +95,6 @@ $shell\
# $direnv\
# $env_var\
# $crystal\
# $custom\
# $sudo\
# $cmd_duration\
# $line_break\
@ -231,6 +233,39 @@ format = '[$all_status$ahead_behind ]($style)'
# }}}
# {{{ 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]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
@ -335,6 +370,30 @@ symbol = " "
style = "bg:#86BBD8 fg:#794427"
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"
# }}}
[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_process: { equals: "Lively" }
window_class: { regex: "HwndWrapper" }
# Ignore Quake-style consoles.
- window_process: { equals: "WindowsTerminal" }
window_class: { equals: "CASCADIA_HOSTING_WINDOW_CLASS" }
- commands: ["set-floating"]
match:
# Razer Synapse
@ -155,7 +157,25 @@ window_rules:
- window_process: { equals: "AutoHotkeyUX" }
- window_process: { equals: "ApplicationFrameHost" }
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:
# When enabled, the focused window can be resized via arrow keys or HJKL.
- name: "resize"