added volume notification

This commit is contained in:
Mike G 2024-10-06 08:08:49 -04:00
parent da27987793
commit 246973759d
5 changed files with 36 additions and 6 deletions

View file

@ -214,7 +214,7 @@
enable_recursive_icon_lookup = true
# Set icon theme (only used for recursive icon lookup)
icon_theme = "Papirus, Adwaita"
icon_theme = "Papirus-Dark, Adwaita"
# You can also set multiple icon themes, with the leftmost one being used first.
# icon_theme = "Adwaita, breeze"
@ -224,7 +224,7 @@
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 16
min_icon_size = 24
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 128

View file

@ -241,9 +241,9 @@ bindsym $mod+r mode "resize"
#
# Custom keybinds for latop controls
#
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && /home/emge/Scripts/volume-notif.sh
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && /home/emge/Scripts/volume-notif.sh
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && /home/emge/Scripts/volume-notif.sh
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFUALT_SOURCE@ toggle
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+

View file

@ -30,7 +30,7 @@
"clock": {
"interval": 60,
"format": "{:%a %b %e %I:%M}",
"format": "{:%a, %b %e <big>/ %I:%M /</big>}",
"tooltip-format": "<tt>{calendar}</tt>",
"calendar": {
"mode" : "year",

11
Scripts/background-changer.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
wallpapers_path=/home/emge/Wallpapers/
# while true; do
# swaybg -i $(find $wallpapers_path -type f | shuf -n 1) -m fill
# sleep 29m
# done
# sleep 1m
swaymsg output "*" bg $(find $wallpapers_path -type f | shuf -n 1) fill

19
Scripts/volume-notif.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
# dunst change volume notification
# set varialbe $volume to current volume level
# --get-volume returns two equal values, the awk
# pipe pulls just the first one - both values
# should match unless balance was adjusted
volume=$(pulsemixer --get-volume | awk '{print $1}')
# set variable $muted to current mute setting
muted=$(pulsemixer --get-mute)
if [[ $muted == 1 || $volume == 0 ]]; then
# show muted notification
dunstify -u low -i audio-volume-muted -h string:x-dunst-stack-tag:Volume "Volume Muted"
else
# show volume notification
dunstify -u low -i audio-volume-high -h string:x-dunst-stack-tag:Volume -h int:value:"$volume" "Volume: ${volume}%"
fi