waybar: fix performance and minor tweaks

This commit is contained in:
lelgenio 2022-01-07 23:52:56 -03:00
parent b625acc2e5
commit f0ad4b9359
7 changed files with 19 additions and 39 deletions

View File

@ -11,7 +11,7 @@
function esway
# You get a wayland, and you get a wayland. Everybody get's a wayland!
set -x MOZ_ENABLE_WAYLAND 1
# set -x MOZ_ENABLE_WAYLAND 1
# set -x CLUTTER_BACKEND wayland
# set -x QT_QPA_PLATFORM wayland-egl
# set -x ECORE_EVAS_ENGINE wayland-egl

View File

@ -1,5 +1,5 @@
#!/bin/sh
set -ex
set -e
if test -z "$SWAYSOCK" && pidof gnome-shell > /dev/null
then
@ -45,10 +45,4 @@ fi
echo $NEW | sed 's/^0$//'
caller=$(ps -o comm= $PPID)
if test "$caller" != "waybar"; then
pidof waybar >/dev/null &&
pkill -SIGRTMIN+4 waybar
fi
# vim:ft=sh

View File

@ -82,7 +82,7 @@ owm_pango(){
owm_json(){
owm
tee > .forecast.json <<EOF
tee > "$HOME/.forecast.json" <<EOF
{
"min":"$MIN",
"max":"$MAX",

View File

@ -1,11 +0,0 @@
#!/bin/sh
pidof mpd > /dev/null ||
exit 1
mpc status | grep '^\[playing\]' > /dev/null &&
mpc current -f ' %title% - %artist% ' |
sed 's/&/and/g' ||
printf ' '
true

View File

@ -23,7 +23,7 @@ assign [class=qutebrowser] workspace 2
# for_window [title=Whoops!] kill
assign [app_id=firefox] workspace 2
assign [class=firefox] workspace 2
assign [class=Firefox] workspace 2
assign [class=Chromium] workspace 2
# Books

View File

@ -12,8 +12,8 @@
"custom/weather",
],
"modules-right": [
"custom/layout",
"custom/mpd",
"sway/language",
"mpd",
"custom/recording",
"tray",
"custom/mail",
@ -50,14 +50,17 @@
"sway/window":{
"max-length":40
},
"custom/mpd": {
"mpd": {
"format": "{stateIcon} {title} - {artist}",
"format-paused": "{stateIcon}",
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip":false,
"exec": "mpd-status",
"exec-if": "pidof mpd",
"on-click": "mpc toggle",
"on-scroll-up": "mpc vol +10",
"on-scroll-down": "mpc vol -10",
"interval": 2
},
"tray": {
"spacing": 7,
@ -110,7 +113,7 @@
"format-bluetooth-muted": "",
"format-muted": "ﱝ",
"format-icons": {
"headphone": [" 奄", " 奔", " 墳"],
"headphone": [" 奄", " 奔", " 墳"],
"handsfree": "",
"headset": "",
"phone": "",
@ -182,16 +185,14 @@
"interval":30
},
"custom/caffeine":{
"format":"{} ",
"format":"{}",
"exec":"pidof caffeinated > /dev/null && echo  || echo 鈴",
"on-click":"pidof caffeinated && pkill caffeinated || caffeinated -d",
"interval": 5,
"tooltip":false
},
"custom/layout":{
"exec":"_sway_get-layout",
"interval": 5,
"tooltip":false
"sway/language": {
"format": "{short} {variant}",
},
"custom/sleep":{
"exec":"test $(date +%H) -lt 5 && echo 'GO TO SLEEP' | trans -b",

View File

@ -54,6 +54,7 @@ window#waybar.solo {
color: {{@@ accent_color @@}};
}
#mpd,
#custom-mpd,
#tray,
#clock,
@ -107,17 +108,12 @@ window#waybar.solo {
color: #ee4040;
}
#mpd.paused {
font-size: 0;
border: none;
}
#tray {
padding: 0;
margin: 0;
}
#custom-layout {
#language {
font-size: {{@@ font.size.medium @@}}px;
color: {{@@ color.bg_light @@}};
}