Made the waybar a sidebar
This commit is contained in:
parent
75f6e5bb47
commit
6980360fe4
10 changed files with 121 additions and 50 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -72,10 +72,9 @@
|
|||
"transition-duration": 500,
|
||||
"children-class": "pulseaudio",
|
||||
"transition-left-to-right": true
|
||||
},
|
||||
},
|
||||
"modules": [
|
||||
"custom/pulseaudio-control",
|
||||
"custom/separator#blank_2",
|
||||
"custom/pulseaudio-control#icons",
|
||||
"pulseaudio#microphone",
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
],
|
||||
}
|
||||
|
|
|
|||
28
.config/waybar/scripts/pulseaudio.sh
Executable file
28
.config/waybar/scripts/pulseaudio.sh
Executable 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
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue