summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-04-29 15:18:45 +0200
committerLeah (ctucx) <leah@ctu.cx>2021-04-29 15:18:45 +0200
commit3eac4f16426e1e939d6ce484b5099d330270745c (patch)
tree91d46230423378fade16b0c07b23a51983e0b3cf
parent8f5d0af2fd3cf6e921dd43776a57e64345a855e1 (diff)
parente3873a55e604ddd0aa82e46644f3441f029cfdbf (diff)
downloaddotfiles-3eac4f16426e1e939d6ce484b5099d330270745c.tar.gz
dotfiles-3eac4f16426e1e939d6ce484b5099d330270745c.tar.bz2
dotfiles-3eac4f16426e1e939d6ce484b5099d330270745c.zip
Merge branch 'master' of https://cgit.ctu.cx/dotfiles
-rw-r--r--private_dot_config/waybar/config.tmpl (renamed from private_dot_config/waybar/config)10
-rw-r--r--private_dot_config/waybar/scripts/executable_weather.sh.tmpl (renamed from private_dot_config/waybar/scripts/executable_weather.sh)5
2 files changed, 14 insertions, 1 deletions
diff --git a/private_dot_config/waybar/config b/private_dot_config/waybar/config.tmpl
index b297fdc..2e377e3 100644
--- a/private_dot_config/waybar/config
+++ b/private_dot_config/waybar/config.tmpl
@@ -6,7 +6,11 @@
"height": 40,
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
+ {{ if (eq .chezmoi.hostname "stasicontainer") }}
+ "modules-right": ["tray", "disk", "memory", "cpu", "idle_inhibitor", "network#ethernet", "pulseaudio", "custom/mail", "custom/weather", "custom/poweroff"],
+ {{ else }}
"modules-right": ["tray", "disk", "memory", "cpu", "battery", "custom/btbattery", "idle_inhibitor", "network#wifi", "pulseaudio", "custom/mail", "custom/weather", "custom/poweroff"],
+ {{ end }}
"sway/window": {
"format": "{} ",
"on-click": "swaymsg kill"
@@ -55,7 +59,7 @@
"format-icons": ["", "", "", "", ""]
},
"network#ethernet": {
- "interface": "enp*",
+ "interface": "eth0",
"format-ethernet": "",
"format-linked": "",
"format-disconnected": "",
@@ -92,7 +96,11 @@
"return-type": "json",
"exec": "bash $HOME/.config/waybar/scripts/weather.sh",
"interval": 300,
+{{ if (eq .chezmoi.hostname "stasicontainer") }}
+ "on-click": "firefox https://wttr.in/Kiel"
+{{ else }}
"on-click": "firefox https://wttr.in"
+{{ end }}
},
"custom/poweroff": {
"tooltip": false,
diff --git a/private_dot_config/waybar/scripts/executable_weather.sh b/private_dot_config/waybar/scripts/executable_weather.sh.tmpl
index f5fe83a..ec4d431 100644
--- a/private_dot_config/waybar/scripts/executable_weather.sh
+++ b/private_dot_config/waybar/scripts/executable_weather.sh.tmpl
@@ -1,6 +1,11 @@
#!/bin/bash
+{{ if (eq .chezmoi.hostname "stasicontainer") }}
+text="$(curl -s 'https://wttr.in/Kiel?format=1')"
+tooltip="$(curl -s 'https://wttr.in/Kiel?0QT' |
+{{ else }}
text="$(curl -s 'https://wttr.in/?format=1')"
tooltip="$(curl -s 'https://wttr.in?0QT' |
+{{ end }}
sed 's/\\/\\\\/g' |
sed ':a;N;$!ba;s/\n/\\n/g' |
sed 's/"/\\"/g')"