directory structure, polybar

This commit is contained in:
aj 2018-12-11 11:02:29 +00:00
parent 26cb46a3df
commit 83fa016728
5 changed files with 395 additions and 29 deletions

View File

@ -132,7 +132,7 @@ blur-background-exclude = [
];
opacity-rule = [
"75:class_g = 'Gnome-terminal'",
"80:class_g = 'Gnome-terminal'",
"90:class_g = 'Gedit'"
];

View File

@ -9,14 +9,16 @@
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
new_window 1pixel
#new_window 1pixel
hide_edge_borders smart
workspace_auto_back_and_forth yes
gaps inner 25
gaps outer 10
gaps inner 20
gaps outer 5
smart_gaps on
#set client.focused #FFFFFF
bindsym $mod+n exec --no-startup-id nautilus
bindsym $mod+m exec --no-startup-id spotify
bindsym $mod+c exec --no-startup-id chromium
@ -53,7 +55,7 @@ bindsym $mod+Shift+q kill
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec rofi -show run
# change focus
#bindsym $mod+j focus left
@ -107,16 +109,16 @@ bindsym $mod+a focus parent
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "I"
set $ws2 "II"
set $ws3 "III"
set $ws4 "IV"
set $ws5 "V"
set $ws6 "VI"
set $ws7 "VII"
set $ws8 "VIII"
set $ws9 "IX"
set $ws10 "X"
set $ws1 "1:I"
set $ws2 "2:II"
set $ws3 "3:III"
set $ws4 "4:IV"
set $ws5 "5:V"
set $ws6 "6:VI"
set $ws7 "7:VII"
set $ws8 "8:VIII"
set $ws9 "9:IX"
set $ws10 "10:X"
# switch to workspace
bindsym $mod+1 workspace $ws1
@ -176,20 +178,14 @@ mode "resize" {
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
#i3bar_command polybar
status_command i3blocks -c ~/.config/i3/i3blocks.conf
#status_command i3blocks
position top
colors{
background #002B36
}
separator_symbol "/"
tray_output none
height 23
}
client.focused #FFFFFF #FFFFFF #000000 #FFFFFF #FFFFFF
client.focused_inactive #a5a5a5 #a5a5a5 #000000 #FFFFFF #a5a5a5
client.unfocused #a5a5a5 #a5a5a5 #000000 #FFFFFF #a5a5a5
for_window [class="^.*"] border pixel 1
#exec_always --no-startup-id killall polybar; polybar -r bar
exec_always --no-startup-id compton -b --config ~/.config/i3/compton.conf
exec_always --no-startup-id $HOME/.config/polybar/launch.sh

358
polybar/config Normal file
View File

@ -0,0 +1,358 @@
[colors]
background = #3b4c6d
foreground = #eee
separator = #66ffffff
linecolor = #8e8e8e
bordercolor = #333
accent = #e60053
[settings]
screenchange-reload = true
;throttle-output-for = 10
;throttle-output = 5
;throttle-input-for = 40
;compositing-background = over
;compositing-background = screen
;compositing-foreground = xor
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 0
margin-bottom = 0
[bar/top]
enable-ipc = true
monitor = ${env:MONITOR:eDP1}
width = 100%
height = 24
radius = 3.0
;fixed-center = false
;override-redirect = true
separator = /
background = ${colors.background}
foreground = ${colors.foreground}
;background-0 = #333
;background-1 = #222
;background-2 = ${self.background-1}
;background-3 = ${self.background-1}
;background-4 = ${self.background-1}
;background-5 = ${self.background-1}
;background-6 = ${self.background-1}
;background-7 = #111
line-color = ${colors.linecolor}
underline-size = 1
overline-size = 2
border-size = 5
;border-color = 0
;border-bottom-size = 0
border-bottom-size = 2
;border-bottom-color = ${colors.bordercolor}
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = dina:pixelsize=9;1
font-1 = siji:pixelsize=10;1
font-2 = unifont:size=6;1
modules-left = i3
;modules-center = mpd
;modules-center = xwindow
modules-right = xbacklight wifi public-ip vpn battery powermenu date
tray-position = right
tray-padding = 4
tray-maxsize = 16
;tray-transparent = true
;tray-detached = true
;tray-offset-x = 50
wm-restack = i3
;dim-value = 0.2
;click-left =
;click-middle =
;click-right =
;scroll-up = bspwm-deskprev
;scroll-down = bspwm-desknext
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
;double-click-left = notify-send -u low doubleclick
;double-click-right = notify-send -u low doubleclick2
[module/subscriber]
type = custom/ipc
interval = 1
; Define the command to be executed when the hook is triggered
; Available tokens:
; %pid% (id of the parent polybar process)
;hook-0 = date
hook-0 = wget -qO - icanhazip.com
;hook-1 = whoami
;hook-2 = echo "Files in ${HOME}: $(ls -1a ~ | wc -l)"
; Hook to execute on launch. The index is 1-based and using
; the example below (2) `whoami` would be executed on launch.
; Default: 0
initial = 1
click-left = polybar-msg -p %pid% hook subscriber 1
[module/public-ip]
type = custom/script
exec = wget -qO - icanhazip.com
interval = 60
label = %output%
;label = %{A1:wget -qO - icanhazip.com:} output %{A}
[module/i3]
type = internal/i3
index-sort = true
pin-workspaces = true
wrapping-scroll = true
strip-wsnumbers = true
;reverse-scroll = false
;enable-scroll = false
enable-click = true
;format = <label-state> <label-mode>
label-mode = %mode%
label-mode-padding = 2
label-mode-background = ${colors.accent}
;label-focused = %index%
label-focused-foreground = #ffffff
label-focused-background = #3f3f3f
label-focused-underline = ${colors.linecolor}
label-focused-padding = 4
;label-unfocused = %index%
label-unfocused-padding = 4
;label-urgent = %index%!
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-padding = 4
;label-visible = %index%
[module/wifi]
type = internal/network
interface = wlp3s0
interval = 5
;udspeed-minwidth = 0
format-connected = <label-connected>
; Available tags:
; <label-disconnected> (default)
format-disconnected = <label-disconnected>
; Available tags:
; <label-connected> (default)
; <label-packetloss>
; <animation-packetloss>
format-packetloss = <animation-packetloss> <label-connected>
; Available tokens:
; %ifname% [wireless+wired]
; %local_ip% [wireless+wired]
; %local_ip6% [wireless+wired]
; %essid% [wireless]
; %signal% [wireless]
; %upspeed% [wireless+wired]
; %downspeed% [wireless+wired]
; %linkspeed% [wired]
; Default: %ifname% %local_ip%
label-connected = %essid% %local_ip%
;label-connected-foreground = #eefafafa
; Available tokens:
; %ifname% [wireless+wired]
; Default: (none)
label-disconnected = not connected
label-disconnected-foreground = #66ffffff
; Available tokens:
; %ifname% [wireless+wired]
; %local_ip% [wireless+wired]
; %local_ip6% [wireless+wired]
; %essid% [wireless]
; %signal% [wireless]
; %linkspeed% [wired]
; Default: (none)
label-packetloss = %essid%
label-packetloss-foreground = #eefafafa
; Only applies if <ramp-signal> is used
ramp-signal-0 = 😱
ramp-signal-1 = 😠
ramp-signal-2 = 😒
ramp-signal-3 = 😊
ramp-signal-4 = 😃
ramp-signal-5 = 😈
; Only applies if <animation-packetloss> is used
animation-packetloss-0 = ⚠
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 = 📶
animation-packetloss-1-foreground = #000000
; Framerate in milliseconds
animation-packetloss-framerate = 500
[module/date]
type = internal/date
; Seconds to sleep between updates
interval = 10.0
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = %d.%m%
; Optional time format
time = %H:%M
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats
;date-alt = %A, %d %B %Y
;time-alt = %H:%M:%S
label = %date% %time%
[module/battery]
type = internal/battery
full-at = 98
battery = BAT0
adapter = AC
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M
; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <animation-charging> <label-charging>
; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <ramp-capacity> <label-discharging>
; Available tags:
; <label-full> (default)
; <bar-capacity>
; <ramp-capacity>
;format-full = <ramp-capacity> <label-full>
; Available tokens:
; %percentage% (default)
; %time%
; %consumption% (shows current charge rate in watts)
label-charging = chg: %percentage%%
; Available tokens:
; %percentage% (default)
; %time%
; %consumption% (shows current discharge rate in watts)
label-discharging = dis: %percentage%%
; Available tokens:
; %percentage% (default)
label-full = full
; Only applies if <ramp-capacity> is used
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
; Only applies if <animation-charging> is used
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
; Framerate in milliseconds
animation-charging-framerate = 750
; Only applies if <animation-discharging> is used
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
; Framerate in milliseconds
animation-discharging-framerate = 500
[module/xwindow]
type = internal/xwindow
format = <label>
label-maxlen = 75
[module/counter]
type = internal/counter
format = <counter>
interval = 0.1
[module/powermenu]
type = custom/menu
format-spacing = 1
label-open =power
;label-open-foreground = ${colors.separator}
label-close = cancel
;label-close-foreground = ${colors.separator}
label-separator = |
label-separator-foreground = ${colors.separator}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = reboot
menu-2-0 = power off
menu-2-0-exec = poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
format-label-foreground = #5b
[module/vpn]
type = custom/script
exec = pgrep openvpn >/dev/null && printf "up\n" || printf "down\n"
interval = 5
label = %output%
;format-underline = #268bd2
format-prefix = "vpn: "
format-spacing = 1
format-prefix-foreground = ${colors.foreground}
; vim:ft=dosini

12
polybar/launch.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
polybar top &
echo "Bars launched..."