From 9f85a746dcf25be074a273eb68bd1dd2051ce622 Mon Sep 17 00:00:00 2001 From: js0ny Date: Thu, 20 Mar 2025 20:13:46 +0000 Subject: [PATCH] feat(starship, glzr): Add more rules --- common/starship.toml | 70 +++++++++++++++++++++++--- platforms/win/glzr/glazewm/config.yaml | 22 +++++++- 2 files changed, 83 insertions(+), 9 deletions(-) diff --git a/common/starship.toml b/common/starship.toml index 9f07121..02d4358 100644 --- a/common/starship.toml +++ b/common/starship.toml @@ -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)" diff --git a/platforms/win/glzr/glazewm/config.yaml b/platforms/win/glzr/glazewm/config.yaml index fa5909c..0e5eb84 100644 --- a/platforms/win/glzr/glazewm/config.yaml +++ b/platforms/win/glzr/glazewm/config.yaml @@ -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"