From 11f24e0000bfae1ac5d3e435cafd3e8b37bd4ea6 Mon Sep 17 00:00:00 2001 From: Cian Bagshaw Date: Fri, 18 Aug 2023 02:12:59 +0100 Subject: [PATCH] Replaced i3blocks with simple shell script Also minor tidying of i3bar --- .config/i3 | 20 +++++++++--------- .config/i3blocks | 52 ----------------------------------------------- .local/bin/status | 22 ++++++++++++++++++++ 3 files changed, 32 insertions(+), 62 deletions(-) delete mode 100644 .config/i3blocks create mode 100755 .local/bin/status diff --git a/.config/i3 b/.config/i3 index 29915bf..bace84c 100755 --- a/.config/i3 +++ b/.config/i3 @@ -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 index 2dabd9c..0000000 --- a/.config/i3blocks +++ /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 index 0000000..7e84b87 --- /dev/null +++ b/.local/bin/status @@ -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 -- 2.20.1