Compare commits
3 Commits
1254bf1e01
...
09770263fb
Author | SHA1 | Date | |
---|---|---|---|
09770263fb | |||
a91a9f34bf | |||
079779a52a |
@@ -5,7 +5,7 @@
|
|||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "bottom",
|
"position": "bottom",
|
||||||
"margin": "5 5 5 5",
|
"margin": "5 5 5 5",
|
||||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
"modules-left": ["sway/workspaces", "sway/mode", "mpris"],
|
||||||
"modules-center": ["clock"],
|
"modules-center": ["clock"],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/pacman",
|
"custom/pacman",
|
||||||
@@ -41,6 +41,11 @@
|
|||||||
"format": "{}",
|
"format": "{}",
|
||||||
"on-click": "sway mode default"
|
"on-click": "sway mode default"
|
||||||
},
|
},
|
||||||
|
"mpris": {
|
||||||
|
"interval": 1,
|
||||||
|
"tooltip-format": "{title} - {artist} [{position}/{length}]",
|
||||||
|
"format": "{title}"
|
||||||
|
},
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"format": "{name} {icon}",
|
"format": "{name} {icon}",
|
||||||
"disable-scroll": true,
|
"disable-scroll": true,
|
||||||
@@ -86,28 +91,25 @@
|
|||||||
"interval": 60,
|
"interval": 60,
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"format": "{} ",
|
"format": "{} ",
|
||||||
|
"return-type": "json",
|
||||||
"exec": "$HOME/.config/waybar/scripts/check-updates.sh",
|
"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
|
"signal": 1
|
||||||
},
|
},
|
||||||
"custom/recorder": {
|
"custom/recorder": {
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"format": "Rec ",
|
"format": "",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"exec": "echo '{\"class\": \"recording\"}'",
|
"exec": "echo '{\"class\": \"recording\"}'",
|
||||||
"exec-if": "pgrep wf-recorder",
|
"exec-if": "pgrep wf-recorder",
|
||||||
"on-click": "$HOME/.config/waybar/scripts/close-screen-recorder.sh"
|
"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": {
|
"privacy": {
|
||||||
"icon-spacing": 4,
|
"icon-spacing": 4,
|
||||||
"icon-size": 18,
|
"icon-size": 18,
|
||||||
"transition-duration": 250,
|
"transition-duration": 0,
|
||||||
|
"expand": true,
|
||||||
"modules": [
|
"modules": [
|
||||||
{
|
{
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
@@ -124,6 +126,11 @@
|
|||||||
"type": "audio-in",
|
"type": "audio-in",
|
||||||
"tooltip-icon-size": 24
|
"tooltip-icon-size": 24
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"ignore": [
|
||||||
|
{ "type": "audio-out", "name": "spotify" },
|
||||||
|
{ "type": "audio-out", "name": "Firefox" },
|
||||||
|
{ "type": "audio-in", "name": "Firefox" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
@@ -156,7 +163,7 @@
|
|||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"device": "intel_backlight",
|
"device": "intel_backlight",
|
||||||
"format": "{percent}% {icon}",
|
"format": "{percent}% {icon}",
|
||||||
"format-icons": ["", "", "", "", "", "", ""]
|
"format-icons": ["", "", "", "", "", "", "", ""]
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
|
@@ -1,7 +1,14 @@
|
|||||||
#! /usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
main() {
|
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;
|
all: initial;
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
font-family: "Symbols Nerd Font", monospace;
|
font-family: "Symbols Nerd Font", monospace;
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip label {
|
tooltip label {
|
||||||
@@ -20,7 +19,7 @@ tooltip label {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #383c4a;
|
background-color: #383c4a;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-left: 8px;
|
margin-left: 4px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
@@ -29,7 +28,7 @@ tooltip label {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #383c4a;
|
background-color: #383c4a;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-left: 8px;
|
margin-left: 4px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
@@ -38,30 +37,78 @@ tooltip label {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #383c4a;
|
background-color: #383c4a;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-left: 8px;
|
margin-left: 4px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-pacman,
|
#custom-pacman,
|
||||||
#custom-recorder,
|
|
||||||
#mode,
|
#mode,
|
||||||
#clock,
|
#clock,
|
||||||
#workspaces,
|
#workspaces,
|
||||||
#custom-recorder,
|
#custom-recorder,
|
||||||
#custom-power,
|
#custom-power,
|
||||||
|
#mpris,
|
||||||
|
#mpris.paused,
|
||||||
#privacy {
|
#privacy {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #383c4a;
|
background-color: #383c4a;
|
||||||
color: #ffffff;
|
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-pacman,
|
||||||
#custom-recorder,
|
#custom-recorder,
|
||||||
#mode,
|
#mode,
|
||||||
|
#mpris,
|
||||||
#custom-power,
|
#custom-power,
|
||||||
#privacy {
|
#privacy {
|
||||||
margin-left: 8px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-pacman,
|
#custom-pacman,
|
||||||
@@ -69,6 +116,7 @@ tooltip label {
|
|||||||
#mode,
|
#mode,
|
||||||
#clock,
|
#clock,
|
||||||
#privacy,
|
#privacy,
|
||||||
|
#mpris,
|
||||||
#custom-power,
|
#custom-power,
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
|
Reference in New Issue
Block a user