diff options
| author | Mosder <xmosder12@gmail.com> | 2025-11-02 20:14:11 +0100 |
|---|---|---|
| committer | Mosder <xmosder12@gmail.com> | 2025-11-02 20:14:11 +0100 |
| commit | c6ff7b4d2c91fbc086e573e01f76da3dc3ef3ed3 (patch) | |
| tree | 0594eb4ed8894b9a42e559c25a7c13760ae18430 /laptop/.config | |
| parent | 5ac0ba36a26abd999dd3e6ce0c0caa7e739717b2 (diff) | |
✨ feat(hypr): integrate swayosd, add scripts and update keybindings
Diffstat (limited to 'laptop/.config')
| -rw-r--r-- | laptop/.config/hypr/hyprland.conf | 25 | ||||
| -rwxr-xr-x | laptop/.config/hypr/scripts/capture-window.sh | 10 | ||||
| -rwxr-xr-x | laptop/.config/hypr/scripts/current-brightness.sh | 4 | ||||
| -rw-r--r-- | laptop/.config/swayosd/config.toml | 3 | ||||
| -rw-r--r-- | laptop/.config/swayosd/style.css | 24 |
5 files changed, 56 insertions, 10 deletions
diff --git a/laptop/.config/hypr/hyprland.conf b/laptop/.config/hypr/hyprland.conf index 05fea03..f530b80 100644 --- a/laptop/.config/hypr/hyprland.conf +++ b/laptop/.config/hypr/hyprland.conf @@ -40,6 +40,8 @@ exec-once = $scriptsDir/randomize-wallpaper.sh exec-once = hyprpaper exec-once = hypridle exec-once = $scriptsDir/battery-notifier.sh +exec-once = udiskie +exec-once = swayosd-server # Lock after autologin in sddm, to use lockscreen as login exec-once = hyprlock @@ -187,6 +189,7 @@ master { misc { force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( + middle_click_paste = false } @@ -242,6 +245,8 @@ bind = $mainMod, B, exec, $browser bind = $mainMod, D, exec, discord bind = $mainMod, I, exec, intellij-idea-ultimate-edition bind = $mainMod SHIFT, S, exec, flameshot gui +bind = , Print, exec, flameshot gui --region 1920x1080+0+0 +bind = ALT, Print, exec, $scriptsDir/capture-window.sh bind = $mainMod SHIFT, P, exec, hyprpicker -a bind = $mainMod, L, exec, hyprlock bind = $mainMod, N, exec, dunstctl close-all @@ -285,18 +290,18 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # 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%- -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindel = ,XF86MonBrightnessUp, exec, brightnessctl set 5%+ -bindel = ,XF86MonBrightnessDown, exec, brightnessctl set 5%- +bindel = ,XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise +bindel = ,XF86AudioLowerVolume, exec, swayosd-client --output-volume lower +bindel = ,XF86AudioMute, exec, swayosd-client --output-volume mute-toggle +bindel = ,XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl set 5%+; $scriptsDir/current-brightness.sh | xargs swayosd-client --brightness +bindel = ,XF86MonBrightnessDown, exec, brightnessctl set 5%-; $scriptsDir/current-brightness.sh | xargs swayosd-client --brightness # Requires playerctl -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPause, exec, playerctl play-pause -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioPrev, exec, playerctl previous +bindl = , XF86AudioNext, exec, swayosd-client --playerctl next +bindl = , XF86AudioPause, exec, swayosd-client --playerctl play-pause +bindl = , XF86AudioPlay, exec, swayosd-client --playerctl play-pause +bindl = , XF86AudioPrev, exec, swayosd-client --playerctl previous ############################## ### WINDOWS AND WORKSPACES ### diff --git a/laptop/.config/hypr/scripts/capture-window.sh b/laptop/.config/hypr/scripts/capture-window.sh new file mode 100755 index 0000000..2299cb0 --- /dev/null +++ b/laptop/.config/hypr/scripts/capture-window.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# get size and offset of active window +size=$(hyprctl activewindow | grep size: | awk -F" " '{print $2}') +size=${size/,/x} +offset=$(hyprctl activewindow | grep at: | awk -F" " '{print $2}') +offset=${offset/,/+} + +# open gui with selected region +flameshot gui --region $size+$offset diff --git a/laptop/.config/hypr/scripts/current-brightness.sh b/laptop/.config/hypr/scripts/current-brightness.sh new file mode 100755 index 0000000..4856e59 --- /dev/null +++ b/laptop/.config/hypr/scripts/current-brightness.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +s=$(brightnessctl | grep % | awk -F" " '{print $4}') +echo ${s:1:-2} diff --git a/laptop/.config/swayosd/config.toml b/laptop/.config/swayosd/config.toml new file mode 100644 index 0000000..5c70f63 --- /dev/null +++ b/laptop/.config/swayosd/config.toml @@ -0,0 +1,3 @@ +[server] +top_margin = 0.93 +playerctl_format = "{title}" diff --git a/laptop/.config/swayosd/style.css b/laptop/.config/swayosd/style.css new file mode 100644 index 0000000..4fa0c4c --- /dev/null +++ b/laptop/.config/swayosd/style.css @@ -0,0 +1,24 @@ +window#osd { + border-radius: 5px; + border: 2px solid #9b00bb; + background: #282c34; +} + +window#osd #container { + margin: 5px; +} + +window#osd progressbar:disabled, +window#osd image:disabled { + opacity: 0.5; +} + +window#osd progressbar { + min-height: 6px; + border-radius: 5px; + color: #df0055; +} + +window#osd progress { + background: #df0055; +} |
