Laptop bar things

laptop
Elias Almqvist 2 years ago
parent 1430ce8ea9
commit d253749575
  1. 2
      eww/.config/eww/eww.scss
  2. 6
      eww/.config/eww/eww.yuck
  3. 2
      eww/.config/eww/scripts/battery
  4. 6
      eww/.config/eww/scripts/wifi
  5. 2
      oh-my-zsh/.oh-my-zsh/aliases.sh

@ -116,7 +116,7 @@ scale trough {
// Control // Control
.control { .control {
margin-bottom: $logo-size; margin-bottom: $logo-size;
padding: .5rem; padding: .5rem 0;
margin: 0 .5rem 0 .5rem; margin: 0 .5rem 0 .5rem;
font-family: Material Icons; font-family: Material Icons;
font-size: 1.6em; font-size: 1.6em;

@ -181,13 +181,13 @@
;; Wifi Widgets ;; ;; Wifi Widgets ;;
(defwidget wifi [] (defwidget wifi []
(revealer :reveal {wifi-status == "true"}
(box :orientation "v" (box :orientation "v"
:halign "middle" :halign "middle"
:tooltip "SSID: ${wifi-name}" :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-status :interval "1s" "scripts/wifi status")
(defpoll wifi-name :interval "1s" "scripts/wifi name") (defpoll wifi-name :interval "1s" "scripts/wifi name")

@ -5,7 +5,7 @@ per="$(cat "$bat/capacity")"
icon() { icon() {
[ $(cat "$bat/status") = Charging ] && echo "" && exit [ $(cat "$bat/status") = Charging ] && echo "" && exit
if [ "$per" -gt "90" ]; then if [ "$per" -gt "90" ]; then
icon="" icon=""

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
status() { status() {
[ $(cat /sys/class/net/w*/operstate) = down ] && echo false && exit [ $(cat /sys/class/net/w*/operstate) = down ] && echo && exit
echo true echo
} }
name() { 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 [ "$1" = "status" ] && status && exit

@ -16,3 +16,5 @@ alias todo="task"
# Laptop stuff # Laptop stuff
alias setbri="xrandr --output eDP-1 --brightness" 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"

Loading…
Cancel
Save