aboutsummaryrefslogtreecommitdiff
path: root/waybar
diff options
context:
space:
mode:
Diffstat (limited to 'waybar')
-rw-r--r--waybar/config89
-rwxr-xr-xwaybar/custom/network33
-rw-r--r--waybar/style.css101
3 files changed, 223 insertions, 0 deletions
diff --git a/waybar/config b/waybar/config
new file mode 100644
index 0000000..e9543fc
--- /dev/null
+++ b/waybar/config
@@ -0,0 +1,89 @@
+{
+ "layer": "top",
+ "modules-left": [
+ "river/tags"
+ ],
+ "modules-center": ["river/window"],
+ "modules-right": [
+ "custom/network",
+ "custom/cpuTemp",
+ "battery",
+ "custom/powerUsage",
+ "pulseaudio",
+ "tray",
+ "custom/date"
+ ],
+ "pulseaudio": {
+ "tooltip": false,
+ "scroll-step": 5,
+ "format": "vol: {volume}%",
+ "format-muted": "vol 0%"
+ },
+
+ "river/tags": {
+ "tag-labels":[
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "0"
+ ],
+ "disable-click": false,
+ "num-tags": 10
+ },
+ "river/window": {
+ "format": "{}",
+ "max-length": 90
+ },
+ "battery": {
+ "states": {
+ "good": 100,
+ "warning": 30,
+ "critical": 20
+ },
+ "format": "bat: {capacity}% discharging",
+ "format-charging": "bat: {capacity}% charging",
+ "format-plugged": "bat: {capacity}% AC"
+ },
+ "upower": {
+ "show-icon": false,
+ "native-path": "BAT0",
+ "format": "bat: {percentage} {time}"
+ },
+ "tray":{
+ "icon-size":18,
+ "show-passive-items":true,
+ "spacing": 10,
+ "reverse-direction": true
+ },
+ "custom/network": {
+ "class": "network",
+ "format": "{}",
+ "interval": 5,
+ "exec": "$HOME/.config/waybar/custom/network"
+ },
+ "custom/cpuTemp": {
+ "class": "cpuTemp",
+ "format": " CPU: {}c",
+ "exec": "sensors | sed -n '/^k10/,/^$/p' | awk '/^Tctl/{print $2}' | sed -e's/+//g' -e's/\\.[0-9][^0-9]*$//g'",
+ "interval": 5
+ },
+ "custom/powerUsage": {
+ "class": "powerUsage",
+ "format": " {}",
+ "interval": 5,
+ "exec": "awk '{p=$1*10^-6; if (p>0) {print p \" W\"}}' /sys/class/power_supply/BAT0/power_now "
+ },
+ "custom/date": {
+ "class": "date",
+ "format": " {}",
+ "interval": 60,
+ "exec": "date +%m.%d.%Y\\ %H:%M"
+ }
+
+}
diff --git a/waybar/custom/network b/waybar/custom/network
new file mode 100755
index 0000000..fc5d9d7
--- /dev/null
+++ b/waybar/custom/network
@@ -0,0 +1,33 @@
+wireless_info() {
+ _if="$1"
+
+ printf "WiFi: %s %s %s %s" \
+ "$_if" \
+ "$(nmcli c | awk "/$_if/"'{print $1}')" \
+ "$(ip -4 addr show dev "$_if" | awk '/inet /{print $2}')" \
+ "$(awk "/^$_if/"'{print $4+0}' /proc/net/wireless)dbm"
+}
+
+eth_info() {
+ _if="$1"
+
+ printf "Eth: %s %s %s" \
+ "$_if" \
+ "$(ip -4 addr show dev "$_if" | awk '/inet /{print $2}')" \
+ ""
+}
+
+network_info() {
+ # default_if="$(netstat -rnf inet | awk '/^default/{print $8}')"
+ default_if="$(ip route | awk '/^default/{print $5;exit 0;}')"
+
+ if [ -z "$default_if" ] ; then
+ echo "No conn"
+ elif [ -d "/sys/class/net/$default_if/wireless" ] ; then
+ wireless_info "$default_if"
+ else
+ eth_info "$default_if"
+ fi
+}
+
+network_info
diff --git a/waybar/style.css b/waybar/style.css
new file mode 100644
index 0000000..58bae86
--- /dev/null
+++ b/waybar/style.css
@@ -0,0 +1,101 @@
+window.eDP-1 * { font-size: 18px; }
+
+* {
+ font-family: "IBM 3270";
+ font-size: 12px;
+}
+
+window#waybar {
+ background: none;
+ border-bottom: 3px solid #8FBCBB;
+}
+
+window#waybar.hidden {
+ opacity: 0.2;
+}
+
+#window {
+ color: #8FBCBB;
+ /* background: #2E3440; */
+}
+
+#tags {
+ /* background: #2e3440; */
+}
+
+#tags button {
+ /* transition: none; */
+ color: #4c566a;
+ background: transparent;
+ border-radius: 0px;
+}
+
+#tags button.occupied {
+ transition: none;
+ color: #a3be8c;
+ background: transparent;
+}
+
+#tags button.focused {
+ color: #81a1c1;
+ /* border-bottom: 3px solid #81a1c1; */
+ background: #4C566A;
+
+ border-radius: inherit;
+}
+
+#tags button:hover {
+ transition: none;
+ box-shadow: inherit;
+ text-shadow: inherit;
+ color: #81a1c1;
+}
+
+#temperature {
+ background: #2e3440;
+ color: #81A1C1;
+ /* border-bottom: 3px solid #6a7796; */
+}
+
+#pulseaudio {
+ color: #D08770;
+ background: #2E3440;
+ /* border-bottom: 3px solid #6a7796; */
+}
+
+#battery {
+ color: #A3BE8C;
+ background: #2E3440;
+ /* border-bottom: 3px solid #6a7796; */
+}
+
+#network, #cpuTemp, #battery, #pulseaudio, #date, #powerUsage {
+ padding-left: 15px;
+}
+
+#battery.critical:not(.charging) {
+ background-color: #d8dee9;
+ color: #2e3440;
+ animation-name: blink;
+ animation-duration: 0.5s;
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+}
+
+@keyframes blink {
+ to {
+ background-color: #bf616a;
+ color: #d8dee9;
+ }
+}
+
+#tray {
+ color: #d8dee9;
+ background: #2E3440;
+ /* border-bottom: 3px solid #6a7796; */
+}
+
+#tags button.focused, #battery, #pulseaudio {
+ border-bottom: 3px solid #8FBCBB;
+}