mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-02-22 21:05:14 +08:00
feat: adds basic skhd service for azalea
This commit is contained in:
parent
f3564284d7
commit
689b27c243
1 changed files with 87 additions and 0 deletions
87
modules/core/skhd.nix
Normal file
87
modules/core/skhd.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.skhd = {
|
||||||
|
enable = true;
|
||||||
|
skhdConfig = ''
|
||||||
|
shift + alt - 1: yabai -m window --space 1
|
||||||
|
shift + alt - 2: yabai -m window --space 2
|
||||||
|
shift + alt - 3: yabai -m window --space 3
|
||||||
|
shift + alt - 4: yabai -m window --space 4
|
||||||
|
shift + alt - 5: yabai -m window --space 5
|
||||||
|
shift + alt - 6: yabai -m window --space 6
|
||||||
|
shift + alt - 7: yabai -m window --space 7
|
||||||
|
shift + alt - 8: yabai -m window --space 8
|
||||||
|
shift + alt - 9: yabai -m window --space 9
|
||||||
|
shift + alt - 0: yabai -m window --space 10
|
||||||
|
|
||||||
|
# focus window
|
||||||
|
alt - h : yabai -m window --focus west
|
||||||
|
alt - j : yabai -m window --focus south
|
||||||
|
alt - k : yabai -m window --focus north
|
||||||
|
alt - l : yabai -m window --focus east
|
||||||
|
|
||||||
|
# move window
|
||||||
|
shift + alt - h : yabai -m window --warp west
|
||||||
|
shift + alt - j : yabai -m window --warp south
|
||||||
|
shift + alt - k : yabai -m window --warp north
|
||||||
|
shift + alt - l : yabai -m window --warp east
|
||||||
|
|
||||||
|
|
||||||
|
# Float / Unfloat window
|
||||||
|
alt - space : \
|
||||||
|
yabai -m window --toggle float; \
|
||||||
|
yabai -m window --toggle border
|
||||||
|
|
||||||
|
# cmd - d : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "stack" else "bsp" end')
|
||||||
|
cmd - return: open -a Kitty -n
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Linux-style word navigation and deletion
|
||||||
|
ctrl - backspace [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | alt - backspace # Other apps: delete word
|
||||||
|
]
|
||||||
|
|
||||||
|
ctrl - left [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | alt - left # Other apps: move word left
|
||||||
|
]
|
||||||
|
|
||||||
|
ctrl - right [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | alt - right # Other apps: move word right
|
||||||
|
]
|
||||||
|
|
||||||
|
# Home/End key behavior (with shift for selection)
|
||||||
|
home [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | cmd - left # Other apps: line start
|
||||||
|
]
|
||||||
|
|
||||||
|
shift - home [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | cmd + shift - left # Other apps: select to line start
|
||||||
|
]
|
||||||
|
|
||||||
|
# Ctrl+Home/End for document navigation
|
||||||
|
ctrl - home [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | cmd - up # Other apps: document start
|
||||||
|
]
|
||||||
|
|
||||||
|
ctrl - end [
|
||||||
|
@native_apps ~ # Terminal apps handle natively
|
||||||
|
* | cmd - down # Other apps: document end
|
||||||
|
]
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue