Replaced i3blocks with simple shell script
authorCian Bagshaw <cian@cianb.xyz>
Fri, 18 Aug 2023 01:12:59 +0000 (02:12 +0100)
committerCian Bagshaw <cian@cianb.xyz>
Fri, 18 Aug 2023 01:12:59 +0000 (02:12 +0100)
Also minor tidying of i3bar

.config/i3
.config/i3blocks [deleted file]
.local/bin/status [new file with mode: 0755]

index 29915bf..bace84c 100755 (executable)
@@ -68,12 +68,12 @@ bindsym $mod+Shift+space floating toggle
 bindsym $mod+space focus mode_toggle
 
 # workspaces
-set $ws1 "1: Primary"
-set $ws2 "2:   Browser"
-set $ws3 "3:   Internet"
-set $ws4 "4:   Files"
-set $ws5 "5:   Communication "
-set $ws6 "6:   Terminals"
+set $ws1 "1"
+set $ws2 "2"
+set $ws3 "3"
+set $ws4 "4"
+set $ws5 "5"
+set $ws6 "6"
 set $ws7 "7"
 set $ws8 "8"
 set $ws9 "9"
@@ -131,23 +131,23 @@ mode "resize" {
 # status bar
 bar {
        # font
-       font pango:LinLibertine Bold 10
+       font pango:LinLibertineBold, FontAwesome 11
 
        # applet tray
        tray_output DVI-D-0
        
        # commands
        i3bar_command i3bar --transparency      
-       status_command i3blocks -c "$XDG_CONFIG_HOME/i3blocks"
+       status_command status 
 
        # styling
        height 25
-       workspace_min_width 80
+       workspace_min_width 55
        separator_symbol " :||: "
 
        # colors
        colors {
-               background      #2f3534b0
+               background      #2f3534d0
                statusline      #4eb6c4
                separator       #ed63e1
 
diff --git a/.config/i3blocks b/.config/i3blocks
deleted file mode 100644 (file)
index 2dabd9c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-[uptime]
-command=upt
-label= 
-interval=60
-
-[speaker volume]
-command=vol
-label= 
-interval=10
-
-[mic volume]
-command=vol Capture
-label= 
-interval=10
-
-[memory]
-command=memu
-label= 
-interval=20
-
-[cpu]
-command=cpuse
-label= 
-interval=10
-
-[temperature]
-command=stemp k10temp amdgpu
-label=  
-interval=10
-
-[bandwidth]
-command=udld
-label= 
-interval=10
-
-[ip]
-command=hostname -i
-interval=once
-
-[day]
-command=date +%a
-label= 
-interval=once
-
-[date]
-command=date +%d/%m/%y
-interval=once
-
-[time]
-command=date +%T
-label= 
-interval=5
diff --git a/.local/bin/status b/.local/bin/status
new file mode 100755 (executable)
index 0000000..7e84b87
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+# status - script for i3bar
+
+echo "{ \"version\": 1 }\n[[]"
+while :; do
+       echo ",["
+       printf "{\"full_text\":\"%s\"}," \
+               " $(upt)" \
+               " $(vol)" \
+               " $(vol Capture)" \
+               " $(memu)" \
+               " $(cpuse)" \
+               $(stemp k10temp amdgpu) \
+               " $(udld)" \
+               "$(hostname -i)" \
+               " $(date +%a)" \
+               " $(date +%d/%m/%y)" \
+               " $(date +%T)" \
+                       | head -c -1
+       echo "]"
+       sleep 5 
+done