Using polybar now and customized it

clean_emacs
Tuan-Dat 2018-02-07 01:41:35 +01:00
parent 275c4372ea
commit e2e842271a
4 changed files with 100 additions and 222 deletions

View File

@ -41,14 +41,14 @@ bindsym $mod+Ctrl+m exec termite -e 'alsamixer'
################################################################################################
# Workspace names
set $ws1 
set $ws2 
set $ws3 
set $ws4 
set $ws5 
set $ws6 
set $ws7 
set $ws8 
set $ws1 1:
set $ws2 2:
set $ws3 3:
set $ws4 4:
set $ws5 5:
set $ws6 6:
set $ws7 7:
set $ws8 8:
# switch to workspace
bindsym $mod+1 workspace $ws1
@ -122,7 +122,8 @@ exec --no-startup-id xautolock -time 10 -locker "python ~/.scripts/i3lock.py"
exec --no-startup-id Nextcloud
exec --no-startup-id emacs --daemon
exec --no-startup-id udiskie
exec_always --no-startup-id polybar beep
exec --no-startup-id polybar beep
exec --no-startup-id setxkbmap gb,de
###############################################################################
################################# Keybindings #################################
###############################################################################

View File

@ -1,39 +1,33 @@
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
background = ${xrdb:color0:#223}
background-alt = ${xrdb:color8:#fa4}
foreground = ${xrdb:color7:#cdd}
foreground-alt = ${xrdb:color15:#eef}
black = ${xrdb:color0:#233}
red = ${xrdb:color1:#f90}
green = ${xrdb:color2:#8c4}
yellow = ${xrdb:colo3:#fc0}
blue = ${xrdb:color4:#0af}
magenta = ${xrdb:color5:#e16}
cyan = ${xrdb:color6:#098}
white = ${xrdb:color7:#cdd}
[bar/beep]
;monitor = ${env:MONITOR:HDMI-1}
monitor = eDP1
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
height = 25
radius = 6.0
fixed-center = false
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
line-size = 04
line-color = ${colors.blue}
border-size = 4
border-size = 2
border-color = #00000000
padding-left = 0
@ -45,102 +39,53 @@ 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 = FontAwesome:style=Regular:pixelsize=10
modules-left = i3
modules-center =
modules-right = filesystem xbacklight volume xkeyboard memory cpu wlan eth battery temperature date powermenu
modules-center = date
modules-right = volume xbacklight xkeyboard wlan battery powermenu
tray-position = right
tray-padding = 2
;tray-transparent = true
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
format-prefix-underline = ${colors.magenta}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-layout-underline = ${colors.magenta}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
label-indicator-background = ${colors.magenta}
label-indicator-underline = ${colors.megenta}
[module/i3]
type = internal/i3
; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = true
; This will split the workspace name on ':'
; Default: false
strip-wsnumbers = true
; Sort the workspaces by index instead of the default
; sorting that groups the workspaces by output
; Default: false
index-sort = true
index-sort = false
; Create click handler used to focus workspace
; Default: true
enable-click = false
; Create scroll handlers used to cycle workspaces
; Default: true
enable-scroll = false
; Wrap around when reaching the first/last workspace
; Default: true
wrapping-scroll = false
; Set the scroll cycle direction
; Default: true
reverse-scroll = false
; Use fuzzy (partial) matching on labels when assigning
; icons to workspaces
; Example: code;♚ will apply the icon to all workspaces
; containing 'code' in the label
; Default: false
fuzzy-match = true
ws-icon-0 = 1;
@ -151,45 +96,41 @@ ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-default = 
ws-icon-default = \
; Only show workspaces on the same output as the bar
pin-workspaces = true
format = <label-state>
label-mode = %mode%
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-mode-background = #e60053
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
label-focused = %name%
label-focused-foreground = ${colors.white}
label-focused-background = #566268
label-focused-underline = ${colors.blue}
label-focused-padding = 4
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
label-unfocused = %name%
label-unfocused-padding = 4
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
label-visible = %name%
label-visible-underline = ${colors.red}
label-visible-padding = 4
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
label-urgent = %name%
label-urgent-foreground = ${colors.black}
label-urgent-background = ${colors.red}
label-urgent-padding = 4
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev =
icon-stop =
icon-play =
icon-pause =
icon-next =
icon-prev =
icon-stop =
icon-play =
icon-pause =
icon-next =
label-song-maxlen = 25
label-song-ellipsis = true
@ -197,49 +138,23 @@ label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
format = <label>
label =  %percentage%%
label-underline = ${colors.yellow}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-connected = <label-connected>
format-connected-underline = ${colors.cyan}
label-connected =  %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
@ -247,42 +162,20 @@ format-disconnected =
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = net0
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date =
date-alt = " %Y-%m-%d"
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
time = " %H:%M:%S"
time-alt =
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
format-underline = ${colors.magenta}
label = %date% %time%
@ -290,22 +183,24 @@ label = %date% %time%
type = internal/volume
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume =
label-volume-foreground = ${root.foreground}
format-volume-underline = ${colors.green}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-foreground-0 = ${colors.green}
bar-volume-foreground-1 = ${colors.green}
bar-volume-foreground-2 = ${colors.green}
bar-volume-foreground-3 = ${colors.green}
bar-volume-foreground-4 = ${colors.green}
bar-volume-foreground-5 = ${colors.yellow}
bar-volume-foreground-6 = ${colors.red}
bar-volume-gradient = true
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
@ -321,45 +216,30 @@ adapter = ADP1
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-charging-underline = ${colors.yellow}
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix =
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
@ -367,10 +247,10 @@ expand-right = true
format-spacing = 1
label-open =
label-open-foreground = ${colors.secondary}
label-open =
label-open-foreground = ${colors.magenta}
label-close = cancel
label-close-foreground = ${colors.secondary}
label-close-foreground = ${colors.magenta}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
@ -390,7 +270,7 @@ menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
@ -399,5 +279,3 @@ screenchange-reload = true
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View File

@ -38,7 +38,7 @@ cursor_shape = ibeam
# "off", "left" or "right"
scrollbar = off
[colors]
[colors]
# special

View File

@ -61,7 +61,6 @@ alias mkvirtenv="python -m virtualenv --system-site-packages"
alias e="emacsclient -t"
alias nyan="nyancat"
alias rm="rm -i"
alias dir="du -h -d 1"
alias -s tex=emacs
alias -s cpp=emacs
alias org="e ~/Nextcloud/orgs/man.org"