Use DPMS instead of disabling internal monitor, add some extra numbered workspaces and remove relative movement bind

This commit is contained in:
Evie Litherland-Smith 2023-06-30 11:55:26 +01:00
parent d1f0906fbb
commit 6a1a76097f
3 changed files with 31 additions and 16 deletions

View file

@ -181,8 +181,8 @@
({pkgs, ...}: let ({pkgs, ...}: let
laptop-state = pkgs.writeShellScriptBin "check-laptop-lid-state" '' laptop-state = pkgs.writeShellScriptBin "check-laptop-lid-state" ''
grep closed /proc/acpi/button/lid/LID0/state &&\ grep closed /proc/acpi/button/lid/LID0/state &&\
hyprctl keyword monitor "eDP-1,disable" ||\ hyprctl dispatch dpms off eDP-1 ||\
hyprctl keyword monitor "eDP-1,1920x1080,0x0,1.0" hyprctl dispatch dpms on
''; '';
in { in {
home-manager.users.elitherl = { home-manager.users.elitherl = {
@ -196,8 +196,7 @@
programs.neovim.package = pkgs.neovim-nightly; programs.neovim.package = pkgs.neovim-nightly;
wayland.windowManager.hyprland.extraConfig = '' wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf source=./common.conf
bindl=,switch:Lid Switch,exec,check-laptop-lid-state monitor = eDP-1,1920x1080,0,1.0
exec = ${laptop-state}/bin/check-laptop-lid-state
monitor = DP-3,1920x1200,1920x0,1.0 monitor = DP-3,1920x1200,1920x0,1.0
monitor = DP-4,1920x1080,3840x0,1.0,transform,1 monitor = DP-4,1920x1080,3840x0,1.0,transform,1
@ -207,6 +206,7 @@
bind = ALT, R, workspace, name:remote bind = ALT, R, workspace, name:remote
bind = ALT SHIFT, R, moveworkspacetomonitor, name:remote current bind = ALT SHIFT, R, moveworkspacetomonitor, name:remote current
bind = ALT SHIFT, R, movetoworkspace, name:remote bind = ALT SHIFT, R, movetoworkspace, name:remote
bindl=,switch:Lid Switch,exec,check-laptop-lid-state
''; '';
programs.waybar.settings = { programs.waybar.settings = {
main = { main = {

View file

@ -176,16 +176,15 @@
"browser": "󰈹", "browser": "󰈹",
"files": "󰝰", "files": "󰝰",
"chat": "󰭹", "chat": "󰭹",
"I": "I",
"II": "II",
"III": "III",
"IV": "IV",
"V": "V",
"urgent": "", "urgent": "",
"default": "" "default": ""
}, },
"persistent_workspaces": { "sort-by-name": true,
"dev": [],
"browser": [],
"files": [],
"chat": []
},
"sort-by-name": false,
"sort-by-coordinates": false, "sort-by-coordinates": false,
"sort-by-number": false "sort-by-number": false
} }

View file

@ -135,14 +135,30 @@
bind = ALT SHIFT, C, moveworkspacetomonitor, name:chat current bind = ALT SHIFT, C, moveworkspacetomonitor, name:chat current
bind = ALT SHIFT, C, movetoworkspace, name:chat bind = ALT SHIFT, C, movetoworkspace, name:chat
bind = ALT, period, workspace, e+1 bind = ALT, 1, moveworkspacetomonitor, name:I current
bind = ALT, comma, workspace, e-1 bind = ALT, 1, workspace, name:I
bind = ALT SHIFT, 1, moveworkspacetomonitor, name:I current
bind = ALT SHIFT, 1, movetoworkspace, name:I
bind = ALT, 2, moveworkspacetomonitor, name:II current
bind = ALT, 2, workspace, name:II
bind = ALT SHIFT, 2, moveworkspacetomonitor, name:II current
bind = ALT SHIFT, 2, movetoworkspace, name:II
bind = ALT, 3, moveworkspacetomonitor, name:III current
bind = ALT, 3, workspace, name:III
bind = ALT SHIFT, 3, moveworkspacetomonitor, name:III current
bind = ALT SHIFT, 3, movetoworkspace, name:III
bind = ALT, 4, moveworkspacetomonitor, name:IV current
bind = ALT, 4, workspace, name:IV
bind = ALT SHIFT, 4, moveworkspacetomonitor, name:IV current
bind = ALT SHIFT, 4, movetoworkspace, name:IV
bind = ALT, 5, moveworkspacetomonitor, name:V current
bind = ALT, 5, workspace, name:V
bind = ALT SHIFT, 5, moveworkspacetomonitor, name:V current
bind = ALT SHIFT, 5, movetoworkspace, name:V
bind = ALT, bracketright, focusmonitor, +1 bind = ALT, bracketright, focusmonitor, +1
bind = ALT, bracketleft, focusmonitor, +1 bind = ALT, bracketleft, focusmonitor, +1
bind = ALT, N, workspace, empty
bind = ALT SHIFT, N, movetoworkspace, empty
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
bindm = ALT, mouse:272, movewindow bindm = ALT, mouse:272, movewindow
bindm = ALT, mouse:273, resizewindow bindm = ALT, mouse:273, resizewindow