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 # Workspace names
set $ws1  set $ws1 1:
set $ws2  set $ws2 2:
set $ws3  set $ws3 3:
set $ws4  set $ws4 4:
set $ws5  set $ws5 5:
set $ws6  set $ws6 6:
set $ws7  set $ws7 7:
set $ws8  set $ws8 8:
# switch to workspace # switch to workspace
bindsym $mod+1 workspace $ws1 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 Nextcloud
exec --no-startup-id emacs --daemon exec --no-startup-id emacs --daemon
exec --no-startup-id udiskie 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 ################################# ################################# 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] [colors]
;background = ${xrdb:color0:#222} background = ${xrdb:color0:#223}
background = #222 background-alt = ${xrdb:color8:#fa4}
background-alt = #444 foreground = ${xrdb:color7:#cdd}
;foreground = ${xrdb:color7:#222} foreground-alt = ${xrdb:color15:#eef}
foreground = #dfdfdf black = ${xrdb:color0:#233}
foreground-alt = #555 red = ${xrdb:color1:#f90}
primary = #ffb52a green = ${xrdb:color2:#8c4}
secondary = #e60053 yellow = ${xrdb:colo3:#fc0}
alert = #bd2c40 blue = ${xrdb:color4:#0af}
magenta = ${xrdb:color5:#e16}
cyan = ${xrdb:color6:#098}
white = ${xrdb:color7:#cdd}
[bar/beep] [bar/beep]
;monitor = ${env:MONITOR:HDMI-1} monitor = eDP1
width = 100% width = 100%
height = 27 height = 25
;offset-x = 1%
;offset-y = 1%
radius = 6.0 radius = 6.0
fixed-center = false fixed-center = true
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
line-size = 3 line-size = 04
line-color = #f00 line-color = ${colors.blue}
border-size = 4 border-size = 2
border-color = #00000000 border-color = #00000000
padding-left = 0 padding-left = 0
@ -45,102 +39,53 @@ module-margin-right = 2
font-0 = fixed:pixelsize=10;1 font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1 font-2 = siji:pixelsize=10;1
font-3 = FontAwesome:style=Regular:pixelsize=10
modules-left = i3 modules-left = i3
modules-center = modules-center = date
modules-right = filesystem xbacklight volume xkeyboard memory cpu wlan eth battery temperature date powermenu modules-right = volume xbacklight xkeyboard wlan battery powermenu
tray-position = right tray-position = right
tray-padding = 2 tray-padding = 2
;tray-transparent = true ;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-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard] [module/xkeyboard]
type = internal/xkeyboard type = internal/xkeyboard
blacklist-0 = num lock blacklist-0 = num lock
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary} format-prefix-underline = ${colors.magenta}
label-layout = %layout% label-layout = %layout%
label-layout-underline = ${colors.secondary} label-layout-underline = ${colors.magenta}
label-indicator-padding = 2 label-indicator-padding = 2
label-indicator-margin = 1 label-indicator-margin = 1
label-indicator-background = ${colors.secondary} label-indicator-background = ${colors.magenta}
label-indicator-underline = ${colors.secondary} label-indicator-underline = ${colors.megenta}
[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}
[module/i3] [module/i3]
type = internal/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 pin-workspaces = true
; This will split the workspace name on ':'
; Default: false
strip-wsnumbers = true strip-wsnumbers = true
; Sort the workspaces by index instead of the default index-sort = false
; sorting that groups the workspaces by output
; Default: false
index-sort = true
; Create click handler used to focus workspace
; Default: true
enable-click = false enable-click = false
; Create scroll handlers used to cycle workspaces
; Default: true
enable-scroll = false enable-scroll = false
; Wrap around when reaching the first/last workspace
; Default: true
wrapping-scroll = false wrapping-scroll = false
; Set the scroll cycle direction
; Default: true
reverse-scroll = false 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 fuzzy-match = true
ws-icon-0 = 1; ws-icon-0 = 1;
@ -151,45 +96,41 @@ ws-icon-4 = 5;
ws-icon-5 = 6; ws-icon-5 = 6;
ws-icon-6 = 7; ws-icon-6 = 7;
ws-icon-7 = 8; ws-icon-7 = 8;
ws-icon-default =  ws-icon-default = \
; Only show workspaces on the same output as the bar format = <label-state>
pin-workspaces = true
label-mode = %mode%
label-mode-padding = 2 label-mode-padding = 2
label-mode-foreground = #000 label-mode-background = #e60053
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor label-focused = %name%
label-focused = %index% label-focused-foreground = ${colors.white}
label-focused-background = ${module/bspwm.label-focused-background} label-focused-background = #566268
label-focused-underline = ${module/bspwm.label-focused-underline} label-focused-underline = ${colors.blue}
label-focused-padding = ${module/bspwm.label-focused-padding} label-focused-padding = 4
; unfocused = Inactive workspace on any monitor label-unfocused = %name%
label-unfocused = %index% label-unfocused-padding = 4
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor label-visible = %name%
label-visible = %index% label-visible-underline = ${colors.red}
label-visible-background = ${self.label-focused-background} label-visible-padding = 4
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set label-urgent = %name%
label-urgent = %index% label-urgent-foreground = ${colors.black}
label-urgent-background = ${module/bspwm.label-urgent-background} label-urgent-background = ${colors.red}
label-urgent-padding = ${module/bspwm.label-urgent-padding} label-urgent-padding = 4
[module/mpd] [module/mpd]
type = internal/mpd type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = icon-prev =
icon-stop = icon-stop =
icon-play = icon-play =
icon-pause = icon-pause =
icon-next = icon-next =
label-song-maxlen = 25 label-song-maxlen = 25
label-song-ellipsis = true label-song-ellipsis = true
@ -197,49 +138,23 @@ label-song-ellipsis = true
[module/xbacklight] [module/xbacklight]
type = internal/xbacklight type = internal/xbacklight
format = <label> <bar> format = <label>
label = BL label =  %percentage%%
label-underline = ${colors.yellow}
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}
[module/backlight-acpi] [module/backlight-acpi]
inherit = module/xbacklight inherit = module/xbacklight
type = internal/backlight type = internal/backlight
card = intel_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] [module/wlan]
type = internal/network type = internal/network
interface = wlp2s0 interface = wlp2s0
interval = 3.0 interval = 3.0
format-connected = <ramp-signal> <label-connected> format-connected = <label-connected>
format-connected-underline = #9f78e1 format-connected-underline = ${colors.cyan}
label-connected = %essid% label-connected =  %essid%
format-disconnected = format-disconnected =
;format-disconnected = <label-disconnected> ;format-disconnected = <label-disconnected>
@ -247,42 +162,20 @@ format-disconnected =
;label-disconnected = %ifname% disconnected ;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt} ;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] [module/date]
type = internal/date type = internal/date
interval = 5 interval = 5
date = date =
date-alt = " %Y-%m-%d" date-alt = " %Y-%m-%d"
time = %H:%M time = " %H:%M:%S"
time-alt = %H:%M:%S time-alt =
format-prefix = format-prefix =
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5 format-underline = ${colors.magenta}
label = %date% %time% label = %date% %time%
@ -290,22 +183,24 @@ label = %date% %time%
type = internal/volume type = internal/volume
format-volume = <label-volume> <bar-volume> format-volume = <label-volume> <bar-volume>
label-volume = VOL label-volume =
label-volume-foreground = ${root.foreground} label-volume-foreground = ${root.foreground}
format-volume-underline = ${colors.green}
format-muted-prefix = " " format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt} format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted label-muted = sound muted
bar-volume-width = 10 bar-volume-width = 10
bar-volume-foreground-0 = #55aa55 bar-volume-foreground-0 = ${colors.green}
bar-volume-foreground-1 = #55aa55 bar-volume-foreground-1 = ${colors.green}
bar-volume-foreground-2 = #55aa55 bar-volume-foreground-2 = ${colors.green}
bar-volume-foreground-3 = #55aa55 bar-volume-foreground-3 = ${colors.green}
bar-volume-foreground-4 = #55aa55 bar-volume-foreground-4 = ${colors.green}
bar-volume-foreground-5 = #f5a70a bar-volume-foreground-5 = ${colors.yellow}
bar-volume-foreground-6 = #ff5555 bar-volume-foreground-6 = ${colors.red}
bar-volume-gradient = false bar-volume-gradient = true
bar-volume-indicator = | bar-volume-indicator = |
bar-volume-indicator-font = 2 bar-volume-indicator-font = 2
bar-volume-fill = ─ bar-volume-fill = ─
@ -321,45 +216,30 @@ adapter = ADP1
full-at = 98 full-at = 98
format-charging = <animation-charging> <label-charging> format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a format-charging-underline = ${colors.yellow}
format-discharging = <ramp-capacity> <label-discharging> format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline} format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " " format-full-prefix =
format-full-prefix-foreground = ${colors.foreground-alt} format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline} format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = ramp-capacity-0 = 
ramp-capacity-1 = ramp-capacity-1 = 
ramp-capacity-2 = ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${colors.foreground-alt} ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = animation-charging-0 = 
animation-charging-1 = animation-charging-1 = 
animation-charging-2 = animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-foreground = ${colors.foreground-alt} animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750 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] [module/powermenu]
type = custom/menu type = custom/menu
@ -367,10 +247,10 @@ expand-right = true
format-spacing = 1 format-spacing = 1
label-open = label-open =
label-open-foreground = ${colors.secondary} label-open-foreground = ${colors.magenta}
label-close = cancel label-close = cancel
label-close-foreground = ${colors.secondary} label-close-foreground = ${colors.magenta}
label-separator = | label-separator = |
label-separator-foreground = ${colors.foreground-alt} label-separator-foreground = ${colors.foreground-alt}
@ -390,7 +270,7 @@ menu-2-1 = cancel
menu-2-1-exec = menu-open-0 menu-2-1-exec = menu-open-0
[settings] [settings]
screenchange-reload = true ;screenchange-reload = true
;compositing-background = xor ;compositing-background = xor
;compositing-background = screen ;compositing-background = screen
;compositing-foreground = source ;compositing-foreground = source
@ -399,5 +279,3 @@ screenchange-reload = true
[global/wm] [global/wm]
margin-top = 5 margin-top = 5
margin-bottom = 5 margin-bottom = 5
; vim:ft=dosini

View File

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

View File

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