Compare commits
3 Commits
1254bf1e01
...
09770263fb
Author | SHA1 | Date | |
---|---|---|---|
09770263fb | |||
a91a9f34bf | |||
079779a52a |
@@ -5,7 +5,7 @@
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"margin": "5 5 5 5",
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "mpris"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": [
|
||||
"custom/pacman",
|
||||
@@ -41,6 +41,11 @@
|
||||
"format": "{}",
|
||||
"on-click": "sway mode default"
|
||||
},
|
||||
"mpris": {
|
||||
"interval": 1,
|
||||
"tooltip-format": "{title} - {artist} [{position}/{length}]",
|
||||
"format": "{title}"
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"format": "{name} {icon}",
|
||||
"disable-scroll": true,
|
||||
@@ -86,28 +91,25 @@
|
||||
"interval": 60,
|
||||
"tooltip": true,
|
||||
"format": "{} ",
|
||||
"return-type": "json",
|
||||
"exec": "$HOME/.config/waybar/scripts/check-updates.sh",
|
||||
"exec-if": "[[ `$HOME/.config/waybar/scripts/check-updates.sh` != 0 ]]",
|
||||
"exec-if": "[[ `checkupdates | wc -l` != 0 ]]",
|
||||
"signal": 1
|
||||
},
|
||||
"custom/recorder": {
|
||||
"interval": 1,
|
||||
"tooltip": true,
|
||||
"format": "Rec ",
|
||||
"format": "",
|
||||
"return-type": "json",
|
||||
"exec": "echo '{\"class\": \"recording\"}'",
|
||||
"exec-if": "pgrep wf-recorder",
|
||||
"on-click": "$HOME/.config/waybar/scripts/close-screen-recorder.sh"
|
||||
},
|
||||
"custom/power": {
|
||||
"tooltip": false,
|
||||
"format": "⏻",
|
||||
"on-click": "wlogout -b 5 -s -T 400 -B 400 -L 400 -R 400 -c 20"
|
||||
},
|
||||
"privacy": {
|
||||
"icon-spacing": 4,
|
||||
"icon-size": 18,
|
||||
"transition-duration": 250,
|
||||
"transition-duration": 0,
|
||||
"expand": true,
|
||||
"modules": [
|
||||
{
|
||||
"tooltip": true,
|
||||
@@ -124,6 +126,11 @@
|
||||
"type": "audio-in",
|
||||
"tooltip-icon-size": 24
|
||||
}
|
||||
],
|
||||
"ignore": [
|
||||
{ "type": "audio-out", "name": "spotify" },
|
||||
{ "type": "audio-out", "name": "Firefox" },
|
||||
{ "type": "audio-in", "name": "Firefox" }
|
||||
]
|
||||
},
|
||||
"pulseaudio": {
|
||||
@@ -156,7 +163,7 @@
|
||||
"tooltip": true,
|
||||
"device": "intel_backlight",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["", "", "", "", "", "", ""]
|
||||
"format-icons": ["", "", "", "", "", "", "", ""]
|
||||
},
|
||||
"battery": {
|
||||
"interval": 1,
|
||||
|
@@ -1,7 +1,14 @@
|
||||
#! /usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
checkupdates | wc -l
|
||||
updates=$(checkupdates --nocolor 2>/dev/null)
|
||||
if [[ $? -ne 0 || -z "$updates" ]]; then
|
||||
echo '{"text": "", "tooltip": ""}' | jq --unbuffered --compact-output
|
||||
else
|
||||
numberOfUpdates=$(echo "$updates" | wc -l)
|
||||
tooltip=$(echo "$updates" | sed 's/\n/\r/g' | jq -sR .)
|
||||
echo "{\"text\": \"$numberOfUpdates\", \"tooltip\": $tooltip}" | jq --unbuffered --compact-output
|
||||
fi
|
||||
}
|
||||
|
||||
main $@
|
||||
main "$@"
|
@@ -1,9 +1,8 @@
|
||||
* {
|
||||
all: initial;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 20px;
|
||||
font-family: "Symbols Nerd Font", monospace;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
@@ -20,7 +19,7 @@ tooltip label {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
@@ -29,7 +28,7 @@ tooltip label {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
@@ -38,30 +37,78 @@ tooltip label {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#custom-pacman,
|
||||
#custom-recorder,
|
||||
#mode,
|
||||
#clock,
|
||||
#workspaces,
|
||||
#custom-recorder,
|
||||
#custom-power,
|
||||
#mpris,
|
||||
#mpris.paused,
|
||||
#privacy {
|
||||
border-radius: 10px;
|
||||
background-color: #383c4a;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#custom-recorder, #custom-pacman {
|
||||
background-color: #32e47c;
|
||||
color: #383c4a;
|
||||
}
|
||||
|
||||
#privacy {
|
||||
background-color: #e63946;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #8ecae6;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#mpris:not(.paused) {
|
||||
background: linear-gradient(90deg,
|
||||
#e66465,
|
||||
#f6b73c,
|
||||
#6dd5ed,
|
||||
#c084f1,
|
||||
#ff9a9e,
|
||||
#a1ffce,
|
||||
#fbc2eb,
|
||||
#fad0c4,
|
||||
#8fd3f4,
|
||||
#84fab0,
|
||||
#dcb0ed,
|
||||
#f5576c
|
||||
);
|
||||
background-size: 1000% 1000%;
|
||||
animation: gradientShift 30s ease-in-out infinite;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@keyframes gradientShift {
|
||||
0% { background-position: 0% 50%; }
|
||||
12.5% { background-position: 20% 50%; }
|
||||
25% { background-position: 45% 50%; }
|
||||
37.5% { background-position: 70% 50%; }
|
||||
50% { background-position: 100% 50%; }
|
||||
62.5% { background-position: 70% 50%; }
|
||||
75% { background-position: 45% 50%; }
|
||||
87.5% { background-position: 20% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
#custom-pacman,
|
||||
#custom-recorder,
|
||||
#mode,
|
||||
#mpris,
|
||||
#custom-power,
|
||||
#privacy {
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#custom-pacman,
|
||||
@@ -69,6 +116,7 @@ tooltip label {
|
||||
#mode,
|
||||
#clock,
|
||||
#privacy,
|
||||
#mpris,
|
||||
#custom-power,
|
||||
#workspaces button {
|
||||
padding-top: 4px;
|
||||
|
Reference in New Issue
Block a user