aboutsummaryrefslogtreecommitdiffstats
path: root/i3wm
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
committerPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
commit1297a2e0ec774a13c9900b63c2b4afbb6582a5d3 (patch)
tree1f633f33a5569f1924183ff801897d6e6fea4d37 /i3wm
parentc0cb935f9aaa33638344415aaede751ca3d29bb1 (diff)
downloaddotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.gz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.bz2
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.lz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.xz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.zst
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.zip
multiple changes mostly to zsh and polybar
Diffstat (limited to 'i3wm')
-rw-r--r--i3wm/.config/polybar/config101
-rwxr-xr-xi3wm/.config/polybar/launch.sh3
-rwxr-xr-xi3wm/.config/polybar/task_polybar.sh7
3 files changed, 99 insertions, 12 deletions
diff --git a/i3wm/.config/polybar/config b/i3wm/.config/polybar/config
index e84be51..21b5a30 100644
--- a/i3wm/.config/polybar/config
+++ b/i3wm/.config/polybar/config
@@ -17,7 +17,7 @@
;==========================================================
[colors]
-n;background = ${xrdb:color0:#222}
+;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
@@ -28,13 +28,13 @@ secondary = #e60053
alert = #bd2c40
[bar/topbar]
-;monitor = ${env:MONITOR:HDMI-1}
+monitor = ${env:MONITOR:eDP-1}
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 6.0
-fixed-center = false
+fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
@@ -59,9 +59,9 @@ font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1"
font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
-modules-left = i3 xwindow
+modules-left = hostname xwindow
modules-center = spotify
-modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu
+modules-right = taskwarrior
tray-position = right
tray-padding = 2
@@ -70,24 +70,82 @@ tray-padding = 2
tray-scale = 1
;wm-restack = bspwm
-;wm-restack = i3
+wm-restack = i3
-;override-redirect = true
+override-redirect = false
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
-;scroll-up = i3wm-wsnext
-;scroll-down = i3wm-wsprev
+scroll-up = i3wm-wsnext
+scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
+[bar/topbar-second]
+monitor = ${env:MONITOR:eDP-1}
+width = 100%
+height = 30
+;offset-x = 1%
+;offset-y = 0
+;radius = 1.0
+fixed-center = true
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+line-size = 3
+line-color = #f00
+
+border-size = 10
+border-top-size = 0
+border-bottom-size = 0
+border-color = #00000000
+
+padding-left = 2
+padding-right = 2
+
+module-margin-left = 1
+module-margin-right = 2
+
+font-0 = fixed:pixelsize=10;1
+font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
+font-2 = siji:pixelsize=10;1
+font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1"
+font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
+font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
+
+modules-left = i3
+modules-center =
+modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth battery temperature date
+
+wm-restack = i3
+
+override-redirect = false
+
+scroll-up = i3wm-wsnext
+scroll-down = i3wm-wsprev
+
+cursor-click = pointer
+cursor-scroll = ns-resize
+
+[module/hostname]
+type = custom/script
+interval = 256
+format = "<label> "
+"format-prefix = "  "
+format-prefix = " ƸӜƷ "
+format-prefix-foreground = ${colors.secondary}
+format-padding = 0
+exec = echo "$(uname -n)"
+
[module/spotify]
type = custom/script
exec = spotifycl status
tail = true
+format = <label>
format-foreground = ${colors.foreground-alt}
format-underline = ${colors.primary}
click-right = xte 'key XF86AudioPlay'
@@ -95,11 +153,12 @@ click-left = xte 'key XF86AudioPlay'
click-middle = xte 'key XF86AudioNext'
scroll-up = xte 'key XF86AudioNext'
scroll-down = xte 'key XF86AudioPrev'
-
+label-maxlen = 30
+label-ellipsis = true
[module/xwindow]
type = internal/xwindow
-label = %title:0:30:...%
+label = %title:0:40:...%
[module/xkeyboard]
type = internal/xkeyboard
@@ -159,6 +218,7 @@ wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
+label-mode = %mode%
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
@@ -188,6 +248,25 @@ label-urgent-padding = ${module/bspwm.label-urgent-padding}
; label-separator = |
+[module/taskwarrior]
+interval = 30
+type = custom/script
+exec = $HOME/.config/polybar/task_polybar.sh
+format = <label>
+format-foreground = #FFF
+format-prefix = "§ "
+click-left = task "$((`cat /tmp/tw_polybar_id`))" done
+
+[module/line-l]
+type = custom/text
+content = "____[ "
+content-foreground = ${colors.primary}
+
+[module/line-r]
+type = custom/text
+content = " ]____"
+content-foreground = ${colors.primary}
+
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
diff --git a/i3wm/.config/polybar/launch.sh b/i3wm/.config/polybar/launch.sh
index 0b2f2d9..a0f26cd 100755
--- a/i3wm/.config/polybar/launch.sh
+++ b/i3wm/.config/polybar/launch.sh
@@ -7,6 +7,7 @@ killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
-polybar topbar &
+MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g') polybar topbar &
+MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g') polybar topbar-second &
echo "Bars launched..."
diff --git a/i3wm/.config/polybar/task_polybar.sh b/i3wm/.config/polybar/task_polybar.sh
new file mode 100755
index 0000000..555ff1b
--- /dev/null
+++ b/i3wm/.config/polybar/task_polybar.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+most_urgent_desc=`task rc.verbose: rc.report.next.columns:description rc.report.next.labels:1 limit:1 next`
+most_urgent_id=`task rc.verbose: rc.report.next.columns:id rc.report.next.labels:1 limit:1 next`
+most_urgent_due=`task rc.verbose: rc.report.next.columns:due.relative rc.report.next.labels:1 limit:1 next`
+echo "$most_urgent_id" > /tmp/tw_polybar_id
+echo "$most_urgent_desc ·  $most_urgent_due"