Add i3, polybar and rofi config #i3

This commit is contained in:
Colin Powell
2019-01-15 23:15:05 -05:00
parent a8e022314b
commit 821b1c1c14
8 changed files with 714 additions and 0 deletions

View File

@ -0,0 +1,145 @@
[bar/base]
width = 100%
height = 28
font-0 = -misc-fixed-medium-r-s*-13-*-iso10646-1
font-1 = Font Awesome:size=8:antialias=false
font-2 = DejaVu Sans:size=9:antialias=false
background = ${xrdb:bga:#dd222228}
foreground = ${xrdb:fg:#d8dade}
module-margin-left = 1
module-margin-right = 1
modules-left = i3 xwindow
modules-right = mail lan_i lan wlan volume_i volume xkeyboard date
tray-padding = 4
tray-position = right
tray-background = ${xrdb:bg:#222228}
[bar/top]
inherit = bar/base
# font-0 = Ubuntu:size=9:antialias=false
# font-1 = Font Awesome:size=8:antialias=false
# font-2 = monospace:size=9:antialias=false
[bar/bottom]
inherit = bar/base
bottom = true
# Workspaces {{{
[module/i3]
type = internal/i3
label-focused = %index%
label-focused-padding = 2
label-focused-background = ${bar/base.foreground}
label-focused-foreground = ${bar/base.background}
label-unfocused = ${self.label-focused}
label-unfocused-padding = ${self.label-focused-padding}
label-urgent = ${self.label-focused}
label-urgent-padding = ${self.label-focused-padding}
label-urgent-background = ${xrdb:color4:#d7af87}
label-urgent-foreground = ${self.label-focused-foreground}
# }}}
# Windows {{{
[module/xwindow]
type = internal/xwindow
label-maxlen = 100
# }}}
# Mail {{{
[module/mail]
type = custom/script
exec = ~/.config/polybar/status.sh mail
interval = 2
click-left = ~/.config/polybar/start.sh mail &
click-right = ~/.mutt/fetch.sh &
# }}}
# Weather {{{
[module/weather]
type = custom/script
exec = ~/.config/polybar/status.sh weather
interval = 3600
click-left = notify-send Погода "$(< ~/.config/polybar/status.weather)"
click-right = ~/.config/polybar/status.sh weather &
# }}}
# Internet {{{
[module/lan]
type = internal/network
interface = enp0s3
label-connected = %downspeed% %upspeed%
[module/wlan]
inherit = module/lan
interface = wlx784476bf0f9a
[module/lan_i]
type = custom/script
exec = ~/.config/polybar/status.sh wifi
interval = 5
click-left = ~/.config/polybar/start.sh network &
# }}}
# Volume {{{
[module/volume]
type = internal/volume
format-volume = <bar-volume>
format-muted = ${self.format-volume}
format-muted-foreground = #888
bar-volume-width = 20
bar-volume-indicator = |
bar-volume-fill = -
bar-volume-empty = -
bar-volume-empty-foreground = ${self.format-muted-foreground}
[module/volume_i]
type = custom/text
content = 
click-left = ~/.config/polybar/start.sh mixer &
# }}}
# Keyboard {{{
[module/xkeyboard]
type = internal/xkeyboard
label-layout = %name:0:2%
label-layout-padding = 2
label-indicator = %name:0:4%
label-indicator-padding = 1
# }}}
# Date {{{
[module/date]
type = internal/date
date = "%H:%M "
date-alt = "%a, %d %b %H:%M:%S "
# }}}
# vim: ft=dosini

View File

@ -0,0 +1,50 @@
#!/bin/bash
start(){ xterm -title "${1^}" -e bash -ic "$@" & }
menu(){ dmenu.sh -p "$@"; }
browser(){ brave-browser "$@" || iridium-browser "$@" || firefox "$@"; }
search(){ luakit -n "https://${*// /+}"; }
if [[ ! $DISPLAY || $TMUX ]]; then
start(){ "$@"; }
menu(){ fzf; }
browser(){ start elinks "${@:2}"; }
search(){ browser 0 "https://${*// /+}"; }
gvim(){ start vim; }
pavucontrol(){ start ncpamixer; }
[[ $TMUX ]] && start(){ tmux neww -n $1 "$@"; }
fi
case ${1,,} in
files) start ranger;;
browser) browser --new-window lexa.by;;
editor) gvim;;
shell) start tm;;
music) start mocp;;
calendar) start calcurse;;
contacts) start abook;;
mail) start mutt;;
news) start newsboat;;
torrents) start transmission-remote-cli;;
apps) xfce4-appfinder;;
mixer) pavucontrol;;
network) start nmtui;;
bloge) EDITOR='gvim -f' start "blo.sh $2";;
start) $0 $($0 | sed 's/.*/\u\0/' | menu Start);;
audio) audio.sh $(audio.sh | menu Device | cut -f 2);;
windows) wmctrl -ia "$(wmctrl -l | menu Windows -l 20)";;
\!*) $0 ddg "$*";;
ddg) search "duckduckgo.com/?q=${*:2}";;
man) search "manned.org/browse/search?q=${*:2}";;
wiki) search "ru.m.wikipedia.org/wiki?search=${*:2}";;
'') grep -o '^\s*\w*)' $0 | sed 's/[) ]//g';;
*) start "$1";;
esac

View File

@ -0,0 +1,29 @@
#!/bin/bash
case $1 in
mail)
n=$(notmuch count -s inbox)
[[ $n == 0 ]] &&
echo||
echo$n
;;
wifi)
d=($(nmcli -t -f type dev))
i=$(nmcli dev wifi | sed 1d | awk '/^\*/ { print $8 }')
[[ $d == wifi ]] &&
i=${i:-} || i=
echo $i
;;
weather)
{
curl -s wttr.in/spb?lang=ru | sed '7q; 1,2d' |
sed 's/\x1b\[[0-9;]*m//g'
date
} > ${0%.*}.weather
echo
;;
esac

View File

@ -0,0 +1,6 @@
\ / Переменная облачность
_ /"".-. 19-26 °F
\_( ). ↗ 6 mph
/(___(__) 6 mi
0.0 in
Tue Jan 15 23:05:23 EST 2019