Prechádzať zdrojové kódy

add hypridle + add xwaylandvideobridge + add new screenshot keybinds + add new workspace and resize keybinds

Noah Vogt 1 deň pred
rodič
commit
4179b2807f

+ 16 - 0
dot-config/hypr/hypridle.conf

@@ -0,0 +1,16 @@
+general {
+    lock_cmd = pidof hyprlock || hyprlock       # dbus/sysd lock command (loginctl lock-session)
+    before_sleep_cmd = loginctl lock-session    # lock before suspend
+    after_sleep_cmd = hyprctl dispatch dpms on  # to avoid having to press a key twice to turn on the display
+}
+
+listener {
+    timeout = 300                                # 5 mins
+    on-timeout = hyprctl dispatch dpms off       # screen off
+    on-resume = hyprctl dispatch dpms on         # screen on
+}
+
+listener {
+    timeout = 1200                               # 20 mins
+    on-timeout = loginctl lock-session           # lock screen
+}

+ 32 - 5
dot-config/hypr/hyprland.conf

@@ -21,10 +21,12 @@ $browser = brave
 # Autostart necessary processes (like notifications daemons, status bars, etc.)
 # Or execute your favorite apps at launch like this:
 
-exec-once = awww-daemon &
-exec-once = waybar &
-exec-once = swaync &
-exec-once = syncthing &
+exec-once = awww-daemon
+exec-once = waybar
+exec-once = swaync
+exec-once = syncthing
+exec-once = hypridle
+exec-once = xwaylandvideobridge
 # exec-once = $terminal
 # exec-once = nm-applet &
 # exec-once = waybar & hyprpaper & firefox
@@ -49,7 +51,7 @@ ecosystem {
 permission = /usr/bin/grim, screencopy, allow
 permission = /usr/bin/hyprpicker, screencopy, allow
 permission = /usr/bin/hyprlock, screencopy, allow
-# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
+permission = /usr/lib/xdg-desktop-portal-hyprland, screencopy, allow
 
 #####################
 ### LOOK AND FEEL ###
@@ -244,6 +246,9 @@ bind = $mainMod SHIFT, T, exec, ~/.config/hypr/scripts/toggle-theme.sh
 bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh area
 bind = $mainMod CTRL, Print, exec, ~/.config/hypr/scripts/screenshot.sh monitor
 bind = $mainMod SHIFT, Print, exec, ~/.config/hypr/scripts/screenshot.sh window
+bind = , XF86LaunchA, exec, ~/.config/hypr/scripts/screenshot.sh area
+bind = $mainMod CTRL, XF86LaunchA, exec, ~/.config/hypr/scripts/screenshot.sh monitor
+bind = $mainMod SHIFT, XF86LaunchA, exec, ~/.config/hypr/scripts/screenshot.sh window
 
 bind = $mainMod ALT, Space, togglefloating,
 
@@ -276,6 +281,7 @@ bind = $mainMod SHIFT, H, layoutmsg, orientationtop
 bind = $mainMod SHIFT, V, layoutmsg, orientationleft
 
 # Switch workspaces with mainMod + [0-9]
+bind = $mainMod, Tab, workspace, previous
 bind = $mainMod, 1, workspace, 1
 bind = $mainMod, 2, workspace, 2
 bind = $mainMod, 3, workspace, 3
@@ -311,6 +317,17 @@ bind = $mainMod, mouse_up, workspace, e-1
 bindm = $mainMod, mouse:272, movewindow
 bindm = $mainMod, mouse:273, resizewindow
 
+
+# Resize submap
+bind = $mainMod, R, submap, resize
+submap = resize
+binde = , right, resizeactive, 10 0
+binde = , left, resizeactive, -10 0
+binde = , up, resizeactive, 0 -10
+binde = , down, resizeactive, 0 10
+bind = , escape, submap, reset
+submap = reset
+
 # Laptop multimedia keys for volume and LCD brightness
 bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
 bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
@@ -381,3 +398,13 @@ windowrule {
     opacity = 1.0 override 1.0 override
     opaque = true
 }
+
+# Xwayland Video Bridge
+windowrule {
+    name = xwayland-video-bridge
+    match:class = ^(xwaylandvideobridge)$
+    opacity = 0.0 override 0.0 override
+    no_initial_focus = true
+    max_size = 1 1
+    no_blur = true
+}