Browse Source

added a solution for the Laptop monitor display to not wake up during hyprctl reload

pull/59/head
JaKooLit 2 years ago
parent
commit
13eb491325
  1. 5
      config/hypr/configs/Keybinds.conf
  2. 1
      config/hypr/configs/LaptopDisplay.conf
  3. 11
      config/hypr/configs/Laptops.conf
  4. 7
      config/hypr/configs/Monitors.conf
  5. 1
      config/hypr/hyprland.conf

5
config/hypr/configs/Keybinds.conf

@ -16,8 +16,8 @@ $volume = $scriptsDir/Volume.sh
# see https://wiki.hyprland.org/Configuring/Binds/ for more
# rofi launcher
bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi run,drun,filebrowser
bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi run,drun,filebrowser
bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser
bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser
bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0
bind = $mainMod SHIFT, R, exec, hyprctl reload
@ -159,6 +159,7 @@ bind = $mainMod, comma, workspace, e-1
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Screenshot keybindings NOTE:
#bind = , Print, exec, $screenshot --now
bind = $mainMod, Print, exec, $screenshot --now

1
config/hypr/configs/LaptopDisplay.conf

@ -0,0 +1 @@
monitor = eDP-1, preferred, auto, 1

11
config/hypr/configs/Laptops.conf

@ -2,6 +2,7 @@
# Setting variables
# This configs are mostly for laptops. This is addemdum to Keybinds.conf
$configs = $HOME/.config/hypr/configs
$mainMod = SUPER
$scriptsDir = $HOME/.config/hypr/scripts
@ -22,13 +23,13 @@ bind = , xf86MonBrightnessDown, exec, $backlight --dec #FN+F7
bind = , xf86MonBrightnessUp, exec, $backlight --inc #FN+F8
bind = , xf86TouchpadToggle, exec, $touchpad #FN+10 disable touchpad
# triggered when external monitor is connected and closing lid (For Laptop)
# bindl=,switch:Lid Switch, exec, $LidSwitch
# NOTE: (12-Nov-2023) This use to work before but seems below is ok now
# From WIKI This is to disable laptop monitor when lid is closed.
# consult https://wiki.hyprland.org/hyprland-wiki/pages/Configuring/Binds/#switches
bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1"
bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable"
# NOTE: Display for laptop are being generated into LaptopDisplay.conf
bindl = , switch:off:Lid Switch,exec,echo "monitor = eDP-1, preferred, auto, 1" > $configs/LaptopDisplay.conf
bindl = , switch:on:Lid Switch,exec,echo "monitor = eDP-1, disable" > $configs/LaptopDisplay.conf
# Screenshot keybindings for Asus G15 (no PrinSrc button)
bind = $mainMod, F6, exec, $screenshot --now

7
config/hypr/configs/Monitors.conf

@ -11,7 +11,12 @@ xwayland {
# Monitors
monitor=,preferred,auto,1
# my G15 Laptop
# NOTE: for laptop, suggest to edit as well Laptops.conf
# you will see there "bindl = , switch:off:Lid Switch....."
# edit monitor = eDP-1, preferred, auto, 1" to your preferred monitor display.
# Created this inorder for the monitor display to not wake up if not intended.
# See here: https://github.com/hyprwm/Hyprland/issues/4090
#monitor = eDP-1, preferred, auto, 1
#monitor = eDP-1, 2560x1440@165, 0x0, 1 #own screen
#monitor = DP-2, preferred, auto, 1

1
config/hypr/hyprland.conf

@ -5,6 +5,7 @@ source=$configs/ENVariables.conf
source=$configs/Execs.conf
source=$configs/Keybinds.conf
source=$configs/Laptops.conf
source=$configs/LaptopDisplay.conf
source=$configs/Monitors.conf
source=$configs/WindowRules.conf
source=$configs/Settings.conf

Loading…
Cancel
Save