2 Angajamente 62f2707bff ... 580fcf672b

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  Noah Vogt 580fcf672b more and better window rules 1 zi în urmă
  Noah Vogt c0e3ef4b78 keyboard and display background now via notification 1 zi în urmă

+ 33 - 13
dot-config/hypr/hyprland.conf

@@ -12,7 +12,7 @@ $mainMod = SUPER
 $terminal = kitty
 $fileManager = nautilus
 $menu = fuzzel
-$browser = brave
+$browser = chromium
 
 #################
 ### AUTOSTART ###
@@ -334,8 +334,10 @@ bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@
 bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
 bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
 bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
-bindel = ,XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/brightness.sh 5%+
-bindel = ,XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/brightness.sh 5%-
+bindel = ,XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/display-brightness.sh 5%+
+bindel = ,XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/display-brightness.sh 5%-
+bindel = $mainMod, XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/keyboard-brightness.sh 5%+
+bindel = $mainMod, XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/keyboard-brightness.sh 5%-
 
 # Requires playerctl
 bindl = , XF86AudioNext, exec, playerctl next
@@ -350,11 +352,8 @@ bindl = , XF86AudioPrev, exec, playerctl previous
 # See https://wiki.hypr.land/Configuring/Window-Rules/ for more
 # See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
 
-# Example windowrules that are useful
-
 windowrule {
     name = opaque-floating
-
     match:float = true
 
     opacity = 1.0 override 1.0 override
@@ -368,23 +367,22 @@ windowrule {
     suppress_event = maximize
 }
 
+# Fix some dragging issues with XWayland
 windowrule {
-    # Fix some dragging issues with XWayland
     name = fix-xwayland-drags
     match:class = ^$
+
     match:title = ^$
     match:xwayland = true
     match:float = true
     match:fullscreen = false
     match:pin = false
-
     no_focus = true
 }
 
 # Hyprland-run windowrule
 windowrule {
     name = move-hyprland-run
-
     match:class = hyprland-run
 
     move = 20 monitor_h-120
@@ -392,20 +390,42 @@ windowrule {
 }
 
 windowrule {
-    name = browser-opacity
-
-    match:class = ^(chromium|brave-browser)$
+    name = browser-opacity-and-workspace
+    match:class = ^($browser)$
 
     opacity = 1.0 override 1.0 override
     opaque = true
+    workspace = 2
 }
 
-# Xwayland Video Bridge
 windowrule {
     name = xwayland-video-bridge
     match:class = ^(xwaylandvideobridge)$
+
     opacity = 0.0 override 0.0 override
+    workspace = 9
     no_initial_focus = true
     max_size = 1 1
     no_blur = true
 }
+
+windowrule{
+    name = keepassxc-workspace
+    match:class = ^(org.keepassxc.KeePassXC)$
+
+    workspace = 5
+}
+
+windowrule{
+    name = localsend-workspace
+    match:class = ^(localsend)$
+
+    workspace = 10
+}
+
+windowrule{
+    name = logseq-workspace
+    match:class = ^(Logseq)$
+
+    workspace = 6
+}

+ 2 - 1
dot-config/hypr/scripts/brightness.sh → dot-config/hypr/scripts/display-brightness.sh

@@ -1,6 +1,7 @@
 #!/bin/sh
 
-# Apply the brightness change passed as an argument (e.g., 5%+ or 5%-)
+# script to set the display backlight brightness by the passed amount ($1)
+
 brightnessctl -e4 -n2 set "$1"
 
 PERCENT=$(brightnessctl -m | awk -F, '{print $4}' | tr -d '%')

+ 16 - 0
dot-config/hypr/scripts/keyboard-brightness.sh

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# script to set the keyboard backlight brightness by the passed amount ($1)
+
+device=$(brightnessctl -l | grep "kbd_backlight" | head -n 1 | awk '{print $2}' | tr -d "'")
+brightnessctl -d "$device" set "$1"
+
+PERCENT=$(brightnessctl -m -d "$device" | awk -F, '{print $4}' | tr -d '%')
+
+notify-send -i keyboard-brightness-symbolic \
+    -h int:transient:1 \
+    -h int:SWAYNC_BYPASS_DND:1 \
+    -h string:x-canonical-private-synchronous:brightness \
+    -h int:value:"$PERCENT" \
+    -t 1500 \
+    "Brightness: ${PERCENT}%"