refactor(hypr): update to match upstream breaking changes
This commit is contained in:
parent
8ee2fb5a7d
commit
5257f4b46a
@ -1,9 +1,9 @@
|
||||
### GROMIT-MPX ###
|
||||
# --- GROMIT-MPX ---
|
||||
workspace = special:gromit,gapsin:0,gapsout:0,decorate:false,border:false,on-created-empty:gromit-mpx -a
|
||||
windowrulev2 = noblur,class:^(Gromit-mpx)$
|
||||
windowrulev2 = opacity 1 override, 1 override,class:^(Gromit-mpx)$
|
||||
windowrulev2 = noshadow,class:^(Gromit-mpx)$
|
||||
windowrulev2 = nofullscreenrequest,class:^(Gromit-mpx)$
|
||||
windowrulev2 = suppressevent fullscreen,class:^(Gromit-mpx)$
|
||||
windowrulev2 = noanim,class:^(Gromit-mpx)$
|
||||
windowrulev2 = size 100% 100%,class:^(Gromit-mpx)$
|
||||
|
||||
|
@ -17,11 +17,11 @@ gestures {
|
||||
workspace_swipe_fingers = 3
|
||||
}
|
||||
|
||||
### MOUSE ###
|
||||
# --- MOUSE ---
|
||||
bindm = SUPER,mouse:272,movewindow
|
||||
bindm = SUPER,mouse:273,resizewindow
|
||||
|
||||
### RESIZE ###
|
||||
# --- RESIZE ---
|
||||
bind = SUPER,R,submap,resize # will switch to a submap called resize
|
||||
|
||||
submap = resize # will start a submap called "resize"
|
||||
@ -39,7 +39,7 @@ binde = ,j,resizeactive,0 50
|
||||
bind = ,escape,submap,reset # use reset to go back to the global submap
|
||||
submap = reset # will reset the submap, meaning end the current one and return to the global one.
|
||||
|
||||
### Move Window ###
|
||||
# --- Move Window ---
|
||||
bind = SUPER,M,submap,move_window
|
||||
|
||||
submap = move_window
|
||||
@ -69,7 +69,7 @@ bind = SUPER,D,exec,makoctl dismiss -a
|
||||
bind = SUPERSHIFT,Q,exec,swaylock
|
||||
bind = SUPERSHIFT,M,exit
|
||||
|
||||
### Screen Captures ###
|
||||
# --- Screen Captures ---
|
||||
# May be videos or screenshots
|
||||
bind = SUPER,S,exec,grim -g "$(slurp)" - | swappy -f -
|
||||
bind = CTRLSUPER,S,exec,grim -g "$(slurp)" - | wl-copy --type image/png
|
||||
@ -96,7 +96,7 @@ bind = SUPER,l,movefocus,r
|
||||
bind = SUPER,k,movefocus,u
|
||||
bind = SUPER,j,movefocus,d
|
||||
|
||||
### Workspaces ###
|
||||
# --- Workspaces ---
|
||||
|
||||
bind = SUPERSHIFT,left,exec,~/.config/hypr/scripts/focus-workspace-mon.bash $(( $(hyprctl monitors -j | jq -c '.[] | select(.focused) | .activeWorkspace.id') - 1 ))
|
||||
bind = SUPERSHIFT,right,exec,~/.config/hypr/scripts/focus-workspace-mon.bash $(( $(hyprctl monitors -j | jq -c '.[] | select(.focused) | .activeWorkspace.id') + 1 ))
|
||||
|
@ -1,6 +1,6 @@
|
||||
source = ./colors.conf
|
||||
|
||||
### General Configuration ###
|
||||
# --- General Configuration ---
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
|
@ -1,4 +1,2 @@
|
||||
monitor = , preferred, auto, 1
|
||||
monitor=eDP-1,preferred,auto,1.35
|
||||
bindl=,switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1"
|
||||
bindl=,switch:on:Lid Switch,exec,~/.config/hypr/scripts/disable-laptop-screen.bash
|
||||
|
@ -1,6 +1,6 @@
|
||||
$configDir = ~/.config/hypr/conf
|
||||
|
||||
### Core Config ###
|
||||
# --- Core Config ---
|
||||
source = $configDir/core/env.conf
|
||||
source = $configDir/core/general.conf
|
||||
source = $configDir/core/bindings.conf
|
||||
@ -8,5 +8,5 @@ source = $configDir/core/appearance.conf
|
||||
source = $configDir/core/monitors.conf
|
||||
source = $configDir/core/window-rules.conf
|
||||
|
||||
### Application Specific ###
|
||||
# --- Application Specific ---
|
||||
source = $configDir/application/gromit-mpx.conf
|
||||
|
@ -4,7 +4,7 @@ main() {
|
||||
local mon_count
|
||||
mon_count="$(hyprctl monitors -j | jq length)"
|
||||
if ((mon_count > 1)); then
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
hyprctl dpms off eDP-1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -40,15 +40,36 @@ monitor-ssid() {
|
||||
|
||||
monitor-laptop-lid() {
|
||||
local laptop_lid_state
|
||||
local laptop_lid_last_state
|
||||
while :; do
|
||||
sleep 1
|
||||
laptop_lid_state="$(</proc/acpi/button/lid/LID0/state)"
|
||||
laptop_lid_state="${laptop_lid_state##* }"
|
||||
laptop_lid_state="${laptop_lid_state^^}"
|
||||
if [[ "${laptop_lid_state}" == "${laptop_lid_last_state}" ]]; then
|
||||
continue
|
||||
fi
|
||||
case "${laptop_lid_state}" in
|
||||
"OPEN")
|
||||
if hyprctl monitors -j | jq -er '.[] | select(.name=="eDP-1") | .name' >/dev/null; then
|
||||
printf "Laptop screen was opened, attempting to enable it...\n"
|
||||
if hyprctl dispatch dpms on eDP-1; then
|
||||
laptop_lid_last_state="${laptop_lid_state}"
|
||||
local msg="Laptop screen successfully enabled"
|
||||
log "Laptop Clamshell" "${msg}"
|
||||
notify-send "Laptop Clamshell" "${msg}" -a "Laptop Clamshell"
|
||||
else
|
||||
local msg="Received an error when enabling the laptop screen!\n"
|
||||
log "Laptop Clamshell" "${msg}"
|
||||
notify-send "Laptop Clamshell Error" "${msg}" -a "Laptop Clamshell"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
"CLOSED")
|
||||
if hyprctl monitors -j | jq -er '.[] | select(.name=="eDP-1") | .name' >/dev/null; then
|
||||
printf "Laptop screen was shut, attempting to disable it...\n"
|
||||
if hyprctl keyword monitor "eDP-1, disable"; then
|
||||
if hyprctl dispatch dpms off eDP-1; then
|
||||
laptop_lid_last_state="${laptop_lid_state}"
|
||||
local msg="Laptop screen successfully disabled"
|
||||
log "Laptop Clamshell" "${msg}"
|
||||
notify-send "Laptop Clamshell" "${msg}" -a "Laptop Clamshell"
|
||||
@ -60,7 +81,6 @@ monitor-laptop-lid() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
monitor-ssid &
|
||||
|
Loading…
Reference in New Issue
Block a user