1
1
Fork 0

Compare commits

..

No commits in common. "786c09076733452b07f7dcd583a3188281f6c83e" and "ff341930c9955a4262a1493ff6c4038427af27df" have entirely different histories.

16 changed files with 387 additions and 492 deletions

View file

@ -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 = 3;}; border = mkOption {default = 2;};
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;};

View file

@ -17,6 +17,9 @@ 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;
@ -31,22 +34,16 @@ 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 = { options.custom.desktops.hyprland.binds.enable = mkOption {default = false;};
enable = mkOption {default = false;};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.sharedModules = [ home-manager.users.${config.custom.username} = {
{
wayland.windowManager.hyprland.settings = let wayland.windowManager.hyprland.settings = let
# Reverse mods and key for alphabetical sorting # Reverse mods and key for alphabetical sorting
#?? key <"KEY"> <"MODS"|null> <"DISPATCHER"> <"PARAMS"|null> #?? key <"KEY"> <"MODS"|null> <"DISPATCHER"> <"PARAMS"|null>
@ -57,24 +54,17 @@ in {
}, ${key}, ${dispatcher}${ }, ${key}, ${dispatcher}${
if (isNull params) if (isNull params)
then "" then ""
else ", ${ else ", ${params}"
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"
#!! Must be valid GTK class
# https://github.com/ghostty-org/ghostty/issues/3336
"${ghostty} --class=gtk.dropdown"
]; ];
pip-switch = with config.custom; pip-switch = with config.custom;
@ -139,9 +129,9 @@ in {
(key "Backspace" "Super" "scroller:alignwindow" "middle") (key "Backspace" "Super" "scroller:alignwindow" "middle")
(key "Backspace" "Super+Shift" "scroller:fitsize" "visible") (key "Backspace" "Super+Shift" "scroller:fitsize" "visible")
(key "Equal" "Super+Shift" "exec" "${zoom} +0.1") (key "Equal" "Super+Shift" "exec" "${zoom} +0.1")
(key "Escape" "Super" "pin" null) (key "Escape" "Super" "togglefloating" null)
(key "Escape" "Super+Alt" "exec" "lifx state --color red") (key "Escape" "Super+Alt" "exec" "lifx state --color red")
(key "Escape" "Super+Shift" "togglefloating" null) (key "Escape" "Super+Shift" "scroller:pin" null)
(key "Left" "Super+Ctrl+Shift" "exec" "${left} --scroll kensington-orbit-wireless-tb-mouse") (key "Left" "Super+Ctrl+Shift" "exec" "${left} --scroll kensington-orbit-wireless-tb-mouse")
(key "Minus" "Super+Shift" "exec" "${zoom} -0.1") (key "Minus" "Super+Shift" "exec" "${zoom} -0.1")
(key "Return" "Super" "fullscreen" "1") # Maximize (key "Return" "Super" "fullscreen" "1") # Maximize
@ -193,7 +183,7 @@ in {
(key "C" "Super+Shift" "exec" config.custom.menus.clipboard.clear) (key "C" "Super+Shift" "exec" config.custom.menus.clipboard.clear)
(key "D" "Super" "togglespecialworkspace" "android") (key "D" "Super" "togglespecialworkspace" "android")
(key "D" "Super+Shift" "movetoworkspacesilent" "special:android") (key "D" "Super+Shift" "movetoworkspacesilent" "special:android")
(key "E" "Super" "exec" "${gnome-text-editor} --new-window") (key "E" "Super" "exec" gnome-text-editor)
(key "F" "Super" "exec" "${nautilus} --new-window") (key "F" "Super" "exec" "${nautilus} --new-window")
(key "G" "Super" "togglespecialworkspace" "game") (key "G" "Super" "togglespecialworkspace" "game")
(key "G" "Super+Ctrl" "exec" steam) (key "G" "Super+Ctrl" "exec" steam)
@ -204,19 +194,19 @@ in {
(key "M" "Super+Shift" "movetoworkspacesilent" "special:music") (key "M" "Super+Shift" "movetoworkspacesilent" "special:music")
(key "O" "Super" "exec" "${hyprpicker} --autocopy") (key "O" "Super" "exec" "${hyprpicker} --autocopy")
(key "O" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb") (key "O" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
(key "P" "Ctrl+Alt" "exec" "${pkill} --exact 1password") (key "P" "Ctrl+Alt" "exec" "${pkill} --full --exact 1password")
(key "P" "Super" "togglespecialworkspace" "password") (key "P" "Super" "togglespecialworkspace" "password")
(key "P" "Super+Shift" "movetoworkspacesilent" "special:password") (key "P" "Super+Shift" "movetoworkspacesilent" "special:password")
(key "Q" "Ctrl+Alt" "exec" "${hyprctl} kill") (key "Q" "Ctrl+Alt" "exec" "${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)")
(key "Q" "Super" "killactive" null) (key "Q" "Super" "killactive" null)
(key "R" "Super" "scroller:movefocus" "d") (key "R" "Super" "scroller:movefocus" "d")
(key "R" "Super+Ctrl" "scroller:alignwindow" "down") (key "R" "Super+Ctrl" "scroller:alignwindow" "down")
(key "R" "Super+Shift" "scroller:movewindow" "d") (key "R" "Super+Shift" "scroller:movewindow" "d")
(key "S" "Ctrl+Alt" "exec" "${pkill} --exact steam") (key "S" "Ctrl+Alt" "exec" "${pkill} --full --exact steam")
(key "S" "Super" "scroller:movefocus" "r") (key "S" "Super" "scroller:movefocus" "r")
(key "S" "Super+Ctrl" "scroller:alignwindow" "right") (key "S" "Super+Ctrl" "scroller:alignwindow" "right")
(key "S" "Super+Shift" "scroller:movewindow" "r") (key "S" "Super+Shift" "scroller:movewindow" "r")
(key "T" "Ctrl+Alt" "exec" "${pkill} --exact ghostty") (key "T" "Ctrl+Alt" "exec" "${pkill} --full --exact ghostty")
(key "T" "Super" "togglespecialworkspace" "terminal") (key "T" "Super" "togglespecialworkspace" "terminal")
(key "T" "Super+Ctrl" "exec" ghostty) (key "T" "Super+Ctrl" "exec" ghostty)
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal") (key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
@ -227,10 +217,8 @@ in {
(key "W" "Super" "scroller:movefocus" "u") (key "W" "Super" "scroller:movefocus" "u")
(key "W" "Super+Ctrl" "scroller:alignwindow" "up") (key "W" "Super+Ctrl" "scroller:alignwindow" "up")
(key "W" "Super+Shift" "scroller:movewindow" "u") (key "W" "Super+Shift" "scroller:movewindow" "u")
(key "X" "Super" "scroller:cyclewidth" "next") (key "X" "Super" "scroller:cyclesize" "next")
(key "X" "Super+Shift" "scroller:cycleheight" "next") (key "Z" "Super" "scroller:cyclesize" "previous")
(key "Z" "Super" "scroller:cyclewidth" "previous")
(key "Z" "Super+Shift" "scroller:cycleheight" "previous")
]; ];
# Lockscreen binds # Lockscreen binds
@ -259,18 +247,14 @@ in {
(key "Alt_L" "Super+Alt+Shift" "movetoworkspacesilent" "special:wallpaper") (key "Alt_L" "Super+Alt+Shift" "movetoworkspacesilent" "special:wallpaper")
(key "Control_L" "Super+Ctrl" "scroller:admitwindow" null) (key "Control_L" "Super+Ctrl" "scroller:admitwindow" null)
(key "Control_L" "Super+Ctrl+Shift" "scroller:expelwindow" null) (key "Control_L" "Super+Ctrl+Shift" "scroller:expelwindow" null)
(key "Shift_L" "Super+Ctrl+Shift" "scroller:setmode" "row")
# BUG: Causes Hyprland to crash when floating the scroller:pin window (key "Shift_L" "Super+Shift" "scroller:setmode" "column")
(key "Shift_L" "Super+Shift" "scroller:pin" null) (key "Super_L" "Super" "exec" config.custom.menus.show)
(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+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+Ctrl+Shift" "exec" config.custom.menus.network.show)
(key "Super_L" "Super+Shift" "exec" config.custom.menus.search.show) (key "Super_L" "Super+Shift" "exec" config.custom.menus.search.show)
]; ];
}; };
} };
];
}; };
} }

View file

@ -13,8 +13,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom = { custom.desktops = mkIf config.custom.full {
desktops = mkIf config.custom.full {
hyprland = { hyprland = {
binds.enable = true; binds.enable = true;
keywords.enable = true; keywords.enable = true;
@ -30,30 +29,17 @@ in {
}; };
}; };
programs = {
uwsm.enable = true;
};
};
# https://wiki.hyprland.org # https://wiki.hyprland.org
# https://github.com/hyprwm/Hyprland # https://github.com/hyprwm/Hyprland
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 = [

View file

@ -9,18 +9,13 @@ 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;};
@ -50,7 +45,7 @@ in {
left_handed = true; left_handed = true;
middle_button_emulation = true; middle_button_emulation = true;
natural_scroll = true; natural_scroll = true;
sensitivity = -0.7; sensitivity = -0.6;
}) })
(devices ["logitech-m570"] { (devices ["logitech-m570"] {
@ -87,30 +82,31 @@ 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 = [
(command "${left} --init --scroll kensington-orbit-wireless-tb-mouse") # Enforce left-pawed state "${left} --init --scroll kensington-orbit-wireless-tb-mouse" # Enforce left-pawed state
]; ];
# https://wiki.hyprland.org/Configuring/Keywords/#executing
exec-once = exec-once =
[ [
(command sway-audio-idle-inhibit) # Inhibit idle while audio is playing sway-audio-idle-inhibit # Inhibit idle while audio is playing
(command "${audio} --init") # Enforce audio profile state "${audio} --init" # Enforce audio profile state
(command config.custom.menus.clipboard.clear-silent) # Clear clipboard history 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] ${command loupe}" "[workspace special:hidden silent] ${loupe}"
"[workspace special:hidden silent] ${command nautilus}" "[workspace special:hidden silent] ${nautilus}"
] ]
++ optionals config.custom.wallpaper [ ++ optionals config.custom.wallpaper [
(command wallpaper) "wallpaper"
] ]
++ optionals config.custom.settings.vm.passthrough.blacklist [
# HACK: Delay driver initialization to work around reset issues # 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}") ++ optionals config.custom.settings.vm.passthrough.blacklist [
"${virsh} list | ${grep} ${config.custom.settings.vm.passthrough.guest} || sudo ${modprobe} ${config.custom.settings.vm.passthrough.driver}"
]; ];
}; };
} }

View file

@ -6,13 +6,8 @@
}: }:
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;};
@ -52,27 +47,19 @@ 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,, ${command "${hyprctl} dispatch killactive"}" # Close "rgb(dc322f), 16,, ${hyprctl} dispatch killactive" # Close
"rgb(d33682), 16,, ${command "${hyprctl} dispatch fullscreen 1"}" # Maximize "rgb(d33682), 16,, ${hyprctl} dispatch fullscreen 1" # Maximize
"rgb(6c71c4), 16,, ${command minimize}" # Minimize "rgb(6c71c4), 16,, 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_default_width = #// column_widths = "onethird onehalf twothirds one";
if config.custom.ultrawide #// window_heights = "onethird onehalf twothirds one";
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;
}; };

View file

@ -9,17 +9,15 @@ 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;};
@ -32,21 +30,19 @@ 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:${command "${launch} --workspace special:android --empty ${waydroid} app launch com.YoStarEN.Arknights"}" "special:android, on-created-empty:${launch} --workspace special:android --empty ${waydroid} app launch com.YoStarEN.Arknights"
"special:game, on-created-empty:${command steam}" "special:game, on-created-empty:${steam}"
"special:music, on-created-empty:${command youtube-music}" "special:music, on-created-empty:${youtube-music}"
"special:office, on-created-empty:${command "${launch} --workspace special:office --empty --tile -- ${libreoffice}"}" "special:office, on-created-empty:${launch} --workspace special:office --empty --tile -- ${libreoffice}"
"special:password, on-created-empty:${command "${launch} --workspace special:password --empty ${_1password}"}" "special:password, on-created-empty:${launch} --workspace special:password --empty ${_1password}"
"special:terminal, on-created-empty:${command ghostty}" "special:terminal, on-created-empty:${ghostty}"
"special:vm, on-created-empty:${command "${launch} --workspace special:vm --empty ${virt-manager}"}" "special:vm, on-created-empty:${launch} --workspace special:vm --empty ${virt-manager}"
"special:wallpaper, on-created-empty:${command "${loupe} /tmp/wallpaper.png"}" "special:wallpaper, on-created-empty:${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
@ -54,7 +50,6 @@ 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)
@ -65,30 +60,27 @@ 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 3.0 / 8.0 # threeeighths then 0.5 # 50%
else 1.0 # one else 1
) )
+ ( + (
if ultrawide if ultrawide
then - gaps_in * 2 then - gap / 2 * 2 # Center layout padding between windows
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)
@ -99,15 +91,13 @@ in {
then - border # Cause unknown then - border # Cause unknown
else 0 else 0
)); ));
w = "600"; w = "600";
h = tr (height / scale * 0.75); h = tr (height / scale * 0.75); # 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)
@ -118,29 +108,27 @@ 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 3.0 / 8.0 # threeeighths then 0.5 # 50%
else 1.0 # one else 1
) )
+ ( + (
if ultrawide if ultrawide
then - gaps_in * 2 then - gap / 2 * 2 # Center layout padding between windows
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 then 0.2 # 20%
else 0.3 else 0.3 # 30%
)); ));
}; };
@ -148,20 +136,7 @@ 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
}; };
@ -194,12 +169,11 @@ 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
t = { tag = {
android = rules: [ android = rules: [
(class "[Ww]aydroid.*" rules) (class "[Ww]aydroid.*" rules)
]; ];
@ -217,7 +191,7 @@ in {
]; ];
dropdown = rules: [ dropdown = rules: [
(class ".*dropdown" rules) (class "dropdown" rules)
]; ];
editor = rules: [ editor = rules: [
@ -242,7 +216,6 @@ 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)
@ -268,7 +241,6 @@ 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: [
@ -293,47 +265,83 @@ 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(fdf6e3) rgb(fdf6e300)" "noborder 0" "noshadow"]) (pinned true ["bordercolor rgb(073642) rgb(073642)"])
(tag "scroller:pinned" ["bordercolor rgb(fdf6e3) rgb(fdf6e300)"]) (tag.android ["idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android silent" "plugin:hyprbars:nobar"])
(tag.browser ["tile" "workspace 1"])
(t.android ["float" "idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android silent" "plugin:hyprbars:nobar"]) (tag.clipboard ["move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused" "plugin:hyprbars:nobar"])
(t.browser ["workspace 1"]) (tag.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}" "plugin:hyprbars:nobar"])
(t.clipboard ["float" "move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused" "plugin:hyprbars:nobar"]) (tag.editor ["tile"])
(t.dropdown ["float" "move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}" "plugin:hyprbars:nobar"]) (tag.files ["center"])
(t.game ["focusonactivate" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game" "plugin:hyprbars:nobar"]) (tag.game ["focusonactivate" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game" "plugin:hyprbars:nobar"])
(t.media ["center" "float" "keepaspectratio" "size <90% <90%"]) (tag.media ["center" "keepaspectratio" "size <90% <90%"])
(t.music ["workspace special:music silent"]) (tag.music ["tile" "workspace special:music silent"])
(t.office ["workspace special:office silent" "plugin:scroller:group office"]) (tag.office ["tile" "workspace special:office silent"])
(t.password ["workspace special:password silent" "plugin:hyprbars:nobar"]) (tag.password ["center" "tile" "workspace special:password silent" "plugin:hyprbars:nobar"])
(t.pip ["float" "keepaspectratio" "move ${pip.x} ${pip.y}" "noinitialfocus" "pin" "size ${pip.w} ${pip.h}" "plugin:hyprbars:nobar"]) (tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "noinitialfocus" "pin" "size ${pip.w} ${pip.h}" "plugin:hyprbars:nobar"])
(t.social ["plugin:scroller:group social" "plugin:scroller:columnwidth onequarter" "plugin:scroller:windowheight onehalf"]) (tag.social ["tile"])
(t.steam ["suppressevent activate activatefocus" "workspace special:steam silent" "plugin:hyprbars:nobar"]) (tag.steam ["suppressevent activate activatefocus" "workspace special:steam silent" "plugin:hyprbars:nobar"])
(t.terminal ["plugin:scroller:group terminal"]) (tag.terminal ["tile"])
(t.vm ["workspace special:vm silent" "plugin:scroller:group vm"]) (tag.vm ["workspace special:vm silent"])
### Overrides ### Overrides
(class "org\\.gnome\\.NautilusPreviewer" ["float" "stayfocused" "plugin:hyprbars:nobar"]) # Sushi (class "dev\\.benz\\.walker" ["noanim" "noshadow" "pin" "stayfocused" "plugin:hyprbars:nobar"]) # Imitate layer
(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$";
} ["workspace special:wallpaper silent"]) } ["tile" "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"])
]; ];
}; };
}; };

View file

@ -15,21 +15,13 @@ 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, 3, easeOutCubic" "global, 1, 4, default"
"specialWorkspace, 1, 3, easeOutCubic, fade" "specialWorkspace, 1, 4, default, fade"
"windows, 1, 3, easeOutCubic, slide" "windows, 1, 4, default, slide"
"workspaces, 1, 3, easeOutCubic, slidevert" "workspaces, 1, 4, default, 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
@ -76,9 +68,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(d3368200)"; "col.inactive_border" = "rgba(00000000)";
"col.nogroup_border_active" = "rgb(dc322f)"; "col.nogroup_border_active" = "rgb(dc322f)";
"col.nogroup_border" = "rgba(dc322f00)"; "col.nogroup_border" = "rgba(00000000)";
#// 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;
@ -103,18 +95,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(6c71c400)"; "col.border_inactive" = "rgba(00000000)";
"col.border_locked_active" = "rgb(cb4b16)"; "col.border_locked_active" = "rgb(cb4b16)";
"col.border_locked_inactive" = "rgba(cb4b1600)"; "col.border_locked_inactive" = "rgba(00000000)";
#// 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(6c71c400)"; "col.inactive" = "rgba(00000000)";
"col.locked_active" = "rgb(cb4b16)"; "col.locked_active" = "rgb(cb4b16)";
"col.locked_inactive" = "rgba(cb4b1600)"; "col.locked_inactive" = "rgba(00000000)";
font_size = font_size =
if config.custom.hidpi if config.custom.hidpi
@ -139,7 +131,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 = 40; repeat_rate = 30;
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

View file

@ -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 config.custom.menus.vault.show)) (key "P" "Mod" (spawn [bash "-c" 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 config.custom.menus.clipboard.show)) (key "V" "Mod" (spawn [bash "-c" config.custom.menus.clipboard.show]))
(key "V" "Mod+Ctrl" (spawn vm)) (key "V" "Mod+Ctrl" (spawn vm))
(key "V" "Mod+Shift" (spawn config.custom.menus.clipboard.clear)) (key "V" "Mod+Shift" (spawn [bash "-c" 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 config.custom.menus.default.show)) (key "Space" "Mod" (spawn [bash "-c" config.custom.menus.show]))
(key "Space" "Mod+Ctrl" (spawn config.custom.menus.calculator.show)) (key "Space" "Mod+Ctrl" (spawn [bash "-c" config.custom.menus.calculator.show]))
(key "Space" "Mod+Shift" (spawn config.custom.menus.search.show)) (key "Space" "Mod+Shift" (spawn [bash "-c" 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

View file

@ -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 = 40; repeat-rate = 30;
}; };
# 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

View file

@ -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;};
default.show = mkOption {default = "";}; show = mkOption {default = "";};
calculator.show = mkOption {default = "";}; calculator.show = mkOption {default = "";};
clipboard = { clipboard = {

View file

@ -8,7 +8,6 @@ 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;
@ -25,21 +24,30 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom = mkIf (config.custom.menu == "rofi") { custom = mkIf (config.custom.menu == "rofi") {
menus = mapAttrsRecursive (path: value: pkgs.writeShellScript (concatStringsSep "-" (["menus"] ++ path)) value) { menus = let
default.show = "${pkill} --exact rofi || ${rofi} -show drun -show-icons"; quit = "${pkill} --exact rofi";
calculator.show = ''${pkill} --exact rofi || ${rofi} -show calc -no-history -calc-error-color '#dc322f' -calc-command "${echo} -n '{result}' | ${wl-copy}"''; in {
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 = "${pkill} --exact rofi || ${rofi} -show clipboard -show-icons"; show = "${quit} || ${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 = "${pkill} --exact rofi || ${rofi} -dmenu"; dmenu.show = "${quit} || ${rofi} -dmenu";
emoji.show = "${pkill} --exact rofi || ${rofimoji} --prompt 󰱰"; emoji.show = "${quit} || ${rofimoji} --prompt 󰱰";
network.show = "${pkill} --exact rofi || ${networkmanager_dmenu}"; network.show = "${quit} || ${networkmanager_dmenu}";
search.show = ""; search.show = "";
vault.show = "${pkill} --exact rofi || ${rofi-rbw} --prompt 󰌾"; vault.show = "${quit} || ${rofi-rbw} --prompt 󰌾";
}; };
services = { services = {

View file

@ -19,9 +19,9 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom = mkIf (config.custom.menu == "walker") { custom = {
menus = mapAttrsRecursive (path: value: pkgs.writeShellScript (concatStringsSep "-" (["menus"] ++ path)) value) { menus = mkIf (config.custom.menu == "walker") {
default.show = walker; show = walker;
clipboard = { clipboard = {
show = "${walker} --modules clipboard"; show = "${walker} --modules clipboard";

View file

@ -132,29 +132,6 @@ 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";
@ -194,37 +171,15 @@ in {
nsn = "nix shell nixpkgs#%"; nsn = "nix shell nixpkgs#%";
nt = "nix store"; nt = "nix store";
ni = "niri"; no = "nixos";
nim = "niri msg"; nob = "nixos build";
nima = "niri msg action"; nobb = "nixos build boot";
nimaj = "niri msg --json action"; nobs = "nixos build switch";
nimfo = "niri msg focused-output"; nobt = "nixos build test";
nimfoj = "niri msg --json focused-output"; nod = "nixos diff";
nimfw = "niri msg focused-window"; nog = "nixos generate";
nimfwj = "niri msg --json focused-window"; nol = "nixos list";
nimj = "niri msg --json"; nor = "nixos repl";
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";
@ -289,8 +244,8 @@ in {
wst = "waydroid session stop"; wst = "waydroid session stop";
wu = "sudo waydroid upgrade"; wu = "sudo waydroid upgrade";
z = "sudo zerotier-cli"; zt = "sudo zerotier-cli";
zi = "sudo zerotier-cli get $(sudo zerotier-cli -j listnetworks | jq -r .[-1].id) ip"; ztip = "sudo zerotier-cli get $(sudo zerotier-cli -j listnetworks | jq -r .[-1].id) ip";
}; };
interactiveShellInit = '' interactiveShellInit = ''

View file

@ -10,19 +10,16 @@ with lib; let
rofi = getExe hm.programs.rofi.package; rofi = getExe hm.programs.rofi.package;
in { in {
options.custom.programs.networkmanager-dmenu = { options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
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.sharedModules = [ home-manager.users.${config.custom.username} = {
{
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example # https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
xdg.configFile = { #!! Option not available, files written directly
"networkmanager-dmenu/config.ini".text = let xdg.configFile."networkmanager-dmenu/config.ini".text = let
menu = menu =
if config.custom.menu == "rofi" if config.custom.menu == "rofi"
then "${rofi} -dmenu -p 󰛳" then "${rofi} -dmenu -p 󰛳"
@ -31,6 +28,7 @@ in {
[dmenu] [dmenu]
compact = true compact = true
dmenu_command = ${menu} dmenu_command = ${menu}
list_saved = true
active_chars = active_chars =
highlight = true highlight = true
wifi_icons = 󰤯󰤟󰤢󰤥󰤨 wifi_icons = 󰤯󰤟󰤢󰤥󰤨
@ -40,7 +38,5 @@ in {
obscure = true obscure = true
''; '';
}; };
}
];
}; };
} }

View file

@ -1,17 +0,0 @@
{
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;
};
}

View file

@ -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