added tooltip to custom/monitors in waybar config

This commit is contained in:
rileyrg 2021-05-27 03:52:33 +02:00
parent efe5abbefc
commit 59df736fc8
4 changed files with 26 additions and 11 deletions

View file

@ -1306,10 +1306,11 @@ bindsym $mod+Control+t exec sway-notify "Opening NEW terminal instance" && alacr
"on-click": "sway-www https://www.dropbox.com/h",
},
"custom/monitors": {
"format": "<span color='white'>{}</span>",
"format": "<span color='gold'>{}</span>",
"return-type" : "json",
"interval": 10,
"exec": "waybar-monitors",
"tooltip": "false",
"tooltip": "true",
"on-click": "sway-screen-menu",
},
"custom/bluetooth": {
@ -1533,7 +1534,11 @@ bindsym $mod+Control+t exec sway-notify "Opening NEW terminal instance" && alacr
#!/usr/bin/bash
#Maintained in linux-config.org
l=$(swaymsg -t get_outputs | jq -r '[ .[] | select(.dpms and .active) ] | length')
for i in `seq $l`; do echo -n "🖥️";done
o=$(swaymsg -t get_outputs | jq -r '. | map(.name) | join(",")')
t=""
for i in `seq $l`; do t="${t}🖥️";done
text="{\"text\":\""$t"\",\"tooltip\":\""$o"\"}"
echo $text
```
4. ~/bin/sway/waybar-weather
@ -1867,7 +1872,7 @@ notify-send -t 3000 "${@}"
```
<a id="orgf2aff65"></a>
<a id="org3c812f1"></a>
### ~/bin/sway/sway-screen
@ -1888,7 +1893,7 @@ swaymsg "output ${m} ${c}"
### ~/bin/sway/sway-screen-menu
Gui to select a display and enable/disable it. Calls down to [~/bin/sway/sway-screen](#orgf2aff65).
Gui to select a display and enable/disable it. Calls down to [~/bin/sway/sway-screen](#org3c812f1).
:ID: 82455cae-1c48-48b2-a8b3-cb5d44eeaee9

View file

@ -1,4 +1,8 @@
#!/usr/bin/bash
#Maintained in linux-config.org
l=$(swaymsg -t get_outputs | jq -r '[ .[] | select(.dpms and .active) ] | length')
for i in `seq $l`; do echo -n "🖥️";done
o=$(swaymsg -t get_outputs | jq -r '. | map(.name) | join(",")')
t=""
for i in `seq $l`; do t="${t}🖥️";done
text="{\"text\":\""$t"\",\"tooltip\":\""$o"\"}"
echo $text

View file

@ -171,10 +171,11 @@
"on-click": "sway-www https://www.dropbox.com/h",
},
"custom/monitors": {
"format": "<span color='white'>{}</span>",
"format": "<span color='gold'>{}</span>",
"return-type" : "json",
"interval": 10,
"exec": "waybar-monitors",
"tooltip": "false",
"tooltip": "true",
"on-click": "sway-screen-menu",
},
"custom/bluetooth": {

View file

@ -1787,10 +1787,11 @@ https://github.com/Alexays/Waybar/wiki/Configuration
"on-click": "sway-www https://www.dropbox.com/h",
},
"custom/monitors": {
"format": "<span color='white'>{}</span>",
"format": "<span color='gold'>{}</span>",
"return-type" : "json",
"interval": 10,
"exec": "waybar-monitors",
"tooltip": "false",
"tooltip": "true",
"on-click": "sway-screen-menu",
},
"custom/bluetooth": {
@ -2009,7 +2010,11 @@ Thank you https://github.com/deanproxy/dotfiles/blob/master/linux/i3/scripts/blu
#!/usr/bin/bash
#Maintained in linux-config.org
l=$(swaymsg -t get_outputs | jq -r '[ .[] | select(.dpms and .active) ] | length')
for i in `seq $l`; do echo -n "🖥️";done
o=$(swaymsg -t get_outputs | jq -r '. | map(.name) | join(",")')
t=""
for i in `seq $l`; do t="${t}🖥️";done
text="{\"text\":\""$t"\",\"tooltip\":\""$o"\"}"
echo $text
#+end_src
******* ~/bin/sway/waybar-weather
#+begin_src bash :tangle ~/bin/sway/waybar-weather