Update keyboard bindings, window rules, and add Alacritty config\n\n- Change menu binding from P to SPACE in keyboard.conf\n- Update focus movement shortcuts to use single letter commands (l, r, d, u)\n- Modify window rule for system update script to use class 'system'\n- Update waybar click action to use --class 'system' for proper window identification\n- Add new Alacritty terminal configuration with Dracula theme

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2025-12-14 14:14:35 +08:00
parent 40f3d0e845
commit c5ce7756fe
5 changed files with 96 additions and 8 deletions

11
alacritty/alacritty.toml Normal file
View File

@@ -0,0 +1,11 @@
[general]
import=[
"~/.config/alacritty/dracula.toml"
]
[window]
padding={x=5,y=5}
dynamic_padding=true
opacity=0.9
[font]
normal={family="Jetbrains Mono Nerd Font", style="Regular"}
size=14

76
alacritty/dracula.toml Normal file
View File

@@ -0,0 +1,76 @@
# Dracula theme for Alacritty
# https://draculatheme.com/alacritty
#
# Color palette
# https://spec.draculatheme.com
#
# Instructions
# https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd
[colors.primary]
background = "#282a36"
foreground = "#f8f8f2"
bright_foreground = "#ffffff"
[colors.cursor]
text = "#282a36"
cursor = "#f8f8f2"
[colors.vi_mode_cursor]
text = "CellBackground"
cursor = "CellForeground"
[colors.selection]
text = "CellForeground"
background = "#44475a"
[colors.normal]
black = "#21222c"
red = "#ff5555"
green = "#50fa7b"
yellow = "#f1fa8c"
blue = "#bd93f9"
magenta = "#ff79c6"
cyan = "#8be9fd"
white = "#f8f8f2"
[colors.bright]
black = "#6272a4"
red = "#ff6e6e"
green = "#69ff94"
yellow = "#ffffa5"
blue = "#d6acff"
magenta = "#ff92df"
cyan = "#a4ffff"
white = "#ffffff"
[colors.search.matches]
foreground = "#44475a"
background = "#50fa7b"
[colors.search.focused_match]
foreground = "#44475a"
background = "#ffb86c"
[colors.footer_bar]
background = "#282a36"
foreground = "#f8f8f2"
[colors.hints.start]
foreground = "#282a36"
background = "#f1fa8c"
[colors.hints.end]
foreground = "#f1fa8c"
background = "#282a36"

View File

@@ -19,15 +19,15 @@ bind = $mainMod SHIFT, Q, killactive,
bind = $mainMod SHIFT, C, exit, bind = $mainMod SHIFT, C, exit,
bind = $mainMod, E, exec, $fileManager bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating, bind = $mainMod, V, togglefloating,
bind = $mainMod, P, exec, $menu bind = $mainMod, SPACE, exec, $menu
bind = $mainMod SHIFT, P, pseudo, # dwindle bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod SHIFT, J, togglesplit, # dwindle bind = $mainMod SHIFT, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys # Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, left bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, right bind = $mainMod, l, movefocus, r
bind = $mainMod, j, movefocus, down bind = $mainMod, j, movefocus, d
bind = $mainMod, k, movefocus, up bind = $mainMod, k, movefocus, u
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1 bind = $mainMod, 1, workspace, 1

View File

@@ -5,7 +5,8 @@
# 文件对话框 # 文件对话框
windowrule = float, class:^(thunar|google-chrome|chromium)$, title:^(.*文件.*|.*保存.*|.*打开.*) windowrule = float, class:^(thunar|google-chrome|chromium)$, title:^(.*文件.*|.*保存.*|.*打开.*)
windowrule = float, class:^(Alacritty)$, title:^(alacritty -e \./system-update\.sh.*) # 更新系统
windowrule = float, class:^(Alacritty)$, title:^(.*system)
# Ignore maximize requests from apps. You'll probably like this. # Ignore maximize requests from apps. You'll probably like this.
windowrule = suppressevent maximize, class:.* windowrule = suppressevent maximize, class:.*

View File

@@ -15,7 +15,7 @@
// "justify": // "justify":
"min-length": 2, "min-length": 2,
"max-length": 2, "max-length": 2,
"on-click": "alacritty -e ~/.config/waybar/scripts/system-update.sh", "on-click": "alacritty --class 'system' -e ~/.config/waybar/scripts/system-update.sh",
// "on-click-middle": // "on-click-middle":
"on-click-right": "pkill -RTMIN+1 waybar" "on-click-right": "pkill -RTMIN+1 waybar"
// "on-update": // "on-update":