my_konfig
This commit is contained in:
@@ -2,33 +2,30 @@
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 35,
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-left": ["sway/workspaces", "mpd", "sway/mode"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["mpris", "tray", "pulseaudio", "custom/bluetooth", "network", "cpu", "memory", "sway/window", "idle_inhibitor", "custom/power"],
|
||||
|
||||
"mpris": {
|
||||
"format": "{player_icon} {dynamic}",
|
||||
"format-paused": "{player_icon} {dynamic}",
|
||||
"player-icons": {
|
||||
"default": "🎵",
|
||||
"kew": "🎧"
|
||||
},
|
||||
"tooltip-format": "Titel: {title}\nAlbum: {album}\nKünstler: {artist}",
|
||||
"max-length": 30,
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-scroll-up": "playerctl next",
|
||||
"on-scroll-down": "playerctl previous"
|
||||
},
|
||||
"modules-right": ["custom/updates", "tray", "pulseaudio", "custom/bluetooth", "custom/vpn", "network", "custom/rclone", "cpu", "memory", "temperature", "sway/window", "idle_inhibitor"],
|
||||
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 10
|
||||
"spacing": 10,
|
||||
"excluded-icons": ["Nextcloud"]
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "~/.config/waybar/power.sh"
|
||||
"mpd": {
|
||||
"format": "{stateIcon}",
|
||||
"format-disconnected": "MPD nicht verbunden",
|
||||
"format-stopped": "",
|
||||
"state-icons": {
|
||||
"playing": "",
|
||||
"paused": ""
|
||||
},
|
||||
"port": 6601,
|
||||
"tooltip-delay": 0,
|
||||
"tooltip-format": "{title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
|
||||
"on-click": "mpc -p 6601 toggle",
|
||||
"on-scroll-up": "mpc -p 6601 prev",
|
||||
"on-scroll-down": "mpc -p 6601 next"
|
||||
},
|
||||
|
||||
"custom/bluetooth": {
|
||||
@@ -39,6 +36,12 @@
|
||||
"on-click": "~/.config/waybar/bluetooth.sh"
|
||||
},
|
||||
|
||||
"custom/vpn": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/vpn-status.sh",
|
||||
"interval": 5
|
||||
},
|
||||
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
@@ -60,11 +63,17 @@
|
||||
"cpu": {
|
||||
"format": " {usage}%",
|
||||
"tooltip": true,
|
||||
"interval": 1
|
||||
"interval": 4
|
||||
},
|
||||
"memory": {
|
||||
"format": " {}%",
|
||||
"interval": 1
|
||||
"interval": 4
|
||||
},
|
||||
"temperature": {
|
||||
"hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input",
|
||||
"format": " {temperatureC}°C",
|
||||
"critical-threshold": 90,
|
||||
"interval": 4
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": " {essid}",
|
||||
@@ -74,9 +83,18 @@
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"on-click": "alacritty -e iwctl"
|
||||
},
|
||||
|
||||
"custom/rclone": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/rclone-status.sh",
|
||||
"interval": 10
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"reverse-scrolling": 1,
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "",
|
||||
"tooltip-format": "Gerät: {desc}",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
@@ -90,6 +108,14 @@
|
||||
"on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
},
|
||||
|
||||
"custom/updates": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/updates.sh",
|
||||
"interval": 3600,
|
||||
"tooltip": true,
|
||||
"on-click": "alacritty -e sudo pacman -Syu"
|
||||
},
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
|
||||
33
config/waybar/rclone-status.sh
Executable file
33
config/waybar/rclone-status.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Default error state
|
||||
ICON=""
|
||||
TEXT="Unknown"
|
||||
|
||||
# Check for DBUS session
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
TEXT="No D-Bus"
|
||||
else
|
||||
# Check if the service is active (syncing)
|
||||
if systemctl --user is-active --quiet rclone-sync.service; then
|
||||
ICON=""
|
||||
TEXT="Sync..."
|
||||
else
|
||||
# Check if the service file exists/is loaded
|
||||
if ! systemctl --user list-units --all | grep -q "rclone-sync.service"; then
|
||||
TEXT="No Service"
|
||||
else
|
||||
LAST_STATUS=$(systemctl --user show rclone-sync.service -p ExecMainStatus --value)
|
||||
if [ "$LAST_STATUS" == "0" ]; then
|
||||
ICON=""
|
||||
TEXT="OK"
|
||||
else
|
||||
ICON=""
|
||||
TEXT="Fehler"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Output a single line of plain text
|
||||
printf "%s %s\n" "$ICON" "$TEXT"
|
||||
@@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(30, 30, 46, 0.85); /* Base with transparency */
|
||||
background-color: rgba(30, 30, 46, 0.65); /* Base with transparency */
|
||||
color: #cdd6f4; /* Text */
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
@@ -20,12 +20,17 @@ window#waybar {
|
||||
#clock,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#custom-bluetooth,
|
||||
#custom-power,
|
||||
#window,
|
||||
#mpris {
|
||||
#mpris,
|
||||
#custom-rclone,
|
||||
#custom-updates,
|
||||
#custom-vpn,
|
||||
#mpd {
|
||||
padding: 2px 10px;
|
||||
margin: 3px 3px;
|
||||
border-radius: 10px;
|
||||
@@ -80,6 +85,15 @@ window#waybar {
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #a6e3a1; /* Green */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #f38ba8; /* Red */
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #f9e2af; /* Yellow */
|
||||
color: #1e1e2e; /* Base */
|
||||
@@ -95,13 +109,18 @@ window#waybar {
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #f5e0dc; /* Rosewater */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
color: #cdd6f4; /* Text */
|
||||
}
|
||||
|
||||
/* Hover-Effekt für alle Module */
|
||||
#workspaces:hover, #mode:hover, #clock:hover, #cpu:hover, #memory:hover, #network:hover, #pulseaudio:hover, #custom-bluetooth:hover, #custom-power:hover {
|
||||
#workspaces:hover, #mode:hover, #clock:hover, #cpu:hover, #memory:hover, #network:hover, #pulseaudio:hover, #custom-bluetooth:hover, #custom-power:hover, #mpd:hover {
|
||||
background-color: rgba(88, 91, 112, 0.9); /* Surface2 with transparency */
|
||||
}
|
||||
|
||||
@@ -116,3 +135,30 @@ window#waybar {
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #a6e3a1; /* Green */
|
||||
}
|
||||
|
||||
#custom-rclone {
|
||||
background-color: #89b4fa; /* Blue */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#custom-updates {
|
||||
background-color: #fab387; /* Orange */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#custom-vpn {
|
||||
background-color: #89b4fa; /* Blue */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#tooltip {
|
||||
background-color: #1e1e2e; /* Base */
|
||||
color: #cdd6f4; /* Text */
|
||||
border-radius: 10px;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #313244; /* Surface0 */
|
||||
}
|
||||
|
||||
#tooltip label {
|
||||
color: #cdd6f4; /* Text */
|
||||
}
|
||||
|
||||
18
config/waybar/updates.sh
Executable file
18
config/waybar/updates.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Führt checkupdates aus und fängt die Ausgabe ab
|
||||
updates=$(checkupdates)
|
||||
|
||||
# Prüft, ob die Ausgabe von checkupdates nicht leer ist
|
||||
if [ -n "$updates" ]; then
|
||||
# Zählt die Anzahl der verfügbaren Updates
|
||||
num_updates=$(echo "$updates" | wc -l)
|
||||
# Erstellt einen Tooltip mit den Paketnamen
|
||||
tooltip=$(echo "$updates" | sed 's/ -> / /')
|
||||
|
||||
# Gibt das JSON-Format für Waybar aus
|
||||
printf '{"text": " %s", "tooltip": "%s"}\n' "$num_updates" "$tooltip"
|
||||
else
|
||||
# Gibt nichts aus, damit Waybar das Modul verbirgt
|
||||
exit 0
|
||||
fi
|
||||
12
config/waybar/vpn-status.sh
Executable file
12
config/waybar/vpn-status.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script checks for a WireGuard interface.
|
||||
WG_INTERFACE="wg0"
|
||||
|
||||
if ip link show "$WG_INTERFACE" &> /dev/null; then
|
||||
# If the interface exists, VPN is on.
|
||||
printf " VPN On\n"
|
||||
else
|
||||
# If not, VPN is off.
|
||||
printf " VPN Off\n"
|
||||
fi
|
||||
Reference in New Issue
Block a user