From d253749575b5f4bb504efce90859cd2c132b0e49 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Fri, 6 Jan 2023 16:50:37 +0100 Subject: [PATCH] Laptop bar things --- eww/.config/eww/eww.scss | 2 +- eww/.config/eww/eww.yuck | 8 ++++---- eww/.config/eww/scripts/battery | 2 +- eww/.config/eww/scripts/wifi | 6 +++--- oh-my-zsh/.oh-my-zsh/aliases.sh | 2 ++ 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/eww/.config/eww/eww.scss b/eww/.config/eww/eww.scss index b1d5ead..104716b 100644 --- a/eww/.config/eww/eww.scss +++ b/eww/.config/eww/eww.scss @@ -116,7 +116,7 @@ scale trough { // Control .control { margin-bottom: $logo-size; - padding: .5rem; + padding: .5rem 0; margin: 0 .5rem 0 .5rem; font-family: Material Icons; font-size: 1.6em; diff --git a/eww/.config/eww/eww.yuck b/eww/.config/eww/eww.yuck index bbfb9d6..42dfa19 100644 --- a/eww/.config/eww/eww.yuck +++ b/eww/.config/eww/eww.yuck @@ -181,13 +181,13 @@ ;; Wifi Widgets ;; (defwidget wifi [] - (revealer :reveal {wifi-status == "true"} (box :orientation "v" :halign "middle" :tooltip "SSID: ${wifi-name}" - (label :class "icon wifi" - "" - )))) + (label :class "icon wifi" + :halign "middle" + :text "﬉" + ))) (defpoll wifi-status :interval "1s" "scripts/wifi status") (defpoll wifi-name :interval "1s" "scripts/wifi name") diff --git a/eww/.config/eww/scripts/battery b/eww/.config/eww/scripts/battery index f90f48e..d313e21 100755 --- a/eww/.config/eww/scripts/battery +++ b/eww/.config/eww/scripts/battery @@ -5,7 +5,7 @@ per="$(cat "$bat/capacity")" icon() { -[ $(cat "$bat/status") = Charging ] && echo "" && exit +[ $(cat "$bat/status") = Charging ] && echo "" && exit if [ "$per" -gt "90" ]; then icon="" diff --git a/eww/.config/eww/scripts/wifi b/eww/.config/eww/scripts/wifi index 80fa766..c5d11b6 100755 --- a/eww/.config/eww/scripts/wifi +++ b/eww/.config/eww/scripts/wifi @@ -1,12 +1,12 @@ #!/bin/sh status() { -[ $(cat /sys/class/net/w*/operstate) = down ] && echo false && exit -echo true +[ $(cat /sys/class/net/w*/operstate) = down ] && echo  && exit +echo  } name() { - nmcli | grep "^wlp" | sed 's/\ connected\ to\ /Connected to /g' | cut -d ':' -f2 +nmcli | grep "^wlp" | sed 's/\ connected\ to\ //g' | cut -d ':' -f2 } [ "$1" = "status" ] && status && exit diff --git a/oh-my-zsh/.oh-my-zsh/aliases.sh b/oh-my-zsh/.oh-my-zsh/aliases.sh index ca57ae3..7bffeaa 100644 --- a/oh-my-zsh/.oh-my-zsh/aliases.sh +++ b/oh-my-zsh/.oh-my-zsh/aliases.sh @@ -16,3 +16,5 @@ alias todo="task" # Laptop stuff alias setbri="xrandr --output eDP-1 --brightness" +alias lsbat="echo \"Power: $(cat /sys/class/power_supply/BAT0/capacity)\"%" +alias lsnet="nmcli | grep "^wlp" | sed 's/\ connected\ to\ //g' | cut -d ':' -f2"