usability improvements
This commit is contained in:
@@ -28,7 +28,7 @@ in
|
||||
# Close window
|
||||
"$mod, Q, killactive,"
|
||||
# Force close window
|
||||
# "$mod+Shift, Q, forcekillactive,"
|
||||
"$mod+Shift, Q, forcekillactive,"
|
||||
|
||||
# Toggle Floating and reduce size
|
||||
"$mod, f, togglefloating,"
|
||||
@@ -49,21 +49,25 @@ in
|
||||
"$mod+Shift, up, movewindow, u"
|
||||
"$mod+Shift, down, movewindow, d"
|
||||
|
||||
# Move window to workspace
|
||||
"$mod+Ctrl, left, movetoworkspace, -1"
|
||||
"$mod+Ctrl, right, movetoworkspace, +1"
|
||||
|
||||
# Switch workspace
|
||||
"$mod+Alt, left, workspace, -1"
|
||||
"$mod+Alt, right, workspace, +1"
|
||||
"$mod, left, workspace, -1"
|
||||
"$mod, right, workspace, +1"
|
||||
"$mod, mouse_down, workspace, -1"
|
||||
"$mod, mouse_up, workspace, +1"
|
||||
|
||||
|
||||
# move to scratch workspace
|
||||
"$mod+Ctrl, up, movetoworkspace, special:magic"
|
||||
"$mod+Ctrl, down, movetoworkspace, 1"
|
||||
# toggle scratch workspace
|
||||
"$mod+Alt, up, togglespecialworkspace, magic"
|
||||
"$mod+Alt, down, togglespecialworkspace, magic"
|
||||
"$mod+Ctrl, down, movetoworkspace, prev"
|
||||
|
||||
# switch to scratch workspace
|
||||
"$mod, up, togglespecialworkspace, magic"
|
||||
"$mod, down, togglespecialworkspace, magic"
|
||||
|
||||
|
||||
# Screenshot
|
||||
"$mod, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
@@ -80,7 +84,7 @@ in
|
||||
|
||||
# Other pickers using the same launcher
|
||||
"$mod+Ctrl, space, exec, ${lib.getExe config.nix-config.filePicker}"
|
||||
|
||||
"$mod, period, exec, ${lib.getExe config.nix-config.emojiPicker}"
|
||||
];
|
||||
|
||||
# repeatable bindings
|
||||
@@ -97,25 +101,26 @@ in
|
||||
"$mod, KP_Subtract, resizeactive, -2% -2%"
|
||||
"$mod, PLUS, resizeactive, 2% 2%"
|
||||
"$mod, KP_Add, resizeactive, 2% 2%"
|
||||
|
||||
|
||||
];
|
||||
|
||||
# lock-screen bindings
|
||||
bindl = [
|
||||
## depending on the setup: lock screen or switch to clamshell mode
|
||||
# in any case, the internal screen is turned off
|
||||
# ", switch:on:Lid Switch, exec, loginctl lock-session"
|
||||
", XF86PowerOff, exec, hyprctl dispatch dpms on eDP-1"
|
||||
## depending on the setup we expect different behaviors when closing the lid:
|
||||
# either sleep & lock screen OR switch to clamshell mode
|
||||
# through the `services.logind.lidSwitch` and `services.logind.lidSwitchDocked` we can differentiate both cases
|
||||
# when not docked, the system is put to sleep and the screen is implicitly locked as per the hypridle configuration
|
||||
# when docked, the lid switch is ignored by logind and needs to be handled manually, see below:
|
||||
|
||||
|
||||
# if an additional monitor is detected, simply deactivate the internal screen and continue working on the external monitor
|
||||
", switch:on:Lid Switch, exec, hyprctl dispatch dpms off eDP-1"
|
||||
", switch:on:Lid Switch, exec, sleep 0.5; hyprctl monitors | grep 'dpmsStatus: 1' && hyprctl keyword monitor 'eDP-1,disable'"
|
||||
# # if no external monitor is detected, lock the screen
|
||||
# ", switch:on:Lid Switch, exec, sleep 0.5; hyprctl monitors | grep 'dpmsStatus: 1' || loginctl lock-session"
|
||||
|
||||
", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1,disable"
|
||||
## on reopening the lid, turn the internal screen back on
|
||||
", switch:off:Lid Switch, exec, hyprctl dispatch dpms on eDP-1"
|
||||
# if an external monitor was connected, then we need to reload the monitor configuration
|
||||
", switch:off:Lid Switch, exec, hyprctl monitors | grep 'ID 1' && hyprctl reload"
|
||||
# we need to reload the monitor configuration so that the internal screen is turned back on
|
||||
", switch:off:Lid Switch, exec, hyprctl reload"
|
||||
];
|
||||
|
||||
# bindr = [
|
||||
@@ -129,7 +134,21 @@ in
|
||||
# resize the window using right click
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
bind= , XF86AudioMicMute, submap, player_submap
|
||||
|
||||
submap=player_submap
|
||||
bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
|
||||
bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
|
||||
bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
|
||||
submap=reset
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user