[waybar] work in progress

This commit is contained in:
Simon Cornet 2024-03-31 18:23:17 +02:00
parent 119221fc7e
commit 65b1f11f56
8 changed files with 83 additions and 49 deletions

View File

@ -6,10 +6,10 @@ function toggle () {
if pgrep "hypridle" > /dev/null if pgrep "hypridle" > /dev/null
then then
pkill hypridle pkill hypridle
notify-send -u normal -t 4500 "🙈 Hypridle Inactive" notify-send -u normal -t 4500 "󰐩 Hypridle Inactive"
else else
hypridle & hypridle &
notify-send -u normal -t 4500 "🙊 Hypridle Active" notify-send -u normal -t 4500 "󰐨 Hypridle Active"
fi fi
} }
@ -21,9 +21,9 @@ case $1 in
*) *)
if pgrep "hypridle" > /dev/null if pgrep "hypridle" > /dev/null
then then
icon="🙊" icon="󰐨"
else else
icon="🙈" icon="󰐩"
fi fi
printf "%s" "$icon" printf "%s" "$icon"
;; ;;

View File

@ -1,9 +1,9 @@
/* general settings */
* { * {
border: 3px;
border-radius: 10px; border-radius: 10px;
font-family: Ubuntu, Light; font-family: "CommitMono Nerd Font";
font-weight: normal; font-weight: normal;
font-size: 17px; font-size: 18px;
min-height: 0; min-height: 0;
} }
@ -35,23 +35,58 @@ tooltip {
margin: 5px 5px; margin: 5px 5px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 0px; margin-bottom: 0px;
border: 2px solid #595959; border: 0px solid #595959;
} }
#clock {
color: #fab387;
border: 2px solid #4771c9;
}
#pulseaudio { /* left segment */
margin-right: 10px; #window {
margin-left: 0px;
padding: 0px 10px;
border-radius: 0px 10px 10px 0px;
} }
#workspaces{ #workspaces{
margin-left: 10px; margin-left: 10px;
margin-right: 0px;
padding: 0px 0px; padding: 0px 0px;
border-radius: 10px 0px 0px 10px;
} }
#workspaces button.active { #workspaces button.active {
color: #89b4fa; color: #89b4fa;
} }
/* middle segment */
#clock {
color: #fab387;
border: 2px solid #4771c9;
}
/* right segment */
#tray {
border-radius: 10px 0px 0px 10px;
margin-left: 10px;
margin-right: 0px;
font-size: 20px;
}
#backlight,
#battery,
#custom-hypridle,
#custom-wireguard,
#network {
border-radius: 0px 0px 0px 0px;
font-size: 20px;
margin-right: -3px;
margin-left: 0px;
}
#pulseaudio {
border-radius: 0px 10px 10px 0px;
font-size: 20px;
margin-left: 0px;
margin-right: 10px;
}

View File

@ -20,7 +20,6 @@
], ],
"modules-right": [ "modules-right": [
"custom/spotify",
"tray", "tray",
"custom/hypridle", "custom/hypridle",
"custom/wireguard", "custom/wireguard",
@ -35,12 +34,10 @@
"device": "intel_backlight", "device": "intel_backlight",
"format": "{icon} {percent}%", "format": "{icon} {percent}%",
"format-icons": [ "format-icons": [
"🔅", "󰃞",
"🔆", "󰃟",
"☀️" "󰃠"
], ],
"max-length": 7,
"min-length": 7,
"on-scroll-up": "brightnessctl set 5%+", "on-scroll-up": "brightnessctl set 5%+",
"on-scroll-down": "brightnessctl set 5%-" "on-scroll-down": "brightnessctl set 5%-"
}, },
@ -54,30 +51,30 @@
"format": "{icon} {capacity}%", "format": "{icon} {capacity}%",
"format-full": "{icon}", "format-full": "{icon}",
"format-icons": [ "format-icons": [
"🪫", "",
"🪫", "",
"🪫", "",
"🔋", "",
"🔋" ""
], ],
}, },
"clock": { "clock": {
"format": "{:🕒 %R 🗓️ %d-%m}", "format": "{: %R  %d-%m}",
"timezones": ["Europe/Amsterdam", "Asia/Kolkata"], "timezones": ["Europe/Amsterdam", "Asia/Kolkata"],
"actions": { "on-click": "tz_down" }, "actions": { "on-click": "tz_down" },
"tooltip-format": "<tt><small>{calendar}</small></tt>" "tooltip-format": "<tt><small>{calendar}</small></tt>"
}, },
"custom/hypridle": { "custom/hypridle": {
"interval": 2, "interval": 1,
"format": "{}", "format": "{}",
"exec": "$HOME/.dotfiles/apps/hyprland/hypridle.sh", "exec": "$HOME/.dotfiles/apps/hyprland/hypridle.sh",
"on-click": "$HOME/.dotfiles/apps/hyprland/hypridle.sh toggle" "on-click": "$HOME/.dotfiles/apps/hyprland/hypridle.sh toggle"
}, },
"custom/wireguard": { "custom/wireguard": {
"interval": 2, "interval": 1,
"format": "{}", "format": "{}",
"exec": "$HOME/.dotfiles/apps/wireguard/wireguard.sh status", "exec": "$HOME/.dotfiles/apps/wireguard/wireguard.sh status",
"on-click": "$HOME/.dotfiles/apps/wireguard/wireguard.sh switch" "on-click": "$HOME/.dotfiles/apps/wireguard/wireguard.sh switch"
@ -107,26 +104,26 @@
"network": { "network": {
"tooltip": true, "tooltip": true,
"format-wifi": "📡", "format-wifi": "󰣶",
"format-ethernet": "🌐", "format-ethernet": "󰱓",
"tooltip-format-wifi": "SSID: {essid}\nSignal Strength: {signalStrength}%\nIP: {ipaddr}\nNetmask: {netmask} (/{cidr})\nGateway: {gwaddr}", "tooltip-format-wifi": "SSID: {essid}\nSignal Strength: {signalStrength}%\nIP: {ipaddr}\nNetmask: {netmask} (/{cidr})\nGateway: {gwaddr}",
"tooltip-format-ethernet": "IP: {ipaddr}\nNetmask: {netmask} (/{cidr})\nGateway: {gwaddr}", "tooltip-format-ethernet": "IP: {ipaddr}\nNetmask: {netmask} (/{cidr})\nGateway: {gwaddr}",
"on-click": "alacritty --class nmtui --command ~/.dotfiles/apps/hyprland/nmtui.sh" "on-click": "alacritty --class nmtui --command ~/.dotfiles/apps/hyprland/nmtui.sh"
}, },
"pulseaudio": { "pulseaudio": {
"format": "{icon} {volume:2}%", "format": "{icon} ",
"format-muted": "🔇", "format-muted": "󰖁 ",
"format-icons": { "format-icons": {
"headphones": "🎧", "headphone": "",
"default": [ "hands-free": "",
"🔉", "headset": "",
"🔊" "phone": "",
] "portable": "",
}, "car": "",
"default": ["", "", ""]
},
"scroll-step": 5, "scroll-step": 5,
"max-length": 8,
"min-length": 8,
"on-click": "easyeffects" "on-click": "easyeffects"
}, },

View File

@ -11,16 +11,16 @@ status_vpn () {
# check for tailscale status # check for tailscale status
if echo "$tailscale_status" | grep "$hostname_short" &> /dev/null; then if echo "$tailscale_status" | grep "$hostname_short" &> /dev/null; then
vpn_status+='🔒 ' vpn_status+=' '
else else
vpn_status+='🔓 ' vpn_status+=' '
fi fi
# check for direct connectivity # check for direct connectivity
if "$tailscale_bin" status | grep allegro | grep direct &> /dev/null; then if "$tailscale_bin" status | grep allegro | grep direct &> /dev/null; then
vpn_status+='' vpn_status+='󰞁'
else else
vpn_status+='⚠️' vpn_status+='󱀀'
fi fi
echo "$vpn_status" echo "$vpn_status"

View File

@ -87,9 +87,9 @@
bind = $mainMod SHIFT, right, resizeactive, 50 0 bind = $mainMod SHIFT, right, resizeactive, 50 0
# multimedia key bindings # multimedia key bindings
bind = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle bind = ,XF86AudioMute, exec, pw-volume mute toggle
bind = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ bind = ,XF86AudioRaiseVolume, exec, pw-volume change +5%
bind = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bind = ,XF86AudioLowerVolume, exec, pw-volume change -5%
bind = ,XF86MonBrightnessDown, exec, brightnessctl set 10%- bind = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-
bind = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+ bind = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+

View File

@ -26,7 +26,7 @@
exec = ~/.dotfiles/apps/wallpaper/startup.sh exec = ~/.dotfiles/apps/wallpaper/startup.sh
# set volume # set volume
exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 80% exec-once = pw-volume change 80%
# solaar # solaar
exec-once = ~/.dotfiles/apps/hyprland/startup/solaar.sh exec-once = ~/.dotfiles/apps/hyprland/startup/solaar.sh

View File

@ -16,7 +16,7 @@
margin = "10,10,10"; margin = "10,10,10";
# theme # theme
font = "Ubuntu Light 12"; font = "CommitMono Nerd Font 12";
# size # size
width = 350; width = 350;

View File

@ -12,8 +12,10 @@
htop htop
intel-gpu-tools intel-gpu-tools
killall killall
nerdfonts
radeontop radeontop
pciutils pciutils
pw-volume
powertop powertop
solaar solaar
spice-vdagent spice-vdagent