adding conditionals for battery, brightness, and wifi
This commit is contained in:
		
							parent
							
								
									2c7d2c04c6
								
							
						
					
					
						commit
						b07358f12e
					
				
					 2 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -14,6 +14,7 @@
 | 
			
		|||
(defpoll COL_WLAN :interval "1m" "scripts/wifi --COL")
 | 
			
		||||
(defpoll ESSID_WLAN :interval "1m" "scripts/wifi --ESSID")
 | 
			
		||||
(defpoll WLAN_ICON :interval "1m" "scripts/wifi --ICON")
 | 
			
		||||
(defpoll HOST :interval "1h" "hostname")
 | 
			
		||||
(deflisten workspace "scripts/workspace")
 | 
			
		||||
(deflisten appname "scripts/appname")
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -65,6 +66,7 @@
 | 
			
		|||
           (eventbox
 | 
			
		||||
            :onhover "${EWW_CMD} update br_reveal=true" 
 | 
			
		||||
            :onhoverlost "${EWW_CMD} update br_reveal=false"
 | 
			
		||||
            :visible {HOST == "kaladin" ? "false" : "true"}
 | 
			
		||||
            (box 
 | 
			
		||||
             :class "module" 
 | 
			
		||||
             :space-evenly "false" 
 | 
			
		||||
| 
						 | 
				
			
			@ -131,6 +133,7 @@
 | 
			
		|||
	    :vexpand "false"
 | 
			
		||||
	    :hexpand "false" 
 | 
			
		||||
            :spacing 5
 | 
			
		||||
            :visible {HOST == "kaladin" ? "false" : "true"}
 | 
			
		||||
            (circular-progress
 | 
			
		||||
             :value {EWW_BATTERY["BAT1"].capacity}
 | 
			
		||||
             :class "batbar"
 | 
			
		||||
| 
						 | 
				
			
			@ -263,7 +266,7 @@
 | 
			
		|||
            (sep)
 | 
			
		||||
            (cpu)
 | 
			
		||||
            (mem)
 | 
			
		||||
            (EWW_BATTERY["BAT1"].capacity ? (bat) : ())
 | 
			
		||||
            (bat)
 | 
			
		||||
            (sep)
 | 
			
		||||
            (notif_button)))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
 | 
			
		||||
status=$(nmcli g | grep -oE "disconnected")
 | 
			
		||||
essid=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2)
 | 
			
		||||
device=$(nmcli d | rg -w "connected" | awk '{print $1}')
 | 
			
		||||
 | 
			
		||||
if [ $status ] ; then
 | 
			
		||||
    icon="睊"
 | 
			
		||||
| 
						 | 
				
			
			@ -9,9 +10,15 @@ if [ $status ] ; then
 | 
			
		|||
    col="#575268"
 | 
			
		||||
 | 
			
		||||
else
 | 
			
		||||
    icon=""
 | 
			
		||||
    text="${essid}"
 | 
			
		||||
    col="#a1bdce"
 | 
			
		||||
    if [ $device == "enp0s31f6" ]; then
 | 
			
		||||
        icon=""
 | 
			
		||||
        text="ethernet"
 | 
			
		||||
        col="#a1bdce"
 | 
			
		||||
    else
 | 
			
		||||
        icon=""
 | 
			
		||||
        text="${essid}"
 | 
			
		||||
        col="#a1bdce"
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue