Made the waybar a sidebar

This commit is contained in:
Michel Fedde 2025-04-13 18:06:20 +02:00
parent 75f6e5bb47
commit 6980360fe4
10 changed files with 121 additions and 50 deletions

View file

@ -85,3 +85,4 @@ echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \
cached_weather="$temperature \n$condition ${weather[1]}"
echo -e $cached_weather >~/.cache/.weather_cache

View file

@ -2,11 +2,6 @@
swaync-client --reload-css
# Reload waybar
killall waybar
killall pactl
nohup waybar &
# Reload hyprswitch
killall hyprswitch
nohup hyprswitch init --custom-css "$HOME/.config/hyprswitch/style.css" &

View file

@ -167,6 +167,16 @@
"interval": "once",
"tooltip": false
},
"custom/hoz-separator": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/hoz-separator-dotted": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/separator#line": {
"format": "|",
"interval": "once",
@ -188,7 +198,14 @@
"tooltip": false
},
"custom/pulseaudio-control": {
"exec": "pulseaudio-control --icons-volume ' , ' --icon-muted ' ' --node-nicknames-from 'device.nick' --node-nickname 'alsa_output.pci-0000_08_00.0.iec958-ac3-surround-51.monitor:Speaker' --node-nickname 'alsa_output.usb-Razer_Razer_Nari-00.pro-output-1:Headphones' listen",
"exec": "$HOME/.config/waybar/scripts/pulseaudio.sh text",
"on-click": "pulseaudio-control --node-blacklist 'alsa_output.usb-Razer_Razer_Nari-00.pro-output-0' next-node",
"on-click-middle": "exec pavucontrol &",
"on-click-right": "pulseaudio-control togmute"
},
"custom/pulseaudio-control#icons": {
"exec": "$HOME/.config/waybar/scripts/pulseaudio.sh icons",
"on-click": "pulseaudio-control --node-blacklist 'alsa_output.usb-Razer_Razer_Nari-00.pro-output-0' next-node",
"on-click-middle": "exec pavucontrol &",
"on-click-right": "pulseaudio-control togmute"

View file

@ -74,8 +74,7 @@
"transition-left-to-right": true
},
"modules": [
"custom/pulseaudio-control",
"custom/separator#blank_2",
"custom/pulseaudio-control#icons",
"pulseaudio#microphone",
]
},

View file

@ -5,11 +5,27 @@
"layer": "overlay",
"exclusive": false,
"position": "top",
"position": "right",
"reload_style_on_change": true,
"name": "semi-hidden",
"id": "semi-hidden",
"start_hidden": true,
"margin-top": 0
"margin-right": 0,
"modules-left": [
"group/app_drawer",
"custom/hoz-separator-dotted",
"group/mobo_drawer",
],
"modules-right": [
"group/laptop",
"custom/hoz-separator",
"tray",
"group/audio#pulsecontrol",
"custom/hoz-separator-dotted",
"group/status",
"custom/swaync",
],
}

View file

@ -0,0 +1,28 @@
#!/bin/env sh
SPEAKER_ICON="󰓃 "
HEADPHONE_ICON=" "
declare -A ICON_DEVICES
ICON_DEVICES[alsa_output.usb-Razer_Razer_Nari-00.pro-output-1]=$HEADPHONE_ICON
ICON_DEVICES[alsa_output.pci-0000_08_00.0.iec958-stereo]=$SPEAKER_ICON
ICON_VOLMUES=" , "
ICON_VOLUME_MUTED=" "
NICKNAME_SOURCE="device.nick"
FORMAT_DEFAULT='$VOL_ICON ${VOL_LEVEL}% $ICON_NODE $NODE_NICKNAME'
FORMAT_ICONS='$VOL_ICON $ICON_NODE $NODE_NICKNAME'
icon_devices_parameters=""
for device in "${!ICON_DEVICES[@]}"; do
icon_devices_parameters="${icon_devices_parameters} --node-nickname "${device}:${ICON_DEVICES[$device]}""
done
format=$FORMAT_DEFAULT
if [[ $1 == 'icons' ]]; then
format=$FORMAT_ICONS
fi
pulseaudio-control ${icon_devices_parameters} --icons-volume "${ICON_VOLMUES}" --icon-muted "${ICON_VOLUME_MUTED}" --node-nicknames-from "${NICKNAME_SOURCE}" --format "${format}" --color-muted "" listen

View file

@ -107,3 +107,17 @@
#custom-updates.pending-updates {
background-color: dodgerblue;
}
#custom-hoz-separator {
font-size: 0px;
border-radius: 0;
border-bottom: 1px solid $foreground
}
#custom-hoz-separator-dotted {
padding: 0 3px;
font-size: 0px;
border-radius: 0;
border-bottom: 1px dashed $foreground
}

View file

@ -29,15 +29,15 @@ window {
window.semi-hidden {
background-color: transparent;
* {
border-radius: 0 0 $border-radius $border-radius;
}
.modules-left, .modules-center, .modules-right {
border-radius: $border-radius 0 0 $border-radius;
border-right: none;
background-color: $background;
border-bottom: 1px solid rgba($foreground, 0.4);
border-left: 1px solid rgba($foreground, 0.4);
border-right: 1px solid rgba($foreground, 0.4);
border-top: 1px solid rgba($foreground, 0.4);
}
.modules-center {

View file

@ -5,13 +5,13 @@ foundSymlinks=false
for file in $(yadm diff --name-only --cached); do
lsResult=$(ls -1 -l "$file")
if [[ $lsResult != *"->"* ]]; then
break
continue
fi
symlinkTarget=$(echo "$lsResult" | awk '{print $NF}')
if [[ $lsResult != *"##"* ]]; then
break
continue
fi
echo "$file is a YADM symlink. Telling git to ignore it..."

1
.gitignore vendored
View file

@ -62,3 +62,4 @@
.config/waybar/Output.config.json
.config/evremap/evremap.toml
.config/hypr/config/Autostart.conf
.config/yadm/bootstrap.d/02-AMDGPUDrivers.sh