From 3711f22b6c37202ee25a5359e198a230788967c6 Mon Sep 17 00:00:00 2001 From: Xander Swan Date: Wed, 3 Dec 2025 10:00:41 -0500 Subject: Polybar --- .config/i3/config | 40 +++++++++++++++++++++------------------- .config/i3/i3blocks.conf | 45 --------------------------------------------- .config/i3/music.lua | 18 ------------------ .config/i3/shellutils.lua | 16 ---------------- 4 files changed, 21 insertions(+), 98 deletions(-) delete mode 100644 .config/i3/i3blocks.conf delete mode 100644 .config/i3/music.lua delete mode 100644 .config/i3/shellutils.lua (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index aa61018..ed8a568 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -72,7 +72,7 @@ bindsym Print exec flameshot gui bindsym $mod+Shift+q kill # start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id rofi -show drun +bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons # A more modern dmenu replacement is rofi: # bindsym $mod+d exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -232,26 +232,28 @@ client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +exec_always --no-startup-id $HOME/.config/polybar/launch.sh + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) -bar { - status_command i3blocks -c ~/.config/i3/i3blocks.conf - - # mode hide - - colors { - background #111111 - statusline #ffffff - separator #666666 - - # border bg text - focused_workspace #ffffff #aaaaaa #444444 - active_workspace #cccccc #888888 #444444 - inactive_workspace #444444 #000000 #888888 - urgent_workspace #2f343a #900000 #ffffff - binding_mode #2f343a #900000 #ffffff - } -} +# bar { +# status_command i3blocks -c ~/.config/i3/i3blocks.conf +# +# # mode hide +# +# colors { +# background #111111 +# statusline #ffffff +# separator #666666 +# +# # border bg text +# focused_workspace #ffffff #aaaaaa #444444 +# active_workspace #cccccc #888888 #444444 +# inactive_workspace #444444 #000000 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# binding_mode #2f343a #900000 #ffffff +# } +# } ####################################################################### # automatically start i3-config-wizard to offer the user to create a diff --git a/.config/i3/i3blocks.conf b/.config/i3/i3blocks.conf deleted file mode 100644 index c83d8c3..0000000 --- a/.config/i3/i3blocks.conf +++ /dev/null @@ -1,45 +0,0 @@ -# Define the custom separator in global properties for boilerplate -full_text= -align=center -separator=false -separator_block_width=0 - -[time] -instance=ny -TZ=America/New_York -command=date +"  %H:%M " -interval=1 -background=#99FFFF -color=#000000 - -[date] -instance=ny -TZ=America/New_York -command=date +"  %y/%m/%d %b " -interval=3600 -background=#999999 -color=#000000 - -[packages] -command=echo "  $(pacman -Q | wc -l) " -interval=3600 -background=#FF9999 -color=#000000 - -[volume] -command=echo " 󰕾 $(pactl get-sink-volume @DEFAULT_SINK@ | awk -F"/" '{print $2}' | xargs) " -interval=repeat -background=#55CC77 -color=#000000 - -[weather] -command=echo " 󰖐 $(curl -Ss 'https://wttr.in?0&T&Q&M' | cut -c 16- | head -2 | xargs) " -interval=3600 -background=#009999 -color=#000000 - -[media] -command=lua ~/.config/i3/music.lua -interval=2 -background=#99FF99 -color=#000000 diff --git a/.config/i3/music.lua b/.config/i3/music.lua deleted file mode 100644 index 5f60a4b..0000000 --- a/.config/i3/music.lua +++ /dev/null @@ -1,18 +0,0 @@ -local shell_utils = require("shellutils") - -local status = shell_utils.get_output("playerctl status") -local song = shell_utils.get_output("playerctl metadata title") -local artist = shell_utils.get_output("playerctl metadata artist") -local album = shell_utils.get_output("playerctl metadata album") - -if #album ~= 0 then - album = ("from %s "):format(album) -end - -if status == "Playing" then - print((" 󰐊 Playing | %s by %s %s"):format(song, artist, album)) -elseif status == "Paused" then - print(("  Paused | %s by %s %s"):format(song, artist, album)) -else - print(("  Stopped "):format(status)) -end diff --git a/.config/i3/shellutils.lua b/.config/i3/shellutils.lua deleted file mode 100644 index cb27943..0000000 --- a/.config/i3/shellutils.lua +++ /dev/null @@ -1,16 +0,0 @@ -local shell_utils = {} - -local temp_file_path = "/tmp/i3luacommandouput" - -function shell_utils.get_output(command) - os.execute(command .. " > " .. temp_file_path .. " 2> " .. temp_file_path) - local file = io.open(temp_file_path, "r") - if file == nil then - error("Can't read output.") - end - local output = file:read() - file:close() - return output or "" -end - -return shell_utils \ No newline at end of file -- cgit v1.3-2-g0d8e