Update laptop lid script to use dpms instead of disabling
This commit is contained in:
parent
d01c8a8cc3
commit
3a135d9761
|
@ -102,7 +102,6 @@
|
||||||
bind = SUPER, F, exec, thunar
|
bind = SUPER, F, exec, thunar
|
||||||
bind = SUPER, M, fullscreen, 1
|
bind = SUPER, M, fullscreen, 1
|
||||||
bind = SUPER, A, layoutmsg, togglesplit
|
bind = SUPER, A, layoutmsg, togglesplit
|
||||||
bindl = SUPER SHIFT, C, exec, hyprctl reload
|
|
||||||
|
|
||||||
bind = , XF86AudioMute, exec, pamixer -t
|
bind = , XF86AudioMute, exec, pamixer -t
|
||||||
binde = , XF86AudioRaiseVolume, exec, pamixer -i 2
|
binde = , XF86AudioRaiseVolume, exec, pamixer -i 2
|
||||||
|
@ -165,8 +164,8 @@
|
||||||
bind = SUPER, N, workspace, empty
|
bind = SUPER, N, workspace, empty
|
||||||
bind = SUPER SHIFT, N, movetoworkspace, empty
|
bind = SUPER SHIFT, N, movetoworkspace, empty
|
||||||
|
|
||||||
bind = SUPER, -, togglespecialworkspace
|
bind = SUPER, C, togglespecialworkspace
|
||||||
bind = SUPER SHIFT, -, movetoworkspace, special
|
bind = SUPER SHIFT, C, movetoworkspace, special
|
||||||
|
|
||||||
bind = SUPER, tab, workspace, previous
|
bind = SUPER, tab, workspace, previous
|
||||||
bind = SUPER SHIFT, tab, movetoworkspace, previous
|
bind = SUPER SHIFT, tab, movetoworkspace, previous
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{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,preferred,auto,1.0"
|
hyprctl dispatch dpms on eDP-1
|
||||||
|
grep closed /proc/acpi/button/lid/LID0/state && hyprctl dispatch exec swaylock
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
imports = [./default.nix];
|
imports = [./default.nix];
|
||||||
|
@ -18,10 +19,10 @@ in {
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
source=./common.conf
|
source=./common.conf
|
||||||
|
|
||||||
bindl=,switch:Lid Switch,exec,hyprctl keyword monitor "eDP-1,disable"
|
monitor = eDP-1,1920x1080,0x0,1.0
|
||||||
|
monitor = DP-3,1920x1200,1920x0,1.0
|
||||||
monitor = DP-3,preferred,auto,auto
|
monitor = DP-4,1920x1080,3840x0,1.0,transform,1
|
||||||
monitor = DP-4,preferred,auto,auto,transform,1
|
bindl=,switch:Lid Switch,exec,check-laptop-lid-state
|
||||||
|
|
||||||
workspace = DP-3,1
|
workspace = DP-3,1
|
||||||
workspace = DP-3,2
|
workspace = DP-3,2
|
||||||
|
|
Loading…
Reference in a new issue