build status notifications for volume and brightness

This commit is contained in:
Never Gude 2026-03-15 20:20:28 +01:00
parent 41aaa02156
commit 78dce1ecfa
11 changed files with 188 additions and 93 deletions

View file

@ -0,0 +1 @@
50-user.conf

View file

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer><family>Caladea</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>Adwaita Sans</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Adwaita Mono</family></prefer>
</alias>
</fontconfig>

View file

@ -1,5 +1,5 @@
# output=<not set> # output=<not set>
font=Adwaita Mono font=monospace
# dpi-aware=auto # dpi-aware=auto
# use-bold=no # use-bold=no
prompt="" prompt=""
@ -50,18 +50,18 @@ inner-pad=4
# enable-mouse=yes # enable-mouse=yes
[colors] [colors]
background=191919E5 background=191919ff
text=ffffffff text=ffffffff
message=999999ff message=7f7f7fff
prompt=999999ff prompt=999999ff
placeholder=505050ff placeholder=505050ff
input=ffffffff input=ffffffff
match=7fc8ffff match=7fc8ffff
selection=7f7f7f7f selection=505050ff
selection-text=ffffffff selection-text=ffffffff
selection-match=7fc8ffff selection-match=7fc8ffff
counter=999999ff counter=999999ff
border=7f7f7fE5 border=999999ff
[border] [border]
width=2 width=2

View file

@ -1,4 +1,4 @@
font=Adwaita Sans 10 font=sans-serif
default-timeout=5000 default-timeout=5000
@ -7,6 +7,22 @@ anchor=top-center
margin=12 margin=12
padding=8 padding=8
background-color=#191919E5 background-color=#505050E5
border-color=#505050 border-color=#999999
progress-color=source #909090E5 progress-color=source #7f7f7fE5
[urgency=low]
border-color=#7f7f7f
[urgency=high]
border-color=#9b0000
default-timeout=0
[category=status]
anchor=center
group-by=category
history=0
format=<b>%s</b>\n%b
default-timeout=1000
# vim: ft=conf

View file

@ -344,9 +344,15 @@ window-rule {
match app-id=r#"ipe$"# title="^Ipe: waiting$" match app-id=r#"ipe$"# title="^Ipe: waiting$"
open-floating true open-floating true
} }
window-rule {
match is-floating=true
baba-is-float true
}
// Example: block out two password managers from screen capture. // Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.) // (This example rule is commented out with a "/-" in front.)
/-window-rule { window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"# match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"# match app-id=r#"^org\.gnome\.World\.Secrets$"#
@ -394,9 +400,9 @@ binds {
// Example volume keys mappings for PipeWire & WirePlumber. // Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked. // The allow-when-locked=true property makes them work even when the session is locked.
// Using spawn-sh allows to pass multiple arguments together with the command. // Using spawn-sh allows to pass multiple arguments together with the command.
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.05+ && volumenotify.fish"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.05- && volumenotify.fish"; }
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && volumenotify.fish"; }
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
XF86AudioPlay allow-when-locked=true { spawn-sh "mpc toggle"; } XF86AudioPlay allow-when-locked=true { spawn-sh "mpc toggle"; }
@ -405,8 +411,8 @@ binds {
// Example brightness key mappings for brightnessctl. // Example brightness key mappings for brightnessctl.
// You can use regular spawn with multiple arguments too (to avoid going through "sh"), // You can use regular spawn with multiple arguments too (to avoid going through "sh"),
// but you need to manually put each argument in separate "" quotes. // but you need to manually put each argument in separate "" quotes.
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } XF86MonBrightnessUp allow-when-locked=true { spawn-sh "brightnessctl --class=backlight set +5% && brightnessnotify.fish"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } XF86MonBrightnessDown allow-when-locked=true { spawn-sh "brightnessctl --class=backlight set 5%- && brightnessnotify.fish"; }
// Open/close the Overview: a zoomed-out view of workspaces and windows. // Open/close the Overview: a zoomed-out view of workspaces and windows.
// You can also move the mouse into the top-left hot corner, // You can also move the mouse into the top-left hot corner,

View file

@ -73,12 +73,34 @@
"format": "{icon}", "format": "{icon}",
"format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], "format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
"format-charging": "󰂄", "format-charging": "󰂄",
"tooltip-format": "{time} ({capacity}%)" "tooltip-format": "Battery ({capacity}%)\n{power}W {time}"
}, },
"clock": { "clock": {
"format-alt": "{:%a, %d. %b %H:%M}", "format": "{:%H:%M}",
"tooltip": false "format-alt": "{:%A, %B %d, %Y (%R)}",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#ffffff'><b>{}</b></span>",
"days": "<span color='#999999'>{}</span>",
"weeks": "<span color='#505050'>W{}</span>",
"weekdays": "<span color='#7f7f7f'>{}</span>",
"today": "<span color='#7fc8ff'><b>{}</b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
} }
} }

View file

@ -8,7 +8,7 @@
tooltip { tooltip {
font-weight: normal; font-weight: normal;
background: rgba(25, 25, 25, 0.9); background: rgba(25, 25, 25, 0.9);
border: solid 2px #505050; border: solid 2px rgba(80, 80, 80, 0.9);
border-radius: 0px; border-radius: 0px;
} }

View file

@ -1,5 +1,6 @@
#!/usr/bin/env fish #!/usr/bin/env fish
# Select folders in current semester
function open_semester function open_semester
set recent "/home/never/Documents/InNa/25_WiSe/" set recent "/home/never/Documents/InNa/25_WiSe/"
set options (ls $recent) set options (ls $recent)
@ -8,6 +9,7 @@ function open_semester
alacritty --working-directory $recent/$input alacritty --working-directory $recent/$input
end end
# Open user directories
function open_location function open_location
set options "25_WiSe" "󰈙 Documents" "󰝚 Music" "󰋩 Pictures" "󰕧 Videos" "󰇚 Downloads" set options "25_WiSe" "󰈙 Documents" "󰝚 Music" "󰋩 Pictures" "󰕧 Videos" "󰇚 Downloads"
set input (menu $options) set input (menu $options)
@ -28,6 +30,7 @@ function open_location
end end
end end
# Open WueCampus Courses
function open_course function open_course
set options "Algorithmen und Datenstrukturen" "Modellbildung und Simulation" "Amateurfunkkurs" "Datenbanken" set options "Algorithmen und Datenstrukturen" "Modellbildung und Simulation" "Amateurfunkkurs" "Datenbanken"
set input (menu $options) set input (menu $options)
@ -44,6 +47,7 @@ function open_course
end end
end end
# Select the default audio source
function audio_source function audio_source
set dump (string trim -c '"' (pw-dump | jq '.[] | select(.info.props."media.class" == "Audio/Source")' | jq '.id, .info.props."node.description"')) set dump (string trim -c '"' (pw-dump | jq '.[] | select(.info.props."media.class" == "Audio/Source")' | jq '.id, .info.props."node.description"'))
@ -63,6 +67,7 @@ function audio_source
wpctl set-default $ids[$input] wpctl set-default $ids[$input]
end end
# Select the default audio sink
function audio_sink function audio_sink
set dump (string trim -c '"' (pw-dump | jq '.[] | select(.info.props."media.class" == "Audio/Sink")' | jq '.id, .info.props."node.description"')) set dump (string trim -c '"' (pw-dump | jq '.[] | select(.info.props."media.class" == "Audio/Sink")' | jq '.id, .info.props."node.description"'))
@ -82,6 +87,7 @@ function audio_sink
wpctl set-default $ids[$input] wpctl set-default $ids[$input]
end end
# Select the network connection profile
function network_connection function network_connection
set options (nmcli --terse --fields name connection show) set options (nmcli --terse --fields name connection show)
set input (menu $options || exit) set input (menu $options || exit)
@ -89,6 +95,7 @@ function network_connection
notify-send "Connect to network $input" (nmcli connection up $input) notify-send "Connect to network $input" (nmcli connection up $input)
end end
# Select a paired bluetooth connection
function bluetooth_connection function bluetooth_connection
set dump (bluetoothctl devices | string replace "Device " "" | string split -m 1 " ") set dump (bluetoothctl devices | string replace "Device " "" | string split -m 1 " ")
@ -108,18 +115,23 @@ function bluetooth_connection
notify-send "Connect to bluetooth device $names[$input]" (bluetoothctl connect $ids[$input] | string collect) notify-send "Connect to bluetooth device $names[$input]" (bluetoothctl connect $ids[$input] | string collect)
end end
# Select the system color scheme preference
function color_scheme function color_scheme
set options "Light" "Dark" set options "Light" "Dark"
set input (menu $options) set input (menu $options)
switch $input switch $input
case $options[1] case $options[1]
niri msg action do-screen-transition
dconf write /org/gnome/desktop/interface/color-scheme \'prefer-light\' dconf write /org/gnome/desktop/interface/color-scheme \'prefer-light\'
case $options[2] case $options[2]
niri msg action do-screen-transition
dconf write /org/gnome/desktop/interface/color-scheme \'prefer-dark\' dconf write /org/gnome/desktop/interface/color-scheme \'prefer-dark\'
end end
end end
# Select sub menu
set options "󱂵 Open Location" "󰑴 Open WueCampus Course" "󰍬 Select Audio Source" "󰕾 Select Audio Sink" "󰂯 Select Bluetooth" "󰛳 Select Network" "󰔎 Color Scheme" set options "󱂵 Open Location" "󰑴 Open WueCampus Course" "󰍬 Select Audio Source" "󰕾 Select Audio Sink" "󰂯 Select Bluetooth" "󰛳 Select Network" "󰔎 Color Scheme"
set input (menu $options) set input (menu $options)

View file

@ -0,0 +1,8 @@
#!/usr/bin/env fish
set brightness (brightnessctl --class=backlight get)
set max_brightness (brightnessctl --class=backlight max)
set brightness (math --scale 0 --scale-mode round "($brightness / $max_brightness) * 100")
notify-send -c 'status' -h int:value:$brightness "Brightness: $brightness%"

View file

@ -0,0 +1,7 @@
#!/usr/bin/env fish
set volume (string match -r '[0-9]+.[0-9]+' (wpctl get-volume @DEFAULT_AUDIO_SINK@))
set volume (math --scale 0 --scale-mode round "$volume * 100")
notify-send -c 'status' -h int:value:$volume "Volume: $volume%"

View file

@ -22,7 +22,7 @@ stow ./
Install necessary software. Install necessary software.
```sh ```sh
sudo dnf install fish niri waybar fuzzel mako swaylock swaybg swayidle alacritty sudo dnf install fish niri brightnessctl waybar fuzzel mako swaylock swaybg swayidle alacritty
``` ```
Change the shell to `fish`. Change the shell to `fish`.
@ -51,6 +51,13 @@ Install the packages.
sudo dnf install qt6-qtbase-devel qt6-qtbase-static qt6-qt3d-devel harfbuzz-devel qt6-qtsvg-devel qt6-qtspeech-devel sudo dnf install qt6-qtbase-devel qt6-qtbase-static qt6-qt3d-devel harfbuzz-devel qt6-qtsvg-devel qt6-qtspeech-devel
``` ```
### LuaKit
Build the develop branch of [Luakit](https://github.com/luakit/luakit).
Install the packages.
```sh
sudo dnf install gtk3-devel webkit2gtk4.1-devel sqlite3pp-devel luajit-devel lua5.1-filesystem
```
### mpd ### mpd
Install mpd. Install mpd.
```sh ```sh