mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-17 20:52:09 -08:00
feat: add new advanced keybindings
This commit is contained in:
parent
eb9cd1fc41
commit
a2b711da49
6 changed files with 357 additions and 310 deletions
144
hm/modules/linux/desktop-environment/hyprland/binds.nix
Normal file
144
hm/modules/linux/desktop-environment/hyprland/binds.nix
Normal file
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
|
||||
bind =
|
||||
[
|
||||
# Window actions
|
||||
"$mod, Q, killactive"
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, V, togglesplit"
|
||||
"$mod, Return, fullscreen"
|
||||
|
||||
# Move around
|
||||
"$mod, $Left, movefocus, l"
|
||||
"$mod, $Right, movefocus, r"
|
||||
"$mod, $Up, movefocus, u"
|
||||
"$mod, $Down, movefocus, d"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
# Move windows around
|
||||
"$mod+Shift, $Left, movewindow, l"
|
||||
"$mod+Shift, $Right, movewindow, r"
|
||||
"$mod+Shift, $Up, movewindow, u"
|
||||
"$mod+Shift, $Down, movewindow, d"
|
||||
|
||||
"$mod+Ctrl, bracketright, movetoworkspace, r+1"
|
||||
"$mod+Ctrl, bracketleft, movetoworkspace, r-1"
|
||||
|
||||
"$mod, bracketright, workspace, r+1"
|
||||
"$mod, bracketleft, workspace, r-1"
|
||||
|
||||
# Utilities
|
||||
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi application launcher
|
||||
"$mod, X, exec, pkill -x rofi || rofi -show window" # Run rofi window switcher
|
||||
|
||||
''$mod+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
||||
|
||||
"$mod, Backspace, exec, pkill -x wlogout || wlogout" # show logout menu
|
||||
|
||||
"$mod, Z, exec, loginctl lock-session"
|
||||
|
||||
# Media controls
|
||||
",XF86AudioMute, exec, ${pkgs.pamixer}/bin/pamixer -t"
|
||||
",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox play-pause"
|
||||
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox next"
|
||||
",XF86AudioRewind, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox previous"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mod+Shift, 1, movetoworkspace, 1"
|
||||
"$mod+Shift, 2, movetoworkspace, 2"
|
||||
"$mod+Shift, 3, movetoworkspace, 3"
|
||||
"$mod+Shift, 4, movetoworkspace, 4"
|
||||
"$mod+Shift, 5, movetoworkspace, 5"
|
||||
"$mod+Shift, 6, movetoworkspace, 6"
|
||||
"$mod+Shift, 7, movetoworkspace, 7"
|
||||
"$mod+Shift, 8, movetoworkspace, 8"
|
||||
"$mod+Shift, 9, movetoworkspace, 9"
|
||||
"$mod+Shift, 0, movetoworkspace, 10"
|
||||
]
|
||||
++ (lib.optionals (!cfg.useAdvancedBindings) [
|
||||
"$mod, S, togglespecialworkspace"
|
||||
"$mod+Alt, S, movetoworkspacesilent, special"
|
||||
"$mod, Tab, workspace, previous"
|
||||
''$mod, P, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
||||
])
|
||||
++ (lib.optionals cfg.useAdvancedBindings [
|
||||
# Special workspace
|
||||
"$mod, C, togglespecialworkspace"
|
||||
"$mod+Alt, C, movetoworkspacesilent, special"
|
||||
|
||||
''$mod, semicolon, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
||||
|
||||
"$mod, a, workspace, 1"
|
||||
"$mod, s, workspace, 2"
|
||||
"$mod, d, workspace, 3"
|
||||
"$mod, f, workspace, 4"
|
||||
"$mod, g, workspace, 5"
|
||||
"$mod, y, workspace, 6"
|
||||
"$mod, u, workspace, 7"
|
||||
"$mod, i, workspace, 8"
|
||||
"$mod, o, workspace, 9"
|
||||
"$mod, p, workspace, 10"
|
||||
|
||||
"$mod+Shift, a, movetoworkspace, 1"
|
||||
"$mod+Shift, s, movetoworkspace, 2"
|
||||
"$mod+Shift, d, movetoworkspace, 3"
|
||||
"$mod+Shift, f, movetoworkspace, 4"
|
||||
"$mod+Shift, g, movetoworkspace, 5"
|
||||
"$mod+Shift, y, movetoworkspace, 6"
|
||||
"$mod+Shift, u, movetoworkspace, 7"
|
||||
"$mod+Shift, i, movetoworkspace, 8"
|
||||
"$mod+Shift, o, movetoworkspace, 9"
|
||||
"$mod+Shift, p, movetoworkspace, 10"
|
||||
])
|
||||
++ (lib.optionals config.liminalOS.programs.zen.enable [
|
||||
"$mod, B, exec, zen"
|
||||
])
|
||||
++ (lib.optionals config.liminalOS.desktop.swaync.enable [
|
||||
"$mod, N, exec, sleep 0.1 && ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"
|
||||
])
|
||||
++ (lib.optionals config.liminalOS.programs.enable [
|
||||
# Application Keybinds
|
||||
"$mod, R, exec, ${pkgs.pavucontrol}/bin/pavucontrol -t 3" # open pavucontrol on 'outputs' tab
|
||||
"$mod, T, exec, ${pkgs.kitty}/bin/kitty"
|
||||
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar"
|
||||
"$mod, M, exec, ${pkgs.thunderbird}/bin/thunderbird"
|
||||
]);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
bindel = [
|
||||
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
|
||||
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%+"
|
||||
",XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer -i 5"
|
||||
",XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer -d 5"
|
||||
];
|
||||
binde = [
|
||||
# Resize windows
|
||||
"$mod+Alt, $Right, resizeactive, 30 0"
|
||||
"$mod+Alt, $Left, resizeactive, -30 0"
|
||||
"$mod+Alt, $Up, resizeactive, 0 -30"
|
||||
"$mod+Alt, $Down, resizeactive, 0 30"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -9,6 +9,12 @@ let
|
|||
cfg = config.liminalOS.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./binds.nix
|
||||
./utilities.nix
|
||||
./windowrules.nix
|
||||
];
|
||||
|
||||
options.liminalOS.desktop.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
@ -17,6 +23,7 @@ in
|
|||
Whether to enable and rice Hyprland as well as some basic desktop utilities.
|
||||
'';
|
||||
};
|
||||
useAdvancedBindings = lib.mkEnableOption "advanced keybinds";
|
||||
applyGtkFix = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = cfg.enable;
|
||||
|
@ -93,129 +100,6 @@ in
|
|||
"XCURSOR_THEME,Bibata-Modern-Ice"
|
||||
"XCURSOR_SIZE,26"
|
||||
]);
|
||||
bind =
|
||||
[
|
||||
# Window actions
|
||||
"$mod, Q, killactive"
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, V, togglesplit"
|
||||
"$mod, Return, fullscreen"
|
||||
|
||||
# Move around
|
||||
"$mod, $Left, movefocus, l"
|
||||
"$mod, $Right, movefocus, r"
|
||||
"$mod, $Up, movefocus, u"
|
||||
"$mod, $Down, movefocus, d"
|
||||
|
||||
"$mod, D, workspace, previous"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod+Ctrl, H, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod+Ctrl, J, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod+Ctrl, K, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod+Ctrl, L, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod+Ctrl, semicolon, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod+Ctrl, apostrophe, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod+Ctrl, U, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod+Ctrl, I, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod+Ctrl, O, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
"$mod+Ctrl, P, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mod+Shift, 1, movetoworkspace, 1"
|
||||
"$mod+Ctrl+Shift, H, movetoworkspace, 1"
|
||||
"$mod+Shift, 2, movetoworkspace, 2"
|
||||
"$mod+Ctrl+Shift, J, movetoworkspace, 2"
|
||||
"$mod+Shift, 3, movetoworkspace, 3"
|
||||
"$mod+Ctrl+Shift, K, movetoworkspace, 3"
|
||||
"$mod+Shift, 4, movetoworkspace, 4"
|
||||
"$mod+Ctrl+Shift, L, movetoworkspace, 4"
|
||||
"$mod+Shift, 5, movetoworkspace, 5"
|
||||
"$mod+Ctrl+Shift, semicolon, movetoworkspace, 5"
|
||||
"$mod+Shift, 6, movetoworkspace, 6"
|
||||
"$mod+Ctrl+Shift, apostrophe, movetoworkspace, 6"
|
||||
"$mod+Shift, 7, movetoworkspace, 7"
|
||||
"$mod+Ctrl+Shift, U, movetoworkspace, 7"
|
||||
"$mod+Shift, 8, movetoworkspace, 8"
|
||||
"$mod+Ctrl+Shift, I, movetoworkspace, 8"
|
||||
"$mod+Shift, 9, movetoworkspace, 9"
|
||||
"$mod+Ctrl+Shift, O, movetoworkspace, 9"
|
||||
"$mod+Shift, 0, movetoworkspace, 10"
|
||||
"$mod+Ctrl+Shift, P, movetoworkspace, 10"
|
||||
|
||||
# Special workspace
|
||||
"$mod, S, togglespecialworkspace"
|
||||
"$mod+Alt, S, movetoworkspacesilent, special"
|
||||
|
||||
# Move windows around
|
||||
"$mod+Shift, $Left, movewindow, l"
|
||||
"$mod+Shift, $Right, movewindow, r"
|
||||
"$mod+Shift, $Up, movewindow, u"
|
||||
"$mod+Shift, $Down, movewindow, d"
|
||||
|
||||
"$mod+Ctrl, bracketright, movetoworkspace, r+1"
|
||||
"$mod+Ctrl, bracketleft, movetoworkspace, r-1"
|
||||
|
||||
"$mod, bracketright, workspace, r+1"
|
||||
"$mod, bracketleft, workspace, r-1"
|
||||
|
||||
# Utilities
|
||||
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi application launcher
|
||||
"$mod, G, exec, pkill -x rofi || rofi -show window" # Run rofi window switcher
|
||||
|
||||
''$mod, P, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
||||
''$mod+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
||||
|
||||
"$mod, Backspace, exec, pkill -x wlogout || wlogout" # show logout menu
|
||||
|
||||
"$mod, Z, exec, loginctl lock-session"
|
||||
|
||||
# Media controls
|
||||
",XF86AudioMute, exec, ${pkgs.pamixer}/bin/pamixer -t"
|
||||
",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox play-pause"
|
||||
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox next"
|
||||
",XF86AudioRewind, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox previous"
|
||||
]
|
||||
++ (lib.optionals config.liminalOS.programs.zen.enable [
|
||||
"$mod, F, exec, zen"
|
||||
])
|
||||
++ (lib.optionals config.liminalOS.desktop.swaync.enable [
|
||||
"$mod, N, exec, sleep 0.1 && ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"
|
||||
])
|
||||
++ (lib.optionals config.liminalOS.programs.enable [
|
||||
# Application Keybinds
|
||||
"$mod, R, exec, ${pkgs.pavucontrol}/bin/pavucontrol -t 3" # open pavucontrol on 'outputs' tab
|
||||
"$mod, T, exec, ${pkgs.kitty}/bin/kitty"
|
||||
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar"
|
||||
"$mod, M, exec, ${pkgs.thunderbird}/bin/thunderbird"
|
||||
]);
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
bindel = [
|
||||
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
|
||||
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%+"
|
||||
",XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer -i 5"
|
||||
",XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer -d 5"
|
||||
];
|
||||
binde = [
|
||||
# Resize windows
|
||||
"$mod+Alt, $Right, resizeactive, 30 0"
|
||||
"$mod+Alt, $Left, resizeactive, -30 0"
|
||||
"$mod+Alt, $Up, resizeactive, 0 -30"
|
||||
"$mod+Alt, $Down, resizeactive, 0 30"
|
||||
];
|
||||
windowrulev2 = import ./windowrulev2.nix;
|
||||
layerrule = [
|
||||
"blur,rofi"
|
||||
"ignorezero,rofi"
|
||||
|
@ -316,107 +200,6 @@ in
|
|||
scroll_factor = 0.15;
|
||||
};
|
||||
|
||||
services.hyprpaper.enable = true;
|
||||
|
||||
programs.wlogout.enable = true;
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
# theme = "gruvbox-dark";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
extraConfig = {
|
||||
modi = "window,drun,ssh,combi,filebrowser,recursivebrowser";
|
||||
display-drun = " ";
|
||||
combi-modi = "window,drun,ssh";
|
||||
run-shell-command = "{terminal} -e {cmd}";
|
||||
sidebar-mode = true;
|
||||
background-color = "transparent";
|
||||
sorting = "fuzzy";
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = lib.mkIf cfg.screenlocker.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
grace = 0;
|
||||
};
|
||||
background = {
|
||||
monitor = cfg.screenlocker.monitor;
|
||||
path = lib.mkIf cfg.screenlocker.useNvidiaCrashFix "/tmp/__hyprlock-monitor-screenshot.png";
|
||||
blur_passes = 3;
|
||||
blur_size = 7;
|
||||
noise = 0.0117;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "200, 50";
|
||||
outline_thickness = 3;
|
||||
dots_size = 0.33;
|
||||
dots_spacing = 0.15;
|
||||
dots_center = false;
|
||||
dots_rounding = -1;
|
||||
outer_color = "rgb(151515)";
|
||||
inner_color = "rgb(200, 200, 200)";
|
||||
font_color = "rgb(10, 10, 10)";
|
||||
fade_on_empty = true;
|
||||
fade_timeout = 1000;
|
||||
placeholder_text = "<i>Input Password...</i>";
|
||||
hide_input = false;
|
||||
rounding = -1;
|
||||
check_color = "rgb(204, 136, 34)";
|
||||
fail_color = "rgb(204, 34, 34)";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
fail_timeout = 2000;
|
||||
fail_transition = 300;
|
||||
capslock_color = -1;
|
||||
numlock_color = -1;
|
||||
bothlock_color = -1;
|
||||
invert_numlock = false;
|
||||
swap_font_color = false;
|
||||
|
||||
position = "0, -20";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.hypridle = lib.mkIf cfg.idleDaemon.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd =
|
||||
if cfg.screenlocker.useNvidiaCrashFix then
|
||||
"pidof hyprlock || ${pkgs.grim}/bin/grim -o ${config.programs.hyprlock.settings.background.monitor} /tmp/__hyprlock-monitor-screenshot.png && ${pkgs.hyprlock}/bin/hyprlock"
|
||||
else
|
||||
"pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 1500;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 330; # 5.5min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
|
|
114
hm/modules/linux/desktop-environment/hyprland/utilities.nix
Normal file
114
hm/modules/linux/desktop-environment/hyprland/utilities.nix
Normal file
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hyprpaper.enable = true;
|
||||
|
||||
programs.wlogout.enable = true;
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
# theme = "gruvbox-dark";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
extraConfig = {
|
||||
modi = "window,drun,ssh,combi,filebrowser,recursivebrowser";
|
||||
display-drun = " ";
|
||||
combi-modi = "window,drun,ssh";
|
||||
run-shell-command = "{terminal} -e {cmd}";
|
||||
sidebar-mode = true;
|
||||
background-color = "transparent";
|
||||
sorting = "fuzzy";
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = lib.mkIf cfg.screenlocker.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
grace = 0;
|
||||
};
|
||||
background = {
|
||||
monitor = cfg.screenlocker.monitor;
|
||||
path = lib.mkIf cfg.screenlocker.useNvidiaCrashFix "/tmp/__hyprlock-monitor-screenshot.png";
|
||||
blur_passes = 3;
|
||||
blur_size = 7;
|
||||
noise = 0.0117;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "200, 50";
|
||||
outline_thickness = 3;
|
||||
dots_size = 0.33;
|
||||
dots_spacing = 0.15;
|
||||
dots_center = false;
|
||||
dots_rounding = -1;
|
||||
outer_color = "rgb(151515)";
|
||||
inner_color = "rgb(200, 200, 200)";
|
||||
font_color = "rgb(10, 10, 10)";
|
||||
fade_on_empty = true;
|
||||
fade_timeout = 1000;
|
||||
placeholder_text = "<i>Input Password...</i>";
|
||||
hide_input = false;
|
||||
rounding = -1;
|
||||
check_color = "rgb(204, 136, 34)";
|
||||
fail_color = "rgb(204, 34, 34)";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
fail_timeout = 2000;
|
||||
fail_transition = 300;
|
||||
capslock_color = -1;
|
||||
numlock_color = -1;
|
||||
bothlock_color = -1;
|
||||
invert_numlock = false;
|
||||
swap_font_color = false;
|
||||
|
||||
position = "0, -20";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.hypridle = lib.mkIf cfg.idleDaemon.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd =
|
||||
if cfg.screenlocker.useNvidiaCrashFix then
|
||||
"pidof hyprlock || ${pkgs.grim}/bin/grim -o ${config.programs.hyprlock.settings.background.monitor} /tmp/__hyprlock-monitor-screenshot.png && ${pkgs.hyprlock}/bin/hyprlock"
|
||||
else
|
||||
"pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 1500;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 330; # 5.5min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config.wayland.windowManager.hyprland.settings.windowrulev2 =
|
||||
lib.mkIf config.liminalOS.desktop.hyprland.enable
|
||||
[
|
||||
"opacity 0.90 0.90,class:^(librewolf)$"
|
||||
"opacity 0.90 0.90,class:^(floorp)$"
|
||||
"opacity 0.90 0.90,class:^(zen-alpha)$"
|
||||
"opacity 0.90 0.90,class:^(zen-beta)$"
|
||||
"opacity 0.90 0.90,class:^(Brave-browser)$"
|
||||
"opacity 0.80 0.80,class:^(Steam)$"
|
||||
"opacity 0.80 0.80,class:^(steam)$"
|
||||
"opacity 0.80 0.80,class:^(steamwebhelper)$"
|
||||
"opacity 0.80 0.80,class:^(Spotify)$"
|
||||
"opacity 0.80 0.80,initialTitle:^(Spotify Premium)$"
|
||||
"opacity 0.80 0.80,initialTitle:^(Spotify Free)$"
|
||||
"opacity 0.80 0.80,class:^(code-oss)$"
|
||||
"opacity 0.80 0.80,class:^(Code)$"
|
||||
"opacity 0.80 0.80,class:^(code-url-handler)$"
|
||||
"opacity 0.80 0.80,class:^(code-insiders-url-handler)$"
|
||||
"opacity 0.80 0.80,class:^(kitty)$"
|
||||
"opacity 0.80 0.80,class:^(neovide)$"
|
||||
"opacity 0.80 0.80,class:^(org.kde.dolphin)$"
|
||||
"opacity 0.80 0.80,class:^(thunar)$"
|
||||
"opacity 0.80 0.80,class:^(org.kde.ark)$"
|
||||
"opacity 0.80 0.80,class:^(nwg-look)$"
|
||||
"opacity 0.80 0.80,class:^(qt5ct)$"
|
||||
"opacity 0.80 0.80,class:^(qt6ct)$"
|
||||
"opacity 0.80 0.80,class:^(kvantummanager)$"
|
||||
"opacity 0.80 0.80,class:^(waypaper)$"
|
||||
"opacity 0.80 0.80,class:^(org.pulseaudio.pavucontrol)$"
|
||||
"opacity 0.80 0.80,class:^(com.github.wwmm.easyeffects)$"
|
||||
"opacity 0.80 0.80,class:^(thunderbird)$"
|
||||
|
||||
"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk"
|
||||
"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt"
|
||||
"opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk"
|
||||
"opacity 0.80 0.80,class:^(discord)$ # Discord-Electron"
|
||||
"opacity 0.80 0.80,class:^(vesktop)$ # Vesktop-Electron"
|
||||
"opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron"
|
||||
"opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk"
|
||||
"opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
|
||||
"opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk"
|
||||
"opacity 0.80 0.80,class:^(signal)$ # Signal-Gtk"
|
||||
"opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk"
|
||||
"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk"
|
||||
"opacity 0.80 0.80,class:^(lutris)$ # Lutris game launcher"
|
||||
|
||||
"opacity 0.80 0.70,class:^(pavucontrol)$"
|
||||
"opacity 0.80 0.70,class:^(blueman-manager)$"
|
||||
"opacity 0.80 0.70,class:^(nm-applet)$"
|
||||
"opacity 0.80 0.70,class:^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$"
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$"
|
||||
"float,title:^(Picture-in-Picture)$"
|
||||
"float,class:^(librewolf)$,title:^(Library)$"
|
||||
"float,class:^(floorp)$,title:^(Library)$"
|
||||
"float,class:^(zen-alpha)$,title:^(Library)$"
|
||||
"float,title:^(Extension: (Bitwarden Password Manager))$"
|
||||
"float,class:^(vlc)$"
|
||||
"float,class:^(kvantummanager)$"
|
||||
"float,class:^(qt5ct)$"
|
||||
"float,class:^(qt6ct)$"
|
||||
"float,class:^(nwg-look)$"
|
||||
"float,class:^(org.kde.ark)$"
|
||||
"float,class:^(org.pulseaudio.pavucontrol)$"
|
||||
"float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
|
||||
"float,class:^(app.drey.Warp)$ # Warp-Gtk"
|
||||
"float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
|
||||
"float,class:^(yad)$ # Protontricks-Gtk"
|
||||
"float,class:^(eog)$ # Imageviewer-Gtk"
|
||||
"float,class:^(io.github.alainm23.planify)$ # planify-Gtk"
|
||||
"float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
|
||||
"float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk"
|
||||
"float,class:^(blueman-manager)$"
|
||||
"float,class:^(nm-applet)$"
|
||||
"float,class:^(nm-connection-editor)$"
|
||||
"float,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.gtk)$"
|
||||
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.hyprland)$"
|
||||
|
||||
"size 50% 50%,class:^(org.pulseaudio.pavucontrol)"
|
||||
|
||||
"stayfocused, class:^(pinentry-)" # fix pinentry losing focus
|
||||
];
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
[
|
||||
"opacity 0.90 0.90,class:^(librewolf)$"
|
||||
"opacity 0.90 0.90,class:^(floorp)$"
|
||||
"opacity 0.90 0.90,class:^(zen-alpha)$"
|
||||
"opacity 0.90 0.90,class:^(zen-beta)$"
|
||||
"opacity 0.90 0.90,class:^(Brave-browser)$"
|
||||
"opacity 0.80 0.80,class:^(Steam)$"
|
||||
"opacity 0.80 0.80,class:^(steam)$"
|
||||
"opacity 0.80 0.80,class:^(steamwebhelper)$"
|
||||
"opacity 0.80 0.80,class:^(Spotify)$"
|
||||
"opacity 0.80 0.80,initialTitle:^(Spotify Premium)$"
|
||||
"opacity 0.80 0.80,initialTitle:^(Spotify Free)$"
|
||||
"opacity 0.80 0.80,class:^(code-oss)$"
|
||||
"opacity 0.80 0.80,class:^(Code)$"
|
||||
"opacity 0.80 0.80,class:^(code-url-handler)$"
|
||||
"opacity 0.80 0.80,class:^(code-insiders-url-handler)$"
|
||||
"opacity 0.80 0.80,class:^(kitty)$"
|
||||
"opacity 0.80 0.80,class:^(neovide)$"
|
||||
"opacity 0.80 0.80,class:^(org.kde.dolphin)$"
|
||||
"opacity 0.80 0.80,class:^(thunar)$"
|
||||
"opacity 0.80 0.80,class:^(org.kde.ark)$"
|
||||
"opacity 0.80 0.80,class:^(nwg-look)$"
|
||||
"opacity 0.80 0.80,class:^(qt5ct)$"
|
||||
"opacity 0.80 0.80,class:^(qt6ct)$"
|
||||
"opacity 0.80 0.80,class:^(kvantummanager)$"
|
||||
"opacity 0.80 0.80,class:^(waypaper)$"
|
||||
"opacity 0.80 0.80,class:^(org.pulseaudio.pavucontrol)$"
|
||||
"opacity 0.80 0.80,class:^(com.github.wwmm.easyeffects)$"
|
||||
"opacity 0.80 0.80,class:^(thunderbird)$"
|
||||
|
||||
"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk"
|
||||
"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt"
|
||||
"opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk"
|
||||
"opacity 0.80 0.80,class:^(discord)$ # Discord-Electron"
|
||||
"opacity 0.80 0.80,class:^(vesktop)$ # Vesktop-Electron"
|
||||
"opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron"
|
||||
"opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk"
|
||||
"opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
|
||||
"opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk"
|
||||
"opacity 0.80 0.80,class:^(signal)$ # Signal-Gtk"
|
||||
"opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk"
|
||||
"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk"
|
||||
"opacity 0.80 0.80,class:^(lutris)$ # Lutris game launcher"
|
||||
|
||||
"opacity 0.80 0.70,class:^(pavucontrol)$"
|
||||
"opacity 0.80 0.70,class:^(blueman-manager)$"
|
||||
"opacity 0.80 0.70,class:^(nm-applet)$"
|
||||
"opacity 0.80 0.70,class:^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$"
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$"
|
||||
"float,title:^(Picture-in-Picture)$"
|
||||
"float,class:^(librewolf)$,title:^(Library)$"
|
||||
"float,class:^(floorp)$,title:^(Library)$"
|
||||
"float,class:^(zen-alpha)$,title:^(Library)$"
|
||||
"float,title:^(Extension: (Bitwarden Password Manager))$"
|
||||
"float,class:^(vlc)$"
|
||||
"float,class:^(kvantummanager)$"
|
||||
"float,class:^(qt5ct)$"
|
||||
"float,class:^(qt6ct)$"
|
||||
"float,class:^(nwg-look)$"
|
||||
"float,class:^(org.kde.ark)$"
|
||||
"float,class:^(org.pulseaudio.pavucontrol)$"
|
||||
"float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
|
||||
"float,class:^(app.drey.Warp)$ # Warp-Gtk"
|
||||
"float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt"
|
||||
"float,class:^(yad)$ # Protontricks-Gtk"
|
||||
"float,class:^(eog)$ # Imageviewer-Gtk"
|
||||
"float,class:^(io.github.alainm23.planify)$ # planify-Gtk"
|
||||
"float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
|
||||
"float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk"
|
||||
"float,class:^(blueman-manager)$"
|
||||
"float,class:^(nm-applet)$"
|
||||
"float,class:^(nm-connection-editor)$"
|
||||
"float,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.gtk)$"
|
||||
"opacity 0.80 0.80,class:^(org.freedesktop.impl.portal.desktop.hyprland)$"
|
||||
|
||||
"size 50% 50%,class:^(org.pulseaudio.pavucontrol)"
|
||||
|
||||
"stayfocused, class:^(pinentry-)" # fix pinentry losing focus
|
||||
]
|
|
@ -14,6 +14,7 @@
|
|||
liminalOS = {
|
||||
utils.easyeffects.enable = true;
|
||||
desktop.hyprland.screenlocker.useNvidiaCrashFix = true;
|
||||
desktop.hyprland.useAdvancedBindings = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
|
|
Loading…
Reference in a new issue