almost finaly
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 25,
|
||||
"spacing": 0,
|
||||
"modules-left": ["wlr/taskbar"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["network", "custom/spotify", "custom/language", "pulseaudio", "cpu", "memory", "tray"],
|
||||
|
||||
"wlr/taskbar": {
|
||||
"format": "{icon}",
|
||||
"icon-size": 15,
|
||||
"tooltip-format": "{title}",
|
||||
"on-click": "activate"
|
||||
},
|
||||
"custom/language": {
|
||||
"exec": "xkblayout-state print %s | tr 'a-z' 'A-Z'",
|
||||
"interval": 1,
|
||||
"format": " {} "
|
||||
},
|
||||
"custom/spotify": {
|
||||
"format": "[{}] ",
|
||||
"exec": "playerctl metadata --format '{{artist}} - {{title}}' spotify 2>/dev/null || echo ''",
|
||||
"restart-interval": 1,
|
||||
"on-click": "spotify",
|
||||
"max-length": 50
|
||||
},
|
||||
// "custom/v2raya": {
|
||||
// "format": "PROXY{}",
|
||||
// "return-type": "json",
|
||||
// "interval": 2,
|
||||
// "exec": "sh -c '~/.config/waybar/v2raya-toggle.sh toggle'",
|
||||
// "on-click": "sh -c '~/.config/waybar/v2raya-toggle.sh toggle'",
|
||||
// "signal": 10
|
||||
// },
|
||||
"clock": {
|
||||
"format": "{:%H:%M}",
|
||||
"format-alt": "{:%d-%m-%Y}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": " {usage}%",
|
||||
"tooltip": false,
|
||||
"on-click": "alacritty -e htop"
|
||||
},
|
||||
"memory": {
|
||||
"format": " {}%"
|
||||
},
|
||||
"network": {
|
||||
"min-length": 10,
|
||||
"format-wifi": " {bandwidthDownBytes}",
|
||||
"format-ethernet": " {bandwidthDownBytes}",
|
||||
"format-disconnected": "⚠ DONT",
|
||||
"interval": 1
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": " {volume}%",
|
||||
"format-muted": " Muted",
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 10,
|
||||
"spacing": 15
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font", "Font Awesome 7 Free", "Font Awesome 7 Free Solid", "Font Awesome 7 Brands", sans-serif;
|
||||
font-size: 12px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: alpha(#e3e3e3, 0.75);
|
||||
color: #0b0b0b;
|
||||
min-height: 28px;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#cpu,
|
||||
#memory,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#taskbar,
|
||||
#custom-spotify,
|
||||
#tray {
|
||||
padding: 0 10px;
|
||||
color: #0b0b0b;
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
color: alpha(#0b0b0b, 0.6);
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background-color: alpha(#0b0b0b, 0.2);
|
||||
box-shadow: inset 0 -2px 0 0 #0b0b0b;
|
||||
color: #0b0b0b;
|
||||
}
|
||||
|
||||
/*#custom-v2raya.enabled {
|
||||
color: #0b0b0b;
|
||||
}
|
||||
|
||||
#custom-v2raya.disabled {
|
||||
color: #747474;
|
||||
}*/
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pgrep -x "v2raya" > /dev/null; then
|
||||
if [ "$1" = "toggle" ]; then
|
||||
sudo systemctl stop v2raya.service 2>/dev/null || sudo killall v2raya
|
||||
echo "{\"text\": \" \", \"class\": \"disabled\", \"tooltip\": \"v2rayA выключен\"}"
|
||||
else
|
||||
echo "{\"text\": \" \", \"class\": \"enabled\", \"tooltip\": \"v2rayA включен\"}"
|
||||
fi
|
||||
else
|
||||
if [ "$1" = "toggle" ]; then
|
||||
sudo systemctl start v2raya.service 2>/dev/null || sudo v2raya --daemon &
|
||||
echo "{\"text\": \" \", \"class\": \"enabled\", \"tooltip\": \"v2rayA включен\"}"
|
||||
else
|
||||
echo "{\"text\": \" \", \"class\": \"disabled\", \"tooltip\": \"v2rayA выключен\"}"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user