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 {
margin-bottom: $logo-size;
padding: .5rem;
padding: .5rem 0;
margin: 0 .5rem 0 .5rem;
font-family: Material Icons;
font-size: 1.6em;

@ -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"
""
))))
:halign "middle"
:text "﬉"
)))
(defpoll wifi-status :interval "1s" "scripts/wifi status")
(defpoll wifi-name :interval "1s" "scripts/wifi name")

@ -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=""

@ -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

@ -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"

Loading…
Cancel
Save