Compare commits
14 commits
ff341930c9
...
786c090767
Author | SHA1 | Date | |
---|---|---|---|
786c090767 | |||
cfcba50437 | |||
acd5cc0ee3 | |||
9671be0468 | |||
1c024b8559 | |||
b1ac30ba40 | |||
f8081aebc7 | |||
ba5a97852e | |||
1196fdb95b | |||
6cde225c08 | |||
a691050bc4 | |||
c3e79d8926 | |||
e89a712c9a | |||
b057b79671 |
16 changed files with 492 additions and 387 deletions
|
@ -29,7 +29,7 @@ in {
|
||||||
ultrawide = mkOption {default = cfg.width * 9 / 16 > cfg.height;}; # Wider than 16:9
|
ultrawide = mkOption {default = cfg.width * 9 / 16 > cfg.height;}; # Wider than 16:9
|
||||||
hidpi = mkOption {default = cfg.scale > 1;};
|
hidpi = mkOption {default = cfg.scale > 1;};
|
||||||
scale = mkOption {default = 1;};
|
scale = mkOption {default = 1;};
|
||||||
border = mkOption {default = 2;};
|
border = mkOption {default = 3;};
|
||||||
gap = mkOption {default = 10;};
|
gap = mkOption {default = 10;};
|
||||||
padding = mkOption {default = 51;}; # ?? journalctl --user -u waybar.service | grep height:
|
padding = mkOption {default = 51;}; # ?? journalctl --user -u waybar.service | grep height:
|
||||||
rounding = mkOption {default = 15;};
|
rounding = mkOption {default = 15;};
|
||||||
|
|
|
@ -17,9 +17,6 @@ with lib; let
|
||||||
hyprlock = getExe hm.programs.hyprlock.package;
|
hyprlock = getExe hm.programs.hyprlock.package;
|
||||||
hyprpicker = getExe pkgs.hyprpicker;
|
hyprpicker = getExe pkgs.hyprpicker;
|
||||||
inhibit = hm.home.file.".local/bin/inhibit".source;
|
inhibit = hm.home.file.".local/bin/inhibit".source;
|
||||||
jq = getExe pkgs.jq;
|
|
||||||
kill = getExe' pkgs.procps "kill";
|
|
||||||
kitty = getExe hm.programs.kitty.package;
|
|
||||||
left = hm.home.file.".local/bin/left".source;
|
left = hm.home.file.".local/bin/left".source;
|
||||||
loginctl = getExe' pkgs.systemd "loginctl";
|
loginctl = getExe' pkgs.systemd "loginctl";
|
||||||
nautilus = getExe pkgs.nautilus;
|
nautilus = getExe pkgs.nautilus;
|
||||||
|
@ -34,227 +31,246 @@ with lib; let
|
||||||
steam = getExe config.programs.steam.package;
|
steam = getExe config.programs.steam.package;
|
||||||
swayosd-client = getExe' pkgs.swayosd "swayosd-client";
|
swayosd-client = getExe' pkgs.swayosd "swayosd-client";
|
||||||
toggle = hm.home.file.".local/bin/toggle".source;
|
toggle = hm.home.file.".local/bin/toggle".source;
|
||||||
|
uwsm = getExe pkgs.uwsm;
|
||||||
virt-manager = getExe config.programs.virt-manager.package;
|
virt-manager = getExe config.programs.virt-manager.package;
|
||||||
vrr = hm.home.file.".local/bin/vrr".source;
|
vrr = hm.home.file.".local/bin/vrr".source;
|
||||||
waydroid = getExe pkgs.waydroid;
|
waydroid = getExe pkgs.waydroid;
|
||||||
window = hm.home.file.".local/bin/window".source;
|
window = hm.home.file.".local/bin/window".source;
|
||||||
zoom = hm.home.file.".local/bin/zoom".source;
|
zoom = hm.home.file.".local/bin/zoom".source;
|
||||||
|
|
||||||
|
command = command: "${uwsm} app -- ${command}";
|
||||||
in {
|
in {
|
||||||
options.custom.desktops.hyprland.binds.enable = mkOption {default = false;};
|
options.custom.desktops.hyprland.binds = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${config.custom.username} = {
|
home-manager.sharedModules = [
|
||||||
wayland.windowManager.hyprland.settings = let
|
{
|
||||||
# Reverse mods and key for alphabetical sorting
|
wayland.windowManager.hyprland.settings = let
|
||||||
#?? key <"KEY"> <"MODS"|null> <"DISPATCHER"> <"PARAMS"|null>
|
# Reverse mods and key for alphabetical sorting
|
||||||
key = key: mods: dispatcher: params: "${
|
#?? key <"KEY"> <"MODS"|null> <"DISPATCHER"> <"PARAMS"|null>
|
||||||
if (isNull mods)
|
key = key: mods: dispatcher: params: "${
|
||||||
then ""
|
if (isNull mods)
|
||||||
else mods
|
then ""
|
||||||
}, ${key}, ${dispatcher}${
|
else mods
|
||||||
if (isNull params)
|
}, ${key}, ${dispatcher}${
|
||||||
then ""
|
if (isNull params)
|
||||||
else ", ${params}"
|
then ""
|
||||||
}";
|
else ", ${
|
||||||
|
if dispatcher == "exec"
|
||||||
|
then command params
|
||||||
|
else params
|
||||||
|
}"
|
||||||
|
}";
|
||||||
|
|
||||||
dropdown = concatStringsSep " " [
|
dropdown = concatStringsSep " " [
|
||||||
"${toggle}"
|
"${toggle}"
|
||||||
"--focus"
|
"--focus"
|
||||||
"--type class"
|
"--type class"
|
||||||
"--expression '^dropdown$'"
|
"--expression '^.*dropdown$'"
|
||||||
"--workspace special:dropdown"
|
"--workspace special:dropdown"
|
||||||
"--"
|
"--"
|
||||||
"${ghostty} --class=dropdown"
|
|
||||||
];
|
|
||||||
|
|
||||||
pip-switch = with config.custom;
|
#!! Must be valid GTK class
|
||||||
concatStringsSep " " [
|
# https://github.com/ghostty-org/ghostty/issues/3336
|
||||||
"${window} move"
|
"${ghostty} --class=gtk.dropdown"
|
||||||
"--current"
|
|
||||||
"--property title"
|
|
||||||
"'^Picture.in.[Pp]icture$'"
|
|
||||||
"${toString (gap + border)},${toString (gap + border)}"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
pip-toggle = concatStringsSep " " [
|
pip-switch = with config.custom;
|
||||||
"${toggle}"
|
concatStringsSep " " [
|
||||||
"--type title"
|
"${window} move"
|
||||||
"--expression '^Picture.in.[Pp]icture$'"
|
"--current"
|
||||||
"--workspace special:pip"
|
"--property title"
|
||||||
];
|
"'^Picture.in.[Pp]icture$'"
|
||||||
|
"${toString (gap + border)},${toString (gap + border)}"
|
||||||
|
];
|
||||||
|
|
||||||
vm = ''${remote} --vm --client xfreerdp --username Myned --password "$(${cat} ${config.age.secrets."desktop/vm/myndows.pass".path})" ${
|
pip-toggle = concatStringsSep " " [
|
||||||
if config.custom.hidpi
|
"${toggle}"
|
||||||
then "--scale 140"
|
"--type title"
|
||||||
else ""
|
"--expression '^Picture.in.[Pp]icture$'"
|
||||||
} myndows'';
|
"--workspace special:pip"
|
||||||
in {
|
];
|
||||||
# https://wiki.hyprland.org/Configuring/Binds
|
|
||||||
#?? bind = MODS, KEY, DISPATCHER, [PARAMS]
|
|
||||||
#?? wev
|
|
||||||
|
|
||||||
# Regular binds
|
vm = ''${remote} --vm --client xfreerdp --username Myned --password "$(${cat} ${config.age.secrets."desktop/vm/myndows.pass".path})" ${
|
||||||
bind = [];
|
if config.custom.hidpi
|
||||||
|
then "--scale 140"
|
||||||
|
else ""
|
||||||
|
} myndows'';
|
||||||
|
in {
|
||||||
|
# https://wiki.hyprland.org/Configuring/Binds
|
||||||
|
#?? bind = MODS, KEY, DISPATCHER, [PARAMS]
|
||||||
|
#?? wev
|
||||||
|
|
||||||
# Repeat binds
|
# Regular binds
|
||||||
binde = [
|
bind = [];
|
||||||
# Media keys
|
|
||||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
|
||||||
(key "XF86AudioMute" null "exec" "${swayosd-client} --output-volume mute-toggle") # F1
|
|
||||||
(key "XF86AudioLowerVolume" null "exec" "${swayosd-client} --output-volume lower") # F2
|
|
||||||
(key "XF86AudioRaiseVolume" null "exec" "${swayosd-client} --output-volume raise") # F3
|
|
||||||
(key "XF86AudioPrev" null "exec" "${playerctl} previous") # F4
|
|
||||||
(key "XF86AudioPlay" null "exec" "${playerctl} play-pause") # F5
|
|
||||||
(key "XF86AudioNext" null "exec" "${playerctl} next") # F6
|
|
||||||
(key "XF86MonBrightnessDown" null "exec" "${swayosd-client} --brightness lower") # F7
|
|
||||||
(key "XF86MonBrightnessUp" null "exec" "${swayosd-client} --brightness raise") # F8
|
|
||||||
(key "XF86AudioMedia" null "exec" "${notify-send} test") # F12
|
|
||||||
|
|
||||||
# Meta alternatives
|
# Repeat binds
|
||||||
(key "0" "Super" "exec" "${swayosd-client} --output-volume mute-toggle")
|
binde = [
|
||||||
(key "Minus" "Super" "exec" "${swayosd-client} --output-volume lower")
|
# Media keys
|
||||||
(key "Equal" "Super" "exec" "${swayosd-client} --output-volume raise")
|
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||||
(key "Left" "Super" "exec" "${playerctl} previous")
|
(key "XF86AudioMute" null "exec" "${swayosd-client} --output-volume mute-toggle") # F1
|
||||||
(key "Delete" "Super" "exec" "${playerctl} play-pause")
|
(key "XF86AudioLowerVolume" null "exec" "${swayosd-client} --output-volume lower") # F2
|
||||||
(key "Right" "Super" "exec" "${playerctl} next")
|
(key "XF86AudioRaiseVolume" null "exec" "${swayosd-client} --output-volume raise") # F3
|
||||||
(key "Down" "Super" "exec" "${swayosd-client} --brightness lower")
|
(key "XF86AudioPrev" null "exec" "${playerctl} previous") # F4
|
||||||
(key "Up" "Super" "exec" "${swayosd-client} --brightness raise")
|
(key "XF86AudioPlay" null "exec" "${playerctl} play-pause") # F5
|
||||||
|
(key "XF86AudioNext" null "exec" "${playerctl} next") # F6
|
||||||
|
(key "XF86MonBrightnessDown" null "exec" "${swayosd-client} --brightness lower") # F7
|
||||||
|
(key "XF86MonBrightnessUp" null "exec" "${swayosd-client} --brightness raise") # F8
|
||||||
|
(key "XF86AudioMedia" null "exec" "${notify-send} test") # F12
|
||||||
|
|
||||||
# Special keys
|
# Meta alternatives
|
||||||
(key "Apostrophe" "Super" "exec" "${screenshot} selection")
|
(key "0" "Super" "exec" "${swayosd-client} --output-volume mute-toggle")
|
||||||
(key "Apostrophe" "Super+Alt" "exec" "${screenshot} selection --edit")
|
(key "Minus" "Super" "exec" "${swayosd-client} --output-volume lower")
|
||||||
(key "Apostrophe" "Super+Alt+Shift" "exec" "${screenshot} display --edit")
|
(key "Equal" "Super" "exec" "${swayosd-client} --output-volume raise")
|
||||||
(key "Apostrophe" "Super+Shift" "exec" "${screenshot} display")
|
(key "Left" "Super" "exec" "${playerctl} previous")
|
||||||
(key "Backslash" "Super+Shift" "exec" power)
|
(key "Delete" "Super" "exec" "${playerctl} play-pause")
|
||||||
(key "Backspace" "Super" "scroller:alignwindow" "middle")
|
(key "Right" "Super" "exec" "${playerctl} next")
|
||||||
(key "Backspace" "Super+Shift" "scroller:fitsize" "visible")
|
(key "Down" "Super" "exec" "${swayosd-client} --brightness lower")
|
||||||
(key "Equal" "Super+Shift" "exec" "${zoom} +0.1")
|
(key "Up" "Super" "exec" "${swayosd-client} --brightness raise")
|
||||||
(key "Escape" "Super" "togglefloating" null)
|
|
||||||
(key "Escape" "Super+Alt" "exec" "lifx state --color red")
|
|
||||||
(key "Escape" "Super+Shift" "scroller:pin" null)
|
|
||||||
(key "Left" "Super+Ctrl+Shift" "exec" "${left} --scroll kensington-orbit-wireless-tb-mouse")
|
|
||||||
(key "Minus" "Super+Shift" "exec" "${zoom} -0.1")
|
|
||||||
(key "Return" "Super" "fullscreen" "1") # Maximize
|
|
||||||
(key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen
|
|
||||||
(key "Slash" "Super" "exec" vrr)
|
|
||||||
(key "Space" "Ctrl" "exec" dropdown)
|
|
||||||
(key "Space" "Ctrl+Alt" "exec" "lifx toggle")
|
|
||||||
(key "Space" "Ctrl+Shift" "exec" pip-toggle)
|
|
||||||
(key "Space" "Super" "togglespecialworkspace" "scratchpad")
|
|
||||||
(key "Space" "Super+Ctrl+Shift" "exec" pip-switch)
|
|
||||||
(key "Space" "Super+Shift" "movetoworkspacesilent" "special:scratchpad")
|
|
||||||
(key "Tab" "Super" "scroller:toggleoverview" null)
|
|
||||||
|
|
||||||
# Alphanumeric keys
|
# Special keys
|
||||||
(key "0" "Super+Shift" "exec" zoom)
|
(key "Apostrophe" "Super" "exec" "${screenshot} selection")
|
||||||
(key "1" "Ctrl+Alt" "exec" "lifx state --brightness 0.01")
|
(key "Apostrophe" "Super+Alt" "exec" "${screenshot} selection --edit")
|
||||||
(key "1" "Super" "workspace" "1")
|
(key "Apostrophe" "Super+Alt+Shift" "exec" "${screenshot} display --edit")
|
||||||
(key "1" "Super+Alt" "exec" "lifx state --kelvin 1500")
|
(key "Apostrophe" "Super+Shift" "exec" "${screenshot} display")
|
||||||
(key "1" "Super+Shift" "movetoworkspacesilent" "1")
|
(key "Backslash" "Super+Shift" "exec" power)
|
||||||
(key "2" "Ctrl+Alt" "exec" "lifx state --brightness 0.25")
|
(key "Backspace" "Super" "scroller:alignwindow" "middle")
|
||||||
(key "2" "Super" "workspace" "2")
|
(key "Backspace" "Super+Shift" "scroller:fitsize" "visible")
|
||||||
(key "2" "Super+Alt" "exec" "lifx state --kelvin 2500")
|
(key "Equal" "Super+Shift" "exec" "${zoom} +0.1")
|
||||||
(key "2" "Super+Shift" "movetoworkspacesilent" "2")
|
(key "Escape" "Super" "pin" null)
|
||||||
(key "3" "Ctrl+Alt" "exec" "lifx state --brightness 0.50")
|
(key "Escape" "Super+Alt" "exec" "lifx state --color red")
|
||||||
(key "3" "Super" "workspace" "3")
|
(key "Escape" "Super+Shift" "togglefloating" null)
|
||||||
(key "3" "Super+Alt" "exec" "lifx state --kelvin 3000")
|
(key "Left" "Super+Ctrl+Shift" "exec" "${left} --scroll kensington-orbit-wireless-tb-mouse")
|
||||||
(key "3" "Super+Shift" "movetoworkspacesilent" "3")
|
(key "Minus" "Super+Shift" "exec" "${zoom} -0.1")
|
||||||
(key "4" "Ctrl+Alt" "exec" "lifx state --brightness 0.75")
|
(key "Return" "Super" "fullscreen" "1") # Maximize
|
||||||
(key "4" "Super" "workspace" "4")
|
(key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen
|
||||||
(key "4" "Super+Alt" "exec" "lifx state --kelvin 4000")
|
(key "Slash" "Super" "exec" vrr)
|
||||||
(key "4" "Super+Shift" "movetoworkspacesilent" "4")
|
(key "Space" "Ctrl" "exec" dropdown)
|
||||||
(key "5" "Ctrl+Alt" "exec" "lifx state --brightness 1.00")
|
(key "Space" "Ctrl+Alt" "exec" "lifx toggle")
|
||||||
(key "5" "Super" "workspace" "5")
|
(key "Space" "Ctrl+Shift" "exec" pip-toggle)
|
||||||
(key "5" "Super+Alt" "exec" "lifx state --kelvin 5000")
|
(key "Space" "Super" "togglespecialworkspace" "scratchpad")
|
||||||
(key "5" "Super+Shift" "movetoworkspacesilent" "5")
|
(key "Space" "Super+Ctrl+Shift" "exec" pip-switch)
|
||||||
(key "6" "Super" "workspace" "6")
|
(key "Space" "Super+Shift" "movetoworkspacesilent" "special:scratchpad")
|
||||||
(key "6" "Super+Shift" "movetoworkspacesilent" "6")
|
(key "Tab" "Super" "scroller:toggleoverview" null)
|
||||||
(key "7" "Super" "workspace" "7")
|
|
||||||
(key "7" "Super+Shift" "movetoworkspacesilent" "7")
|
|
||||||
(key "8" "Super" "workspace" "8")
|
|
||||||
(key "8" "Super+Shift" "movetoworkspacesilent" "8")
|
|
||||||
(key "9" "Super" "exec" audio)
|
|
||||||
(key "A" "Ctrl+Alt" "exec" "${waydroid} session stop")
|
|
||||||
(key "A" "Super" "scroller:movefocus" "l")
|
|
||||||
(key "A" "Super+Ctrl" "scroller:alignwindow" "left")
|
|
||||||
(key "A" "Super+Shift" "scroller:movewindow" "l")
|
|
||||||
(key "B" "Super" "exec" config.custom.browser.command)
|
|
||||||
(key "C" "Super" "exec" config.custom.menus.clipboard.show)
|
|
||||||
(key "C" "Super+Shift" "exec" config.custom.menus.clipboard.clear)
|
|
||||||
(key "D" "Super" "togglespecialworkspace" "android")
|
|
||||||
(key "D" "Super+Shift" "movetoworkspacesilent" "special:android")
|
|
||||||
(key "E" "Super" "exec" gnome-text-editor)
|
|
||||||
(key "F" "Super" "exec" "${nautilus} --new-window")
|
|
||||||
(key "G" "Super" "togglespecialworkspace" "game")
|
|
||||||
(key "G" "Super+Ctrl" "exec" steam)
|
|
||||||
(key "G" "Super+Shift" "movetoworkspacesilent" "special:game")
|
|
||||||
(key "I" "Super" "exec" codium)
|
|
||||||
(key "K" "Super" "exec" obsidian)
|
|
||||||
(key "M" "Super" "togglespecialworkspace" "music")
|
|
||||||
(key "M" "Super+Shift" "movetoworkspacesilent" "special:music")
|
|
||||||
(key "O" "Super" "exec" "${hyprpicker} --autocopy")
|
|
||||||
(key "O" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
|
|
||||||
(key "P" "Ctrl+Alt" "exec" "${pkill} --full --exact 1password")
|
|
||||||
(key "P" "Super" "togglespecialworkspace" "password")
|
|
||||||
(key "P" "Super+Shift" "movetoworkspacesilent" "special:password")
|
|
||||||
(key "Q" "Ctrl+Alt" "exec" "${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)")
|
|
||||||
(key "Q" "Super" "killactive" null)
|
|
||||||
(key "R" "Super" "scroller:movefocus" "d")
|
|
||||||
(key "R" "Super+Ctrl" "scroller:alignwindow" "down")
|
|
||||||
(key "R" "Super+Shift" "scroller:movewindow" "d")
|
|
||||||
(key "S" "Ctrl+Alt" "exec" "${pkill} --full --exact steam")
|
|
||||||
(key "S" "Super" "scroller:movefocus" "r")
|
|
||||||
(key "S" "Super+Ctrl" "scroller:alignwindow" "right")
|
|
||||||
(key "S" "Super+Shift" "scroller:movewindow" "r")
|
|
||||||
(key "T" "Ctrl+Alt" "exec" "${pkill} --full --exact ghostty")
|
|
||||||
(key "T" "Super" "togglespecialworkspace" "terminal")
|
|
||||||
(key "T" "Super+Ctrl" "exec" ghostty)
|
|
||||||
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
|
|
||||||
(key "V" "Super" "togglespecialworkspace" "vm")
|
|
||||||
(key "V" "Super+Ctrl" "exec" vm)
|
|
||||||
(key "V" "Super+Ctrl+Shift" "exec" virt-manager)
|
|
||||||
(key "V" "Super+Shift" "movetoworkspacesilent" "special:vm")
|
|
||||||
(key "W" "Super" "scroller:movefocus" "u")
|
|
||||||
(key "W" "Super+Ctrl" "scroller:alignwindow" "up")
|
|
||||||
(key "W" "Super+Shift" "scroller:movewindow" "u")
|
|
||||||
(key "X" "Super" "scroller:cyclesize" "next")
|
|
||||||
(key "Z" "Super" "scroller:cyclesize" "previous")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Lockscreen binds
|
# Alphanumeric keys
|
||||||
bindl = [
|
(key "0" "Super+Shift" "exec" zoom)
|
||||||
(key "Delete" "Ctrl" "exec" "${hyprctl} reload")
|
(key "1" "Ctrl+Alt" "exec" "lifx state --brightness 0.01")
|
||||||
(key "Delete" "Ctrl+Alt" "exec" "${loginctl} terminate-user ''") # Current user sessions
|
(key "1" "Super" "workspace" "1")
|
||||||
(key "Delete" "Super" "exec" inhibit)
|
(key "1" "Super+Alt" "exec" "lifx state --kelvin 1500")
|
||||||
(key "L" "Super" "exec" "${hyprlock} --immediate & ${sleep} 1 && ${hyprctl} dispatch dpms off")
|
(key "1" "Super+Shift" "movetoworkspacesilent" "1")
|
||||||
|
(key "2" "Ctrl+Alt" "exec" "lifx state --brightness 0.25")
|
||||||
|
(key "2" "Super" "workspace" "2")
|
||||||
|
(key "2" "Super+Alt" "exec" "lifx state --kelvin 2500")
|
||||||
|
(key "2" "Super+Shift" "movetoworkspacesilent" "2")
|
||||||
|
(key "3" "Ctrl+Alt" "exec" "lifx state --brightness 0.50")
|
||||||
|
(key "3" "Super" "workspace" "3")
|
||||||
|
(key "3" "Super+Alt" "exec" "lifx state --kelvin 3000")
|
||||||
|
(key "3" "Super+Shift" "movetoworkspacesilent" "3")
|
||||||
|
(key "4" "Ctrl+Alt" "exec" "lifx state --brightness 0.75")
|
||||||
|
(key "4" "Super" "workspace" "4")
|
||||||
|
(key "4" "Super+Alt" "exec" "lifx state --kelvin 4000")
|
||||||
|
(key "4" "Super+Shift" "movetoworkspacesilent" "4")
|
||||||
|
(key "5" "Ctrl+Alt" "exec" "lifx state --brightness 1.00")
|
||||||
|
(key "5" "Super" "workspace" "5")
|
||||||
|
(key "5" "Super+Alt" "exec" "lifx state --kelvin 5000")
|
||||||
|
(key "5" "Super+Shift" "movetoworkspacesilent" "5")
|
||||||
|
(key "6" "Super" "workspace" "6")
|
||||||
|
(key "6" "Super+Shift" "movetoworkspacesilent" "6")
|
||||||
|
(key "7" "Super" "workspace" "7")
|
||||||
|
(key "7" "Super+Shift" "movetoworkspacesilent" "7")
|
||||||
|
(key "8" "Super" "workspace" "8")
|
||||||
|
(key "8" "Super+Shift" "movetoworkspacesilent" "8")
|
||||||
|
(key "9" "Super" "exec" audio)
|
||||||
|
(key "A" "Ctrl+Alt" "exec" "${waydroid} session stop")
|
||||||
|
(key "A" "Super" "scroller:movefocus" "l")
|
||||||
|
(key "A" "Super+Ctrl" "scroller:alignwindow" "left")
|
||||||
|
(key "A" "Super+Shift" "scroller:movewindow" "l")
|
||||||
|
(key "B" "Super" "exec" config.custom.browser.command)
|
||||||
|
(key "C" "Super" "exec" config.custom.menus.clipboard.show)
|
||||||
|
(key "C" "Super+Shift" "exec" config.custom.menus.clipboard.clear)
|
||||||
|
(key "D" "Super" "togglespecialworkspace" "android")
|
||||||
|
(key "D" "Super+Shift" "movetoworkspacesilent" "special:android")
|
||||||
|
(key "E" "Super" "exec" "${gnome-text-editor} --new-window")
|
||||||
|
(key "F" "Super" "exec" "${nautilus} --new-window")
|
||||||
|
(key "G" "Super" "togglespecialworkspace" "game")
|
||||||
|
(key "G" "Super+Ctrl" "exec" steam)
|
||||||
|
(key "G" "Super+Shift" "movetoworkspacesilent" "special:game")
|
||||||
|
(key "I" "Super" "exec" codium)
|
||||||
|
(key "K" "Super" "exec" obsidian)
|
||||||
|
(key "M" "Super" "togglespecialworkspace" "music")
|
||||||
|
(key "M" "Super+Shift" "movetoworkspacesilent" "special:music")
|
||||||
|
(key "O" "Super" "exec" "${hyprpicker} --autocopy")
|
||||||
|
(key "O" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
|
||||||
|
(key "P" "Ctrl+Alt" "exec" "${pkill} --exact 1password")
|
||||||
|
(key "P" "Super" "togglespecialworkspace" "password")
|
||||||
|
(key "P" "Super+Shift" "movetoworkspacesilent" "special:password")
|
||||||
|
(key "Q" "Ctrl+Alt" "exec" "${hyprctl} kill")
|
||||||
|
(key "Q" "Super" "killactive" null)
|
||||||
|
(key "R" "Super" "scroller:movefocus" "d")
|
||||||
|
(key "R" "Super+Ctrl" "scroller:alignwindow" "down")
|
||||||
|
(key "R" "Super+Shift" "scroller:movewindow" "d")
|
||||||
|
(key "S" "Ctrl+Alt" "exec" "${pkill} --exact steam")
|
||||||
|
(key "S" "Super" "scroller:movefocus" "r")
|
||||||
|
(key "S" "Super+Ctrl" "scroller:alignwindow" "right")
|
||||||
|
(key "S" "Super+Shift" "scroller:movewindow" "r")
|
||||||
|
(key "T" "Ctrl+Alt" "exec" "${pkill} --exact ghostty")
|
||||||
|
(key "T" "Super" "togglespecialworkspace" "terminal")
|
||||||
|
(key "T" "Super+Ctrl" "exec" ghostty)
|
||||||
|
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
|
||||||
|
(key "V" "Super" "togglespecialworkspace" "vm")
|
||||||
|
(key "V" "Super+Ctrl" "exec" vm)
|
||||||
|
(key "V" "Super+Ctrl+Shift" "exec" virt-manager)
|
||||||
|
(key "V" "Super+Shift" "movetoworkspacesilent" "special:vm")
|
||||||
|
(key "W" "Super" "scroller:movefocus" "u")
|
||||||
|
(key "W" "Super+Ctrl" "scroller:alignwindow" "up")
|
||||||
|
(key "W" "Super+Shift" "scroller:movewindow" "u")
|
||||||
|
(key "X" "Super" "scroller:cyclewidth" "next")
|
||||||
|
(key "X" "Super+Shift" "scroller:cycleheight" "next")
|
||||||
|
(key "Z" "Super" "scroller:cyclewidth" "previous")
|
||||||
|
(key "Z" "Super+Shift" "scroller:cycleheight" "previous")
|
||||||
|
];
|
||||||
|
|
||||||
# Laptop lid switches
|
# Lockscreen binds
|
||||||
# https://wiki.hyprland.org/Configuring/Binds/#switches
|
bindl = [
|
||||||
#?? hyprctl devices
|
(key "Delete" "Ctrl" "exec" "${hyprctl} reload")
|
||||||
#// (key "switch:off:Lid Switch" null "dpms" "on") # Open
|
(key "Delete" "Ctrl+Alt" "exec" "${loginctl} terminate-user ''") # Current user sessions
|
||||||
#// (key "switch:on:Lid Switch" null "dpms" "off") # Close
|
(key "Delete" "Super" "exec" inhibit)
|
||||||
];
|
(key "L" "Super" "exec" "${hyprlock} --immediate & ${sleep} 1 && ${hyprctl} dispatch dpms off")
|
||||||
|
|
||||||
# Mouse binds
|
# Laptop lid switches
|
||||||
bindm = [
|
# https://wiki.hyprland.org/Configuring/Binds/#switches
|
||||||
(key "mouse:272" "Super" "movewindow" null) # LMB
|
#?? hyprctl devices
|
||||||
(key "mouse:273" "Super" "resizewindow" null) # RMB
|
#// (key "switch:off:Lid Switch" null "dpms" "on") # Open
|
||||||
];
|
#// (key "switch:on:Lid Switch" null "dpms" "off") # Close
|
||||||
|
];
|
||||||
|
|
||||||
# Release binds
|
# Mouse binds
|
||||||
bindr = [
|
bindm = [
|
||||||
(key "Alt_L" "Super+Alt" "togglespecialworkspace" "wallpaper")
|
(key "mouse:272" "Super" "movewindow" null) # LMB
|
||||||
(key "Alt_L" "Super+Alt+Shift" "movetoworkspacesilent" "special:wallpaper")
|
(key "mouse:273" "Super" "resizewindow" null) # RMB
|
||||||
(key "Control_L" "Super+Ctrl" "scroller:admitwindow" null)
|
];
|
||||||
(key "Control_L" "Super+Ctrl+Shift" "scroller:expelwindow" null)
|
|
||||||
(key "Shift_L" "Super+Ctrl+Shift" "scroller:setmode" "row")
|
# Release binds
|
||||||
(key "Shift_L" "Super+Shift" "scroller:setmode" "column")
|
bindr = [
|
||||||
(key "Super_L" "Super" "exec" config.custom.menus.show)
|
(key "Alt_L" "Super+Alt" "togglespecialworkspace" "wallpaper")
|
||||||
(key "Super_L" "Super+Alt" "exec" config.custom.menus.vault.show)
|
(key "Alt_L" "Super+Alt+Shift" "movetoworkspacesilent" "special:wallpaper")
|
||||||
(key "Super_L" "Super+Ctrl+Shift" "exec" config.custom.menus.network.show)
|
(key "Control_L" "Super+Ctrl" "scroller:admitwindow" null)
|
||||||
(key "Super_L" "Super+Shift" "exec" config.custom.menus.search.show)
|
(key "Control_L" "Super+Ctrl+Shift" "scroller:expelwindow" null)
|
||||||
];
|
|
||||||
};
|
# BUG: Causes Hyprland to crash when floating the scroller:pin window
|
||||||
};
|
(key "Shift_L" "Super+Shift" "scroller:pin" null)
|
||||||
|
|
||||||
|
(key "Super_L" "Super" "exec" config.custom.menus.default.show)
|
||||||
|
(key "Super_L" "Super+Alt" "exec" config.custom.menus.vault.show)
|
||||||
|
(key "Super_L" "Super+Ctrl" "exec" config.custom.menus.calculator.show)
|
||||||
|
(key "Super_L" "Super+Ctrl+Shift" "exec" config.custom.menus.network.show)
|
||||||
|
(key "Super_L" "Super+Shift" "exec" config.custom.menus.search.show)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,19 +13,25 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
custom.desktops = mkIf config.custom.full {
|
custom = {
|
||||||
hyprland = {
|
desktops = mkIf config.custom.full {
|
||||||
binds.enable = true;
|
hyprland = {
|
||||||
keywords.enable = true;
|
binds.enable = true;
|
||||||
monitors.enable = true;
|
keywords.enable = true;
|
||||||
plugins.enable = true;
|
monitors.enable = true;
|
||||||
rules.enable = true;
|
plugins.enable = true;
|
||||||
variables.enable = true;
|
rules.enable = true;
|
||||||
|
variables.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gnome = {
|
||||||
|
enable = true;
|
||||||
|
minimal = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gnome = {
|
programs = {
|
||||||
enable = true;
|
uwsm.enable = true;
|
||||||
minimal = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,12 +40,20 @@ in {
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = hm.wayland.windowManager.hyprland.finalPackage;
|
package = hm.wayland.windowManager.hyprland.finalPackage;
|
||||||
|
|
||||||
|
# BUG: Some apps launched via exec cause session to end, wrap in uwsm to isolate scope
|
||||||
|
# https://github.com/Vladimir-csp/uwsm/issues/45
|
||||||
|
#?? uwsm app -- COMMAND
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal-gnome
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
|
|
|
@ -9,13 +9,18 @@ with lib; let
|
||||||
hm = config.home-manager.users.${config.custom.username};
|
hm = config.home-manager.users.${config.custom.username};
|
||||||
|
|
||||||
audio = hm.home.file.".local/bin/audio".source;
|
audio = hm.home.file.".local/bin/audio".source;
|
||||||
|
gnome-text-editor = getExe pkgs.gnome-text-editor;
|
||||||
grep = getExe pkgs.gnugrep;
|
grep = getExe pkgs.gnugrep;
|
||||||
left = hm.home.file.".local/bin/left".source;
|
left = hm.home.file.".local/bin/left".source;
|
||||||
loupe = getExe pkgs.loupe;
|
loupe = getExe pkgs.loupe;
|
||||||
modprobe = getExe' pkgs.kmod "modprobe";
|
modprobe = getExe' pkgs.kmod "modprobe";
|
||||||
nautilus = getExe pkgs.nautilus;
|
nautilus = getExe pkgs.nautilus;
|
||||||
sway-audio-idle-inhibit = getExe pkgs.sway-audio-idle-inhibit;
|
sway-audio-idle-inhibit = getExe pkgs.sway-audio-idle-inhibit;
|
||||||
|
uwsm = getExe pkgs.uwsm;
|
||||||
virsh = getExe' config.virtualisation.libvirtd.package "virsh";
|
virsh = getExe' config.virtualisation.libvirtd.package "virsh";
|
||||||
|
wallpaper = hm.home.file.".local/bin/wallpaper".source;
|
||||||
|
|
||||||
|
command = command: "${uwsm} app -- ${command}";
|
||||||
in {
|
in {
|
||||||
options.custom.desktops.hyprland.keywords = {
|
options.custom.desktops.hyprland.keywords = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
|
@ -45,7 +50,7 @@ in {
|
||||||
left_handed = true;
|
left_handed = true;
|
||||||
middle_button_emulation = true;
|
middle_button_emulation = true;
|
||||||
natural_scroll = true;
|
natural_scroll = true;
|
||||||
sensitivity = -0.6;
|
sensitivity = -0.7;
|
||||||
})
|
})
|
||||||
|
|
||||||
(devices ["logitech-m570"] {
|
(devices ["logitech-m570"] {
|
||||||
|
@ -82,31 +87,30 @@ in {
|
||||||
hm.home.sessionVariables
|
hm.home.sessionVariables
|
||||||
)
|
)
|
||||||
++ [
|
++ [
|
||||||
"EDITOR, gnome-text-editor"
|
"EDITOR, ${gnome-text-editor}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
||||||
exec = [
|
exec = [
|
||||||
"${left} --init --scroll kensington-orbit-wireless-tb-mouse" # Enforce left-pawed state
|
(command "${left} --init --scroll kensington-orbit-wireless-tb-mouse") # Enforce left-pawed state
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
|
||||||
exec-once =
|
exec-once =
|
||||||
[
|
[
|
||||||
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
(command sway-audio-idle-inhibit) # Inhibit idle while audio is playing
|
||||||
"${audio} --init" # Enforce audio profile state
|
(command "${audio} --init") # Enforce audio profile state
|
||||||
config.custom.menus.clipboard.clear-silent # Clear clipboard history
|
(command config.custom.menus.clipboard.clear-silent) # Clear clipboard history
|
||||||
|
|
||||||
# HACK: Launch hidden GTK windows to reduce startup time
|
# HACK: Launch hidden GTK windows to reduce startup time
|
||||||
"[workspace special:hidden silent] ${loupe}"
|
"[workspace special:hidden silent] ${command loupe}"
|
||||||
"[workspace special:hidden silent] ${nautilus}"
|
"[workspace special:hidden silent] ${command nautilus}"
|
||||||
]
|
]
|
||||||
++ optionals config.custom.wallpaper [
|
++ optionals config.custom.wallpaper [
|
||||||
"wallpaper"
|
(command wallpaper)
|
||||||
]
|
]
|
||||||
# HACK: Delay driver initialization to work around reset issues
|
|
||||||
++ optionals config.custom.settings.vm.passthrough.blacklist [
|
++ optionals config.custom.settings.vm.passthrough.blacklist [
|
||||||
"${virsh} list | ${grep} ${config.custom.settings.vm.passthrough.guest} || sudo ${modprobe} ${config.custom.settings.vm.passthrough.driver}"
|
# HACK: Delay driver initialization to work around reset issues
|
||||||
|
(command "${virsh} list | ${grep} ${config.custom.settings.vm.passthrough.guest} || sudo ${modprobe} ${config.custom.settings.vm.passthrough.driver}")
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,13 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.custom.desktops.hyprland.plugins;
|
cfg = config.custom.desktops.hyprland.plugins;
|
||||||
|
hm = config.home-manager.users.${config.custom.username};
|
||||||
|
|
||||||
hyprctl = getExe' config.programs.hyprland.package "hyprctl";
|
hyprctl = getExe' config.programs.hyprland.package "hyprctl";
|
||||||
|
minimize = hm.home.file.".local/bin/minimize".source;
|
||||||
|
uwsm = getExe pkgs.uwsm;
|
||||||
|
|
||||||
|
command = command: "${uwsm} app -- ${command}";
|
||||||
in {
|
in {
|
||||||
options.custom.desktops.hyprland.plugins = {
|
options.custom.desktops.hyprland.plugins = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
|
@ -47,19 +52,27 @@ in {
|
||||||
# https://github.com/hyprwm/hyprland-plugins/tree/main/hyprbars#buttons-config
|
# https://github.com/hyprwm/hyprland-plugins/tree/main/hyprbars#buttons-config
|
||||||
#?? hyprbars-button = COLOR, SIZE, ICON, EXEC
|
#?? hyprbars-button = COLOR, SIZE, ICON, EXEC
|
||||||
hyprbars-button = [
|
hyprbars-button = [
|
||||||
"rgb(dc322f), 16,, ${hyprctl} dispatch killactive" # Close
|
"rgb(dc322f), 16,, ${command "${hyprctl} dispatch killactive"}" # Close
|
||||||
"rgb(d33682), 16,, ${hyprctl} dispatch fullscreen 1" # Maximize
|
"rgb(d33682), 16,, ${command "${hyprctl} dispatch fullscreen 1"}" # Maximize
|
||||||
"rgb(6c71c4), 16,, minimize" # Minimize
|
"rgb(6c71c4), 16,, ${command minimize}" # Minimize
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/dawsers/hyprscroller?tab=readme-ov-file#options
|
# https://github.com/dawsers/hyprscroller?tab=readme-ov-file#options
|
||||||
scroller = mkIf cfg.hyprscroller {
|
scroller = mkIf cfg.hyprscroller {
|
||||||
"col.selection_border" = "rgb(d33682)";
|
"col.selection_border" = "rgb(d33682)";
|
||||||
#// center_row_if_space_available = true;
|
center_row_if_space_available = true;
|
||||||
column_default_width = "onethird";
|
|
||||||
#// column_widths = "onethird onehalf twothirds one";
|
column_default_width =
|
||||||
#// window_heights = "onethird onehalf twothirds one";
|
if config.custom.ultrawide
|
||||||
|
then "threeeighths"
|
||||||
|
else "onethird";
|
||||||
|
|
||||||
|
column_widths =
|
||||||
|
if config.custom.ultrawide
|
||||||
|
then "onefourth threeeighths onehalf fiveeighths threequarters one"
|
||||||
|
else "onethird onehalf twothirds one";
|
||||||
|
|
||||||
cyclesize_wrap = false;
|
cyclesize_wrap = false;
|
||||||
focus_wrap = false;
|
focus_wrap = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,15 +9,17 @@ with lib; let
|
||||||
hm = config.home-manager.users.${config.custom.username};
|
hm = config.home-manager.users.${config.custom.username};
|
||||||
|
|
||||||
_1password = getExe config.programs._1password-gui.package;
|
_1password = getExe config.programs._1password-gui.package;
|
||||||
gamescope = getExe config.programs.gamescope.package;
|
|
||||||
ghostty = getExe hm.programs.ghostty.package;
|
ghostty = getExe hm.programs.ghostty.package;
|
||||||
launch = hm.home.file.".local/bin/launch".source;
|
launch = hm.home.file.".local/bin/launch".source;
|
||||||
libreoffice = getExe config.custom.programs.libreoffice.package;
|
libreoffice = getExe config.custom.programs.libreoffice.package;
|
||||||
loupe = getExe pkgs.loupe;
|
loupe = getExe pkgs.loupe;
|
||||||
steam = getExe config.programs.steam.package;
|
steam = getExe config.programs.steam.package;
|
||||||
|
uwsm = getExe pkgs.uwsm;
|
||||||
virt-manager = getExe pkgs.virt-manager;
|
virt-manager = getExe pkgs.virt-manager;
|
||||||
waydroid = getExe pkgs.waydroid;
|
waydroid = getExe pkgs.waydroid;
|
||||||
youtube-music = getExe pkgs.youtube-music;
|
youtube-music = getExe pkgs.youtube-music;
|
||||||
|
|
||||||
|
command = command: "${uwsm} app -- ${command}";
|
||||||
in {
|
in {
|
||||||
options.custom.desktops.hyprland.rules = {
|
options.custom.desktops.hyprland.rules = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
|
@ -30,19 +32,21 @@ in {
|
||||||
# https://wiki.hyprland.org/Configuring/Workspace-Rules
|
# https://wiki.hyprland.org/Configuring/Workspace-Rules
|
||||||
#?? workspace = WORKSPACE, RULES
|
#?? workspace = WORKSPACE, RULES
|
||||||
workspace = [
|
workspace = [
|
||||||
"special:android, on-created-empty:${launch} --workspace special:android --empty ${waydroid} app launch com.YoStarEN.Arknights"
|
"special:android, on-created-empty:${command "${launch} --workspace special:android --empty ${waydroid} app launch com.YoStarEN.Arknights"}"
|
||||||
"special:game, on-created-empty:${steam}"
|
"special:game, on-created-empty:${command steam}"
|
||||||
"special:music, on-created-empty:${youtube-music}"
|
"special:music, on-created-empty:${command youtube-music}"
|
||||||
"special:office, on-created-empty:${launch} --workspace special:office --empty --tile -- ${libreoffice}"
|
"special:office, on-created-empty:${command "${launch} --workspace special:office --empty --tile -- ${libreoffice}"}"
|
||||||
"special:password, on-created-empty:${launch} --workspace special:password --empty ${_1password}"
|
"special:password, on-created-empty:${command "${launch} --workspace special:password --empty ${_1password}"}"
|
||||||
"special:terminal, on-created-empty:${ghostty}"
|
"special:terminal, on-created-empty:${command ghostty}"
|
||||||
"special:vm, on-created-empty:${launch} --workspace special:vm --empty ${virt-manager}"
|
"special:vm, on-created-empty:${command "${launch} --workspace special:vm --empty ${virt-manager}"}"
|
||||||
"special:wallpaper, on-created-empty:${loupe} /tmp/wallpaper.png"
|
"special:wallpaper, on-created-empty:${command "${loupe} /tmp/wallpaper.png"}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Window-Rules
|
# https://wiki.hyprland.org/Configuring/Window-Rules
|
||||||
#?? windowrulev2 = RULE, WINDOW
|
#?? windowrulev2 = RULE, WINDOW
|
||||||
windowrulev2 = with config.custom; let
|
windowrulev2 = with config.custom; let
|
||||||
|
gaps_in = gap / 4;
|
||||||
|
|
||||||
# HACK: Attempts to account for hypr-specific scale, gaps, borders, and bar padding
|
# HACK: Attempts to account for hypr-specific scale, gaps, borders, and bar padding
|
||||||
### Static geometry rules
|
### Static geometry rules
|
||||||
tr = num: toString (builtins.floor num); # Convert truncated float to string
|
tr = num: toString (builtins.floor num); # Convert truncated float to string
|
||||||
|
@ -50,6 +54,7 @@ in {
|
||||||
# Bottom center
|
# Bottom center
|
||||||
android = rec {
|
android = rec {
|
||||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||||
|
|
||||||
y = tr (height
|
y = tr (height
|
||||||
/ scale
|
/ scale
|
||||||
- (toInt h)
|
- (toInt h)
|
||||||
|
@ -60,27 +65,30 @@ in {
|
||||||
then - border # Cause unknown
|
then - border # Cause unknown
|
||||||
else 0
|
else 0
|
||||||
));
|
));
|
||||||
|
|
||||||
w = tr (
|
w = tr (
|
||||||
width
|
width
|
||||||
/ scale
|
/ scale
|
||||||
* (
|
* (
|
||||||
if ultrawide
|
if ultrawide
|
||||||
then 0.5 # 50%
|
then 3.0 / 8.0 # threeeighths
|
||||||
else 1
|
else 1.0 # one
|
||||||
)
|
)
|
||||||
+ (
|
+ (
|
||||||
if ultrawide
|
if ultrawide
|
||||||
then - gap / 2 * 2 # Center layout padding between windows
|
then - gaps_in * 2
|
||||||
else - gap * 2
|
else - gap * 2
|
||||||
)
|
)
|
||||||
- border * 2
|
- border * 2
|
||||||
);
|
);
|
||||||
h = tr (height / scale * 0.5); # 50%
|
|
||||||
|
h = tr (height / scale * 0.5);
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bottom center
|
# Bottom center
|
||||||
clipboard = rec {
|
clipboard = rec {
|
||||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||||
|
|
||||||
y = tr (height
|
y = tr (height
|
||||||
/ scale
|
/ scale
|
||||||
- (toInt h)
|
- (toInt h)
|
||||||
|
@ -91,13 +99,15 @@ in {
|
||||||
then - border # Cause unknown
|
then - border # Cause unknown
|
||||||
else 0
|
else 0
|
||||||
));
|
));
|
||||||
|
|
||||||
w = "600";
|
w = "600";
|
||||||
h = tr (height / scale * 0.75); # 75%
|
h = tr (height / scale * 0.75);
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bottom center
|
# Bottom center
|
||||||
dropdown = rec {
|
dropdown = rec {
|
||||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||||
|
|
||||||
y = tr (height
|
y = tr (height
|
||||||
/ scale
|
/ scale
|
||||||
- (toInt h)
|
- (toInt h)
|
||||||
|
@ -108,27 +118,29 @@ in {
|
||||||
then - border # Cause unknown
|
then - border # Cause unknown
|
||||||
else 0
|
else 0
|
||||||
));
|
));
|
||||||
|
|
||||||
w = tr (
|
w = tr (
|
||||||
width
|
width
|
||||||
/ scale
|
/ scale
|
||||||
* (
|
* (
|
||||||
if ultrawide
|
if ultrawide
|
||||||
then 0.5 # 50%
|
then 3.0 / 8.0 # threeeighths
|
||||||
else 1
|
else 1.0 # one
|
||||||
)
|
)
|
||||||
+ (
|
+ (
|
||||||
if ultrawide
|
if ultrawide
|
||||||
then - gap / 2 * 2 # Center layout padding between windows
|
then - gaps_in * 2
|
||||||
else - gap * 2
|
else - gap * 2
|
||||||
)
|
)
|
||||||
- border * 2
|
- border * 2
|
||||||
);
|
);
|
||||||
|
|
||||||
h = tr (height
|
h = tr (height
|
||||||
/ scale
|
/ scale
|
||||||
* (
|
* (
|
||||||
if ultrawide
|
if ultrawide
|
||||||
then 0.2 # 20%
|
then 0.2
|
||||||
else 0.3 # 30%
|
else 0.3
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,7 +148,20 @@ in {
|
||||||
pip = rec {
|
pip = rec {
|
||||||
x = tr (width / scale - (toInt w) - gap - border);
|
x = tr (width / scale - (toInt w) - gap - border);
|
||||||
y = tr (gap + border);
|
y = tr (gap + border);
|
||||||
w = tr (width / scale * 0.25 - gap - gap / 2 - border * 2); # 25%
|
|
||||||
|
w = tr (
|
||||||
|
width
|
||||||
|
/ scale
|
||||||
|
* (
|
||||||
|
if ultrawide
|
||||||
|
then (1 - 3.0 / 8.0) / 2 # threeeighths / 2
|
||||||
|
else 1.0 / 3.0 # onethird
|
||||||
|
)
|
||||||
|
- gap
|
||||||
|
- gaps_in
|
||||||
|
- border * 2
|
||||||
|
);
|
||||||
|
|
||||||
h = tr ((toInt w) * 9 / 16 + 1); # 16:9 aspect ratio
|
h = tr ((toInt w) * 9 / 16 + 1); # 16:9 aspect ratio
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -169,11 +194,12 @@ in {
|
||||||
focus = expr: rules: merge "focus" expr rules;
|
focus = expr: rules: merge "focus" expr rules;
|
||||||
fullscreen = expr: rules: merge "fullscreen" expr rules;
|
fullscreen = expr: rules: merge "fullscreen" expr rules;
|
||||||
pinned = expr: rules: merge "pinned" expr rules;
|
pinned = expr: rules: merge "pinned" expr rules;
|
||||||
|
tag = expr: rules: merge "tag" expr rules;
|
||||||
title = expr: rules: merge "title" "^${expr}$" rules;
|
title = expr: rules: merge "title" "^${expr}$" rules;
|
||||||
|
|
||||||
### Pseudo-tags
|
### Pseudo-tags
|
||||||
# Wrap generated rules in Nix categories
|
# Wrap generated rules in Nix categories
|
||||||
tag = {
|
t = {
|
||||||
android = rules: [
|
android = rules: [
|
||||||
(class "[Ww]aydroid.*" rules)
|
(class "[Ww]aydroid.*" rules)
|
||||||
];
|
];
|
||||||
|
@ -191,7 +217,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
dropdown = rules: [
|
dropdown = rules: [
|
||||||
(class "dropdown" rules)
|
(class ".*dropdown" rules)
|
||||||
];
|
];
|
||||||
|
|
||||||
editor = rules: [
|
editor = rules: [
|
||||||
|
@ -216,6 +242,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
music = rules: [
|
music = rules: [
|
||||||
|
(class "com\\.github\\.th_ch\\.youtube_music" rules)
|
||||||
(class "Spotify" rules)
|
(class "Spotify" rules)
|
||||||
(class "YouTube Music" rules)
|
(class "YouTube Music" rules)
|
||||||
(title "Spotify Premium" rules)
|
(title "Spotify Premium" rules)
|
||||||
|
@ -241,6 +268,7 @@ in {
|
||||||
(class "discord" rules)
|
(class "discord" rules)
|
||||||
(class "Element" rules)
|
(class "Element" rules)
|
||||||
(class "org\\.telegram\\.desktop" rules)
|
(class "org\\.telegram\\.desktop" rules)
|
||||||
|
(class "signal" rules)
|
||||||
];
|
];
|
||||||
|
|
||||||
steam = rules: [
|
steam = rules: [
|
||||||
|
@ -265,83 +293,47 @@ in {
|
||||||
in
|
in
|
||||||
flatten [
|
flatten [
|
||||||
### Defaults
|
### Defaults
|
||||||
(class ".*" ["float" "suppressevent maximize"])
|
|
||||||
(floating false ["noshadow" "plugin:hyprbars:nobar"])
|
(floating false ["noshadow" "plugin:hyprbars:nobar"])
|
||||||
(floating true ["noborder"])
|
(floating true ["noborder"])
|
||||||
(focus false ["plugin:hyprbars:bar_color rgb(073642)" "plugin:hyprbars:title_color rgb(586e75)"])
|
(focus false ["plugin:hyprbars:bar_color rgb(073642)" "plugin:hyprbars:title_color rgb(586e75)"])
|
||||||
(fullscreen true ["idleinhibit focus"])
|
(fullscreen true ["idleinhibit focus"])
|
||||||
(pinned true ["bordercolor rgb(073642) rgb(073642)"])
|
(pinned true ["bordercolor rgb(fdf6e3) rgb(fdf6e300)" "noborder 0" "noshadow"])
|
||||||
|
|
||||||
(tag.android ["idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android silent" "plugin:hyprbars:nobar"])
|
(tag "scroller:pinned" ["bordercolor rgb(fdf6e3) rgb(fdf6e300)"])
|
||||||
(tag.browser ["tile" "workspace 1"])
|
|
||||||
(tag.clipboard ["move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused" "plugin:hyprbars:nobar"])
|
(t.android ["float" "idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android silent" "plugin:hyprbars:nobar"])
|
||||||
(tag.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}" "plugin:hyprbars:nobar"])
|
(t.browser ["workspace 1"])
|
||||||
(tag.editor ["tile"])
|
(t.clipboard ["float" "move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused" "plugin:hyprbars:nobar"])
|
||||||
(tag.files ["center"])
|
(t.dropdown ["float" "move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}" "plugin:hyprbars:nobar"])
|
||||||
(tag.game ["focusonactivate" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game" "plugin:hyprbars:nobar"])
|
(t.game ["focusonactivate" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game" "plugin:hyprbars:nobar"])
|
||||||
(tag.media ["center" "keepaspectratio" "size <90% <90%"])
|
(t.media ["center" "float" "keepaspectratio" "size <90% <90%"])
|
||||||
(tag.music ["tile" "workspace special:music silent"])
|
(t.music ["workspace special:music silent"])
|
||||||
(tag.office ["tile" "workspace special:office silent"])
|
(t.office ["workspace special:office silent" "plugin:scroller:group office"])
|
||||||
(tag.password ["center" "tile" "workspace special:password silent" "plugin:hyprbars:nobar"])
|
(t.password ["workspace special:password silent" "plugin:hyprbars:nobar"])
|
||||||
(tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "noinitialfocus" "pin" "size ${pip.w} ${pip.h}" "plugin:hyprbars:nobar"])
|
(t.pip ["float" "keepaspectratio" "move ${pip.x} ${pip.y}" "noinitialfocus" "pin" "size ${pip.w} ${pip.h}" "plugin:hyprbars:nobar"])
|
||||||
(tag.social ["tile"])
|
(t.social ["plugin:scroller:group social" "plugin:scroller:columnwidth onequarter" "plugin:scroller:windowheight onehalf"])
|
||||||
(tag.steam ["suppressevent activate activatefocus" "workspace special:steam silent" "plugin:hyprbars:nobar"])
|
(t.steam ["suppressevent activate activatefocus" "workspace special:steam silent" "plugin:hyprbars:nobar"])
|
||||||
(tag.terminal ["tile"])
|
(t.terminal ["plugin:scroller:group terminal"])
|
||||||
(tag.vm ["workspace special:vm silent"])
|
(t.vm ["workspace special:vm silent" "plugin:scroller:group vm"])
|
||||||
|
|
||||||
### Overrides
|
### Overrides
|
||||||
(class "dev\\.benz\\.walker" ["noanim" "noshadow" "pin" "stayfocused" "plugin:hyprbars:nobar"]) # Imitate layer
|
(class "org\\.gnome\\.NautilusPreviewer" ["float" "stayfocused" "plugin:hyprbars:nobar"]) # Sushi
|
||||||
(class "org\\.gnome\\.NautilusPreviewer" ["stayfocused" "plugin:hyprbars:nobar"]) # Sushi
|
|
||||||
(class "signal" ["tile"]) # Initial window in social group
|
|
||||||
(class "steam_app_1473350" ["workspace 0"]) # (the) Gnorp Apologue
|
(class "steam_app_1473350" ["workspace 0"]) # (the) Gnorp Apologue
|
||||||
(class "Tap Wizard 2\\.x86_64" ["workspace 0"])
|
(class "Tap Wizard 2\\.x86_64" ["workspace 0"])
|
||||||
(class "Xdg-desktop-portal-gtk" ["noborder" "noshadow" "plugin:hyprbars:nobar"])
|
|
||||||
|
|
||||||
(title "File Upload" ["center" "float" "size 1000 625"])
|
|
||||||
(title "Open" ["center" "float" "size 1000 625"])
|
|
||||||
(title "Save As" ["center" "float" "size 1000 625"])
|
|
||||||
|
|
||||||
#!! Expressions are not wrapped in ^$
|
#!! Expressions are not wrapped in ^$
|
||||||
(fields {
|
|
||||||
class = "^com\\.github\\.wwmm\\.easyeffects$";
|
|
||||||
title = "^Easy Effects$"; # Main window
|
|
||||||
} ["center" "float" "size 50% 50%"])
|
|
||||||
(fields {
|
(fields {
|
||||||
class = "^discord$";
|
class = "^discord$";
|
||||||
title = "^Discord Updater$"; # Update dialog
|
title = "^Discord Updater$"; # Update dialog
|
||||||
} ["float" "nofocus" "plugin:hyprbars:nobar"])
|
} ["float" "nofocus" "plugin:hyprbars:nobar"])
|
||||||
(fields {
|
|
||||||
class = "^lutris$";
|
|
||||||
title = "^Lutris$"; # Main window
|
|
||||||
} ["center" "float" "size 1000 500"])
|
|
||||||
(fields {
|
(fields {
|
||||||
class = "^org\\.gnome\\.Loupe$";
|
class = "^org\\.gnome\\.Loupe$";
|
||||||
title = "^wallpaper.png$";
|
title = "^wallpaper.png$";
|
||||||
} ["tile" "workspace special:wallpaper silent"])
|
} ["workspace special:wallpaper silent"])
|
||||||
(fields {
|
|
||||||
class = "^org\\.gnome\\.Nautilus$";
|
|
||||||
title = "^Home$"; # Main window
|
|
||||||
} ["size 1000 625"])
|
|
||||||
(fields {
|
|
||||||
class = "^org\\.gnome\\.Nautilus$";
|
|
||||||
title = "^New Folder$";
|
|
||||||
} ["plugin:hyprbars:nobar"])
|
|
||||||
(fields {
|
|
||||||
class = "^org\\.remmina\\.Remmina$";
|
|
||||||
title = "^Remmina.*$"; # Main windows
|
|
||||||
} ["center" "float" "size 1000 500"])
|
|
||||||
(fields {
|
(fields {
|
||||||
class = "^steam$";
|
class = "^steam$";
|
||||||
title = "^notificationtoasts$"; # Steam notifications
|
title = "^notificationtoasts$"; # Steam notifications
|
||||||
} ["float" "nofocus" "pin"])
|
} ["float" "nofocus" "pin"])
|
||||||
(fields {
|
|
||||||
class = "^steam$";
|
|
||||||
title = "^Steam$"; # Main window
|
|
||||||
} ["tile"])
|
|
||||||
(fields {
|
|
||||||
class = "^virt-manager$";
|
|
||||||
title = "^.+on QEMU/KVM$"; # VM window
|
|
||||||
} ["tile"])
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,13 +15,21 @@ in {
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
# https://wiki.hyprland.org/Configuring/Animations/
|
# https://wiki.hyprland.org/Configuring/Animations/
|
||||||
#?? animation = NAME, ONOFF, SPEED, CURVE, [STYLE]
|
#?? animation = NAME, ONOFF, SPEED, CURVE, STYLE
|
||||||
animation = [
|
animation = [
|
||||||
"global, 1, 4, default"
|
"global, 1, 3, easeOutCubic"
|
||||||
"specialWorkspace, 1, 4, default, fade"
|
"specialWorkspace, 1, 3, easeOutCubic, fade"
|
||||||
"windows, 1, 4, default, slide"
|
"windows, 1, 3, easeOutCubic, slide"
|
||||||
"workspaces, 1, 4, default, slidevert"
|
"workspaces, 1, 3, easeOutCubic, slidevert"
|
||||||
"layers, 0"
|
];
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Animations/#curves
|
||||||
|
# https://easings.net/
|
||||||
|
#?? bezier = NAME, X0, Y0, X1, Y1
|
||||||
|
bezier = [
|
||||||
|
"easeInOutCubic, 0.65, 0, 0.35, 1"
|
||||||
|
"easeOutCubic, 0.33, 1, 0.68, 1"
|
||||||
|
"easeOutSine, 0.61, 1, 0.88, 1"
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#binds
|
# https://wiki.hyprland.org/Configuring/Variables/#binds
|
||||||
|
@ -68,9 +76,9 @@ in {
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||||
general = {
|
general = {
|
||||||
"col.active_border" = "rgb(d33682)";
|
"col.active_border" = "rgb(d33682)";
|
||||||
"col.inactive_border" = "rgba(00000000)";
|
"col.inactive_border" = "rgba(d3368200)";
|
||||||
"col.nogroup_border_active" = "rgb(dc322f)";
|
"col.nogroup_border_active" = "rgb(dc322f)";
|
||||||
"col.nogroup_border" = "rgba(00000000)";
|
"col.nogroup_border" = "rgba(dc322f00)";
|
||||||
#// allow_tearing = true;
|
#// allow_tearing = true;
|
||||||
border_size = config.custom.border;
|
border_size = config.custom.border;
|
||||||
extend_border_grab_area = 5;
|
extend_border_grab_area = 5;
|
||||||
|
@ -95,18 +103,18 @@ in {
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#group
|
# https://wiki.hyprland.org/Configuring/Variables/#group
|
||||||
group = {
|
group = {
|
||||||
"col.border_active" = "rgb(6c71c4)";
|
"col.border_active" = "rgb(6c71c4)";
|
||||||
"col.border_inactive" = "rgba(00000000)";
|
"col.border_inactive" = "rgba(6c71c400)";
|
||||||
"col.border_locked_active" = "rgb(cb4b16)";
|
"col.border_locked_active" = "rgb(cb4b16)";
|
||||||
"col.border_locked_inactive" = "rgba(00000000)";
|
"col.border_locked_inactive" = "rgba(cb4b1600)";
|
||||||
#// auto_group = false;
|
#// auto_group = false;
|
||||||
#// insert_after_current = false;
|
#// insert_after_current = false;
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#groupbar
|
# https://wiki.hyprland.org/Configuring/Variables/#groupbar
|
||||||
groupbar = {
|
groupbar = {
|
||||||
"col.active" = "rgb(6c71c4)";
|
"col.active" = "rgb(6c71c4)";
|
||||||
"col.inactive" = "rgba(00000000)";
|
"col.inactive" = "rgba(6c71c400)";
|
||||||
"col.locked_active" = "rgb(cb4b16)";
|
"col.locked_active" = "rgb(cb4b16)";
|
||||||
"col.locked_inactive" = "rgba(00000000)";
|
"col.locked_inactive" = "rgba(cb4b1600)";
|
||||||
|
|
||||||
font_size =
|
font_size =
|
||||||
if config.custom.hidpi
|
if config.custom.hidpi
|
||||||
|
@ -131,7 +139,7 @@ in {
|
||||||
mouse_refocus = false; # Required to focus last window on close
|
mouse_refocus = false; # Required to focus last window on close
|
||||||
|
|
||||||
repeat_delay = 250;
|
repeat_delay = 250;
|
||||||
repeat_rate = 30;
|
repeat_rate = 40;
|
||||||
sensitivity = 0.5;
|
sensitivity = 0.5;
|
||||||
scroll_factor = 1.25;
|
scroll_factor = 1.25;
|
||||||
#// special_fallthrough = true; # Focus windows under special workspace
|
#// special_fallthrough = true; # Focus windows under special workspace
|
||||||
|
|
|
@ -136,7 +136,7 @@ in {
|
||||||
(key "N" "Mod" (spawn networkmanager_dmenu))
|
(key "N" "Mod" (spawn networkmanager_dmenu))
|
||||||
(key "O" "Mod" (spawn [loupe "/tmp/wallpaper.png"]))
|
(key "O" "Mod" (spawn [loupe "/tmp/wallpaper.png"]))
|
||||||
(key "P" "Ctrl+Alt" (spawn [pkill "bitwarden"]))
|
(key "P" "Ctrl+Alt" (spawn [pkill "bitwarden"]))
|
||||||
(key "P" "Mod" (spawn [bash "-c" config.custom.menus.vault.show]))
|
(key "P" "Mod" (spawn config.custom.menus.vault.show))
|
||||||
(key "P" "Mod+Shift" (spawn bitwarden))
|
(key "P" "Mod+Shift" (spawn bitwarden))
|
||||||
(key "Q" "Mod" close-window)
|
(key "Q" "Mod" close-window)
|
||||||
(key "R" "Mod" focus-window-or-workspace-down)
|
(key "R" "Mod" focus-window-or-workspace-down)
|
||||||
|
@ -156,9 +156,9 @@ in {
|
||||||
(key "T" "Mod" (spawn ghostty))
|
(key "T" "Mod" (spawn ghostty))
|
||||||
(key "Tab" "Mod" switch-focus-between-floating-and-tiling)
|
(key "Tab" "Mod" switch-focus-between-floating-and-tiling)
|
||||||
(key "Up" "Mod" (spawn [swayosd-client "--brightness" "raise"]))
|
(key "Up" "Mod" (spawn [swayosd-client "--brightness" "raise"]))
|
||||||
(key "V" "Mod" (spawn [bash "-c" config.custom.menus.clipboard.show]))
|
(key "V" "Mod" (spawn config.custom.menus.clipboard.show))
|
||||||
(key "V" "Mod+Ctrl" (spawn vm))
|
(key "V" "Mod+Ctrl" (spawn vm))
|
||||||
(key "V" "Mod+Shift" (spawn [bash "-c" config.custom.menus.clipboard.clear]))
|
(key "V" "Mod+Shift" (spawn config.custom.menus.clipboard.clear))
|
||||||
(key "W" "Mod" focus-window-or-workspace-up)
|
(key "W" "Mod" focus-window-or-workspace-up)
|
||||||
(key "W" "Mod+Shift" move-window-up-or-to-workspace-up)
|
(key "W" "Mod+Shift" move-window-up-or-to-workspace-up)
|
||||||
(key "WheelScrollDown" "Mod" focus-window-or-workspace-down)
|
(key "WheelScrollDown" "Mod" focus-window-or-workspace-down)
|
||||||
|
@ -183,9 +183,9 @@ in {
|
||||||
# TODO: Uncomment when fixed
|
# TODO: Uncomment when fixed
|
||||||
#// (key "Shift_L" "Mod" focus-workspace-previous)
|
#// (key "Shift_L" "Mod" focus-workspace-previous)
|
||||||
# TODO: Use "Super_L" when fixed
|
# TODO: Use "Super_L" when fixed
|
||||||
(key "Space" "Mod" (spawn [bash "-c" config.custom.menus.show]))
|
(key "Space" "Mod" (spawn config.custom.menus.default.show))
|
||||||
(key "Space" "Mod+Ctrl" (spawn [bash "-c" config.custom.menus.calculator.show]))
|
(key "Space" "Mod+Ctrl" (spawn config.custom.menus.calculator.show))
|
||||||
(key "Space" "Mod+Shift" (spawn [bash "-c" config.custom.menus.search.show]))
|
(key "Space" "Mod+Shift" (spawn config.custom.menus.search.show))
|
||||||
|
|
||||||
# Media keys
|
# Media keys
|
||||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||||
|
|
|
@ -30,7 +30,7 @@ in {
|
||||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputkeyboardrepeat-delay
|
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputkeyboardrepeat-delay
|
||||||
keyboard = {
|
keyboard = {
|
||||||
repeat-delay = 250;
|
repeat-delay = 250;
|
||||||
repeat-rate = 30;
|
repeat-rate = 40;
|
||||||
};
|
};
|
||||||
|
|
||||||
# BUG: Applies to trackball device, switch to "flat" when per-device configuration is supported
|
# BUG: Applies to trackball device, switch to "flat" when per-device configuration is supported
|
||||||
|
|
|
@ -8,7 +8,7 @@ with lib; let
|
||||||
in {
|
in {
|
||||||
options.custom.menus = {
|
options.custom.menus = {
|
||||||
enable = mkOption {default = config.custom.full;};
|
enable = mkOption {default = config.custom.full;};
|
||||||
show = mkOption {default = "";};
|
default.show = mkOption {default = "";};
|
||||||
calculator.show = mkOption {default = "";};
|
calculator.show = mkOption {default = "";};
|
||||||
|
|
||||||
clipboard = {
|
clipboard = {
|
||||||
|
|
|
@ -8,6 +8,7 @@ with lib; let
|
||||||
cfg = config.custom.menus.rofi;
|
cfg = config.custom.menus.rofi;
|
||||||
hm = config.home-manager.users.${config.custom.username};
|
hm = config.home-manager.users.${config.custom.username};
|
||||||
|
|
||||||
|
bash = getExe pkgs.bash;
|
||||||
cliphist = getExe hm.services.cliphist.package;
|
cliphist = getExe hm.services.cliphist.package;
|
||||||
echo = getExe' pkgs.coreutils "echo";
|
echo = getExe' pkgs.coreutils "echo";
|
||||||
networkmanager_dmenu = getExe pkgs.networkmanager_dmenu;
|
networkmanager_dmenu = getExe pkgs.networkmanager_dmenu;
|
||||||
|
@ -24,30 +25,21 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
custom = mkIf (config.custom.menu == "rofi") {
|
custom = mkIf (config.custom.menu == "rofi") {
|
||||||
menus = let
|
menus = mapAttrsRecursive (path: value: pkgs.writeShellScript (concatStringsSep "-" (["menus"] ++ path)) value) {
|
||||||
quit = "${pkill} --exact rofi";
|
default.show = "${pkill} --exact rofi || ${rofi} -show drun -show-icons";
|
||||||
in {
|
calculator.show = ''${pkill} --exact rofi || ${rofi} -show calc -no-history -calc-error-color '#dc322f' -calc-command "${echo} -n '{result}' | ${wl-copy}"'';
|
||||||
show = "${quit} || ${rofi} -show drun -show-icons";
|
|
||||||
|
|
||||||
calculator.show = concatStringsSep " " [
|
|
||||||
"${quit} || ${rofi}"
|
|
||||||
"-show calc"
|
|
||||||
"-no-history"
|
|
||||||
"-calc-error-color '#dc322f'"
|
|
||||||
''-calc-command "${echo} -n '{result}' | ${wl-copy}"''
|
|
||||||
];
|
|
||||||
|
|
||||||
clipboard = {
|
clipboard = {
|
||||||
show = "${quit} || ${rofi} -show clipboard -show-icons";
|
show = "${pkill} --exact rofi || ${rofi} -show clipboard -show-icons";
|
||||||
clear = "${cliphist} wipe && ${notify-send} '> cliphist' 'Clipboard cleared' --urgency low";
|
clear = "${cliphist} wipe && ${notify-send} '> cliphist' 'Clipboard cleared' --urgency low";
|
||||||
clear-silent = "${cliphist} wipe";
|
clear-silent = "${cliphist} wipe";
|
||||||
};
|
};
|
||||||
|
|
||||||
dmenu.show = "${quit} || ${rofi} -dmenu";
|
dmenu.show = "${pkill} --exact rofi || ${rofi} -dmenu";
|
||||||
emoji.show = "${quit} || ${rofimoji} --prompt ";
|
emoji.show = "${pkill} --exact rofi || ${rofimoji} --prompt ";
|
||||||
network.show = "${quit} || ${networkmanager_dmenu}";
|
network.show = "${pkill} --exact rofi || ${networkmanager_dmenu}";
|
||||||
search.show = "";
|
search.show = "";
|
||||||
vault.show = "${quit} || ${rofi-rbw} --prompt ";
|
vault.show = "${pkill} --exact rofi || ${rofi-rbw} --prompt ";
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
|
@ -19,9 +19,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
custom = {
|
custom = mkIf (config.custom.menu == "walker") {
|
||||||
menus = mkIf (config.custom.menu == "walker") {
|
menus = mapAttrsRecursive (path: value: pkgs.writeShellScript (concatStringsSep "-" (["menus"] ++ path)) value) {
|
||||||
show = walker;
|
default.show = walker;
|
||||||
|
|
||||||
clipboard = {
|
clipboard = {
|
||||||
show = "${walker} --modules clipboard";
|
show = "${walker} --modules clipboard";
|
||||||
|
|
|
@ -132,6 +132,29 @@ in {
|
||||||
gsw = "git switch";
|
gsw = "git switch";
|
||||||
gy = "git cherrypick";
|
gy = "git cherrypick";
|
||||||
|
|
||||||
|
hy = "hyprctl";
|
||||||
|
hyc = "hyprctl clients";
|
||||||
|
hycj = "hyprctl -j clients";
|
||||||
|
hyd = "hyprctl dispatch";
|
||||||
|
hydj = "hyprctl -j dispatch";
|
||||||
|
hydv = "hyprctl devices";
|
||||||
|
hydvj = "hyprctl -j devices";
|
||||||
|
hyj = "hyprctl -j";
|
||||||
|
hyk = "hyprctl keyword";
|
||||||
|
hykj = "hyprctl -j keyword";
|
||||||
|
hyl = "hyprctl rollinglog";
|
||||||
|
hylj = "hyprctl -j rollinglog";
|
||||||
|
hym = "hyprctl monitors";
|
||||||
|
hymj = "hyprctl -j monitors";
|
||||||
|
hyo = "hyprctl output";
|
||||||
|
hyoj = "hyprctl -j output";
|
||||||
|
hyr = "hyprctl reload";
|
||||||
|
hyrj = "hyprctl -j reload";
|
||||||
|
hys = "hyprctl setprop";
|
||||||
|
hysj = "hyprctl -j setprop";
|
||||||
|
hyv = "hyprctl version";
|
||||||
|
hyvj = "hyprctl -j version";
|
||||||
|
|
||||||
jc = "journalctl";
|
jc = "journalctl";
|
||||||
jcei = "journalctl --pager-end --identifier";
|
jcei = "journalctl --pager-end --identifier";
|
||||||
jcfi = "journalctl --follow --identifier";
|
jcfi = "journalctl --follow --identifier";
|
||||||
|
@ -171,15 +194,37 @@ in {
|
||||||
nsn = "nix shell nixpkgs#%";
|
nsn = "nix shell nixpkgs#%";
|
||||||
nt = "nix store";
|
nt = "nix store";
|
||||||
|
|
||||||
no = "nixos";
|
ni = "niri";
|
||||||
nob = "nixos build";
|
nim = "niri msg";
|
||||||
nobb = "nixos build boot";
|
nima = "niri msg action";
|
||||||
nobs = "nixos build switch";
|
nimaj = "niri msg --json action";
|
||||||
nobt = "nixos build test";
|
nimfo = "niri msg focused-output";
|
||||||
nod = "nixos diff";
|
nimfoj = "niri msg --json focused-output";
|
||||||
nog = "nixos generate";
|
nimfw = "niri msg focused-window";
|
||||||
nol = "nixos list";
|
nimfwj = "niri msg --json focused-window";
|
||||||
nor = "nixos repl";
|
nimj = "niri msg --json";
|
||||||
|
niml = "niri msg layers";
|
||||||
|
nimlj = "niri msg --json layers";
|
||||||
|
nimo = "niri msg output";
|
||||||
|
nimoj = "niri msg --json output";
|
||||||
|
nimos = "niri msg outputs";
|
||||||
|
nimosj = "niri msg --json outputs";
|
||||||
|
nimv = "niri msg version";
|
||||||
|
nimvj = "niri msg --json version";
|
||||||
|
nimw = "niri msg windows";
|
||||||
|
nimwj = "niri msg --json windows";
|
||||||
|
nimwk = "niri msg workspaces";
|
||||||
|
nimwkj = "niri msg --json workspaces";
|
||||||
|
|
||||||
|
os = "nixos";
|
||||||
|
osb = "nixos build";
|
||||||
|
osbb = "nixos build boot";
|
||||||
|
osbs = "nixos build switch";
|
||||||
|
osbt = "nixos build test";
|
||||||
|
osd = "nixos diff";
|
||||||
|
osg = "nixos generate";
|
||||||
|
osl = "nixos list";
|
||||||
|
osr = "nixos repl";
|
||||||
|
|
||||||
sc = "systemctl";
|
sc = "systemctl";
|
||||||
scp = "sudo systemctl poweroff";
|
scp = "sudo systemctl poweroff";
|
||||||
|
@ -244,8 +289,8 @@ in {
|
||||||
wst = "waydroid session stop";
|
wst = "waydroid session stop";
|
||||||
wu = "sudo waydroid upgrade";
|
wu = "sudo waydroid upgrade";
|
||||||
|
|
||||||
zt = "sudo zerotier-cli";
|
z = "sudo zerotier-cli";
|
||||||
ztip = "sudo zerotier-cli get $(sudo zerotier-cli -j listnetworks | jq -r .[-1].id) ip";
|
zi = "sudo zerotier-cli get $(sudo zerotier-cli -j listnetworks | jq -r .[-1].id) ip";
|
||||||
};
|
};
|
||||||
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
|
|
|
@ -10,33 +10,37 @@ with lib; let
|
||||||
|
|
||||||
rofi = getExe hm.programs.rofi.package;
|
rofi = getExe hm.programs.rofi.package;
|
||||||
in {
|
in {
|
||||||
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
options.custom.programs.networkmanager-dmenu = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# https://github.com/firecat53/networkmanager-dmenu
|
# https://github.com/firecat53/networkmanager-dmenu
|
||||||
environment.systemPackages = [pkgs.networkmanager_dmenu];
|
environment.systemPackages = [pkgs.networkmanager_dmenu];
|
||||||
|
|
||||||
home-manager.users.${config.custom.username} = {
|
home-manager.sharedModules = [
|
||||||
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
{
|
||||||
#!! Option not available, files written directly
|
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
||||||
xdg.configFile."networkmanager-dmenu/config.ini".text = let
|
xdg.configFile = {
|
||||||
menu =
|
"networkmanager-dmenu/config.ini".text = let
|
||||||
if config.custom.menu == "rofi"
|
menu =
|
||||||
then "${rofi} -dmenu -p "
|
if config.custom.menu == "rofi"
|
||||||
else "";
|
then "${rofi} -dmenu -p "
|
||||||
in ''
|
else "";
|
||||||
[dmenu]
|
in ''
|
||||||
compact = true
|
[dmenu]
|
||||||
dmenu_command = ${menu}
|
compact = true
|
||||||
list_saved = true
|
dmenu_command = ${menu}
|
||||||
active_chars =
|
active_chars =
|
||||||
highlight = true
|
highlight = true
|
||||||
wifi_icons =
|
wifi_icons =
|
||||||
format = {icon} {name}
|
format = {icon} {name}
|
||||||
|
|
||||||
[dmenu_passphrase]
|
[dmenu_passphrase]
|
||||||
obscure = true
|
obscure = true
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
17
options/custom/programs/uwsm.nix
Normal file
17
options/custom/programs/uwsm.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.custom.programs.uwsm;
|
||||||
|
in {
|
||||||
|
options.custom.programs.uwsm = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# https://github.com/Vladimir-csp/uwsm
|
||||||
|
programs.uwsm.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -47,7 +47,7 @@ if [[ "$current_workspace" == "$workspace" ]]; then
|
||||||
# HACK: Move to current workspace before pinning, otherwise some windows freeze
|
# HACK: Move to current workspace before pinning, otherwise some windows freeze
|
||||||
# https://github.com/hyprwm/Hyprland/issues/7609
|
# https://github.com/hyprwm/Hyprland/issues/7609
|
||||||
# https://github.com/hyprwm/Hyprland/issues/7191
|
# https://github.com/hyprwm/Hyprland/issues/7191
|
||||||
hyprctl dispatch movetoworkspacesilent "0,$type:$expression"
|
#// hyprctl dispatch movetoworkspacesilent "0,$type:$expression"
|
||||||
|
|
||||||
hyprctl dispatch pin "$type:$expression" # Pin
|
hyprctl dispatch pin "$type:$expression" # Pin
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue