diff options
-rw-r--r-- | .config/dunst/dunstrc | 29 | ||||
-rwxr-xr-x | .config/herbstluftwm/autostart | 16 | ||||
-rwxr-xr-x | .config/herbstluftwm/calc.sh | 2 | ||||
-rwxr-xr-x | .config/herbstluftwm/mpc-status.sh | 26 | ||||
-rwxr-xr-x | .config/herbstluftwm/panel.sh | 126 | ||||
-rwxr-xr-x | .config/herbstluftwm/switcher.sh | 2 | ||||
-rwxr-xr-x | .config/herbstluftwm/tray.sh | 2 | ||||
-rw-r--r-- | .config/init/gen-zathurarc.sh | 28 | ||||
-rwxr-xr-x | .config/init/init.sh | 4 | ||||
-rwxr-xr-x | .config/init/vars (renamed from .config/herbstluftwm/config_vars) | 36 | ||||
-rw-r--r-- | .config/zathura/zathurarc | 4 | ||||
-rw-r--r-- | .vimrc | 11 |
12 files changed, 166 insertions, 120 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index cf4fc8b..ac8382b 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -55,20 +55,6 @@ ignore_newline = no - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "0x5-30+20" - # Shrink window if it's smaller than the width. Will be ignored if # width is 0. shrink = no @@ -81,7 +67,7 @@ # Don't remove messages, if the user is idle (no mouse or keyboard input) # for longer than idle_threshold seconds. # Set to 0 to disable. - idle_threshold = 0 + idle_threshold = 30 # Which monitor should the notifications be displayed on. monitor = 0 @@ -152,7 +138,7 @@ icon_position = left [frame] - width = 1 + width = 2 [shortcuts] # Shortcuts are specified as [modifier+][modifier+]...key @@ -160,24 +146,21 @@ # "mod3" and "mod4" (windows-key). # Xev might be helpful to find names for keys. - # close notification + # Close notification. close = mod4+grave - # Redisplay last message(s). # On the US keyboard layout "grave" is normally above TAB and left # of "1". history = mod4+ctrl+grave [urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - timeout = 10 + timeout = 0 [urgency_normal] - timeout = 10 + timeout = 15 [urgency_critical] - timeout = 0 + timeout = 15 # Every section that isn't one of the above is interpreted as a rules to diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index c6e977d..12361b6 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -1,6 +1,6 @@ #!/bin/bash -source ~/.config/herbstluftwm/config_vars +source ~/.config/init/vars hc() { herbstclient "$@" @@ -143,9 +143,10 @@ hc keybind Mod4-9 spawn ~/.config/herbstluftwm/switcher.sh hc keybind Mod4-8 spawn ~/.config/herbstluftwm/calc.sh # tunes +hc keybind Mod4-Up spawn ~/.config/herbstluftwm/mpc-status.sh hc keybind Mod4-Down spawn mpc toggle -hc keybind Mod4-Right spawn mpc next -hc keybind Mod4-Left spawn mpc prev +hc keybind Mod4-Right spawn ~/.config/herbstluftwm/mpc-status.sh next +hc keybind Mod4-Left spawn ~/.config/herbstluftwm/mpc-status.sh prev ############## end launchers ############## @@ -178,8 +179,8 @@ hc rule focus=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off # set apppropriate things to pseudotile hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on focus=on -hc rule class~'(VBoxSDL|SleepIsDeathApp|freeciv-sdl|milkytracker)' pseudotile=on focus=on -hc rule class~'(FTL|Tegaki-recognize|PlayOnLinux|PCSX2|Tilem2|Wine)' pseudotile=on focus=on +hc rule class~'(VBoxSDL|SleepIsDeathApp|freeciv-sdl|FTL)' pseudotile=on focus=on +hc rule class~'(Tegaki-recognize|PlayOnLinux|PCSX2|Tilem2|Wine)' pseudotile=on focus=on hc rule class~'(mednafen)' pseudotile=on focus=on # unlock, just to be sure @@ -195,7 +196,7 @@ herbstclient set tree_style '╾│ ├└╼─┐' # run the panel panel=~/.config/herbstluftwm/panel.sh [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh -for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do +for monitor in $(hc list_monitors | cut -d: -f1) ; do # start it on each monitor "$panel" $monitor & done @@ -203,4 +204,5 @@ done # run dunst with theme colours dunst -lb $bg_normal -nb $bg_normal -cb $bg_focus \ -lf $fg_normal -nf $fg_normal -cf $fg_focus \ - -frame_color $bg_focus + -frame_color $bg_focus -geom "0x3-4+$(($bheight + 4))" + diff --git a/.config/herbstluftwm/calc.sh b/.config/herbstluftwm/calc.sh index 3a7faba..ee0cc93 100755 --- a/.config/herbstluftwm/calc.sh +++ b/.config/herbstluftwm/calc.sh @@ -1,6 +1,6 @@ #!/bin/bash -source ~/.config/herbstluftwm/config_vars +source ~/.config/init/vars acc=0 in="first" diff --git a/.config/herbstluftwm/mpc-status.sh b/.config/herbstluftwm/mpc-status.sh new file mode 100755 index 0000000..ef8bf11 --- /dev/null +++ b/.config/herbstluftwm/mpc-status.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +case "$1" in + next) + mpc next + ;; + prev) + mpc prev + ;; + *) + ;; +esac + +cd ~/music/ +dir=$(dirname "$(mpc current -f %file%)") +# copying is necessary because notify-send can't into icon paths containing commas +cp "$dir/cover-small.png" /tmp/mpd-icon.png + +message="$(mpc current -f '##%track% %title% (%date%)\n%artist% - %album%') + +$(mpc status | tail -n -2 | sed -re 's/volume.*repeat/\nrepeat/' -e 's/( ){3,4}/\n/g' -e '/volume: /d')" + +# i patched dunst to clear all on SIGUSR1 +killall -SIGUSR1 dunst + +notify-send --icon=/tmp/mpd-icon.png "$message" diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index 51ce5c5..b9c9eee 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -17,7 +17,7 @@ ypos=${geometry[1]} width=${geometry[2]} # grab standardised colours -source ~/.config/herbstluftwm/config_vars +source ~/.config/init/vars # set alpha for background colours alpha='#ff' @@ -36,10 +36,6 @@ fg_blue=$(echo -n '#ff'; echo "$fg_blue" | tr -d '#') hc pad $monitor $bheight -declare -i mpd_connected -declare mpc_current -declare mpc_rot - ################# # SUBROUTINES # @@ -48,42 +44,42 @@ declare mpc_rot # functions for retrieving and processing data # upon events -update_mpd() { - echo -n "%{F${bg_focus}}|%{F${fg_normal} A:mpd:} " - - # failed to connect or stopped - if [[ -z "$(mpc current)" ]]; then - if [[ $? ]]; then - mpd_connected=0 - fi - echo "%{F${fg_red}}\uE05C %{F${fg_normal} A}" - return - else - if [[ "$(mpc current -f \"%title\")" == "$mpc_current" ]]; then - if [[ ${#mpc_rot} -gt 10 ]]; then - mpc_rot=$(echo "$mpc_rot" | sed -e 's/\(.\)\(.*\)/\2\1/') - fi - else - mpc_current="$(mpc current -f \"%title%\")" - mpc_rot=mpc_current - fi - - echo -n "%{F${fg_green}}" - # if you want separate icons for paused / playing - # if [[ -z "$(mpc status | grep '\[playing\]')" ]]; then - # echo -n "paused icon" - # else - # echo -n "playing icon" - # fi - echo -n "\uE05C " - - echo "$mpc_rot" | cut -c 10 | tr -d '\n' - - echo "%{F${fg_normal} A}" - fi - - mpd_connected=1 -} +#update_mpd() { +# echo -n "%{F${bg_focus}}|%{F${fg_normal} A:mpd:} " +# +# # failed to connect or stopped +# if [[ -z "$(mpc current)" ]]; then +# if [[ $? ]]; then +# mpd_connected=0 +# fi +# echo "%{F${fg_red}}\uE05C %{F${fg_normal} A}" +# return +# else +# if [[ "$(mpc current -f \"%title\")" == "$mpc_current" ]]; then +# if [[ ${#mpc_rot} -gt 10 ]]; then +# mpc_rot=$(echo "$mpc_rot" | sed -e 's/\(.\)\(.*\)/\2\1/') +# fi +# else +# mpc_current="$(mpc current -f \"%title%\")" +# mpc_rot=mpc_current +# fi +# +# echo -n "%{F${fg_green}}" +# # if you want separate icons for paused / playing +# # if [[ -z "$(mpc status | grep '\[playing\]')" ]]; then +# # echo -n "paused icon" +# # else +# # echo -n "playing icon" +# # fi +# echo -n "\uE05C " +# +# echo "$mpc_rot" | cut -c 10 | tr -d '\n' +# +# echo "%{F${fg_normal} A}" +# fi +# +# mpd_connected=1 +#} update_taglist() { echo -n "%{l}%{B${bg_normal} F${fg_normal} U${fg_normal}}" @@ -142,7 +138,7 @@ fields[3]="%{r}" # when fields[4]="" # mpd -fields[5]="$(update_mpd)" +fields[5]="" #"$(update_mpd)" # conky stats fields[6]="" # date @@ -166,21 +162,21 @@ event_tick() { done } -event_mpd() { - mpc status - while true; do - if [[ $? ]]; then - mpd_connected=0 - echo -e "mpd\tdisconnected" - sleep 10 - break - else - mpd_connected=1 - echo -e "mpd\tconnected" - fi - mpc idle player - done -} +#event_mpd() { +# mpc status +# while true; do +# if [[ $? ]]; then +# mpd_connected=0 +# echo -e "mpd\tdisconnected" +# sleep 10 +# break +# else +# mpd_connected=1 +# echo -e "mpd\tconnected" +# fi +# mpc idle player +# done +#} event_stat() { { @@ -217,8 +213,8 @@ event_when() { child[2]=$! event_when & child[3]=$! - event_mpd & - child[4]=$! + #event_mpd & + #child[4]=$! hc --idle @@ -251,14 +247,14 @@ event_when() { case "${event[0]}" in tick) fields[7]=$(update_date) - if [[ $mpd_connected ]]; then - fields[5]=$(update_mpd) - fi + #if [[ $mpd_connected ]]; then + # fields[5]=$(update_mpd) + #fi ;; - mpd) - fields[5]=$(update_mpd) - ;; + #mpd) + # fields[5]=$(update_mpd) + # ;; stats) event[1]=$(printf "%-4s" ${event[1]}) diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh index 5bd020d..8ac60d1 100755 --- a/.config/herbstluftwm/switcher.sh +++ b/.config/herbstluftwm/switcher.sh @@ -1,6 +1,6 @@ #!/bin/zsh -source ~/.config/herbstluftwm/config_vars +source ~/.config/init/vars list=$(wmctrl -l) IFS=$'\r\n' nums=($(echo $list | cut -d ' ' -f 1)) diff --git a/.config/herbstluftwm/tray.sh b/.config/herbstluftwm/tray.sh index 61e6310..c82e37d 100755 --- a/.config/herbstluftwm/tray.sh +++ b/.config/herbstluftwm/tray.sh @@ -1,7 +1,7 @@ #!/bin/bash hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} -source ~/.config/herbstluftwm/config_vars +source ~/.config/init/vars run="" while [ -z "$run" ]; do diff --git a/.config/init/gen-zathurarc.sh b/.config/init/gen-zathurarc.sh new file mode 100644 index 0000000..b8f9169 --- /dev/null +++ b/.config/init/gen-zathurarc.sh @@ -0,0 +1,28 @@ +{ + +echo " +set font \"$ttfont\" + +set highlight-color \"$bg_normal\" +set highlight-active-color \"$bg_focus\" + +set scroll-page-aware true +set window-title-basename true +set selection-clipboard clipboard +set selection-notification false +" + +normal=("completion" "default" "index" "inputbar" "statusbar") +focus=("completion-highlight" "index-active") + +for i in ${normal[@]}; do + echo "set $i-fg \"$fg_normal\"" + echo "set $i-bg \"$bg_normal\"" +done + +for i in ${focus[@]}; do + echo "set $i-fg \"$fg_focus\"" + echo "set $i-bg \"$bg_focus\"" +done + +} > /tmp/zathurarc diff --git a/.config/init/init.sh b/.config/init/init.sh new file mode 100755 index 0000000..0d7ff58 --- /dev/null +++ b/.config/init/init.sh @@ -0,0 +1,4 @@ +#!/bin/bash +source ~/.config/init/vars + +source gen-zathurarc.sh diff --git a/.config/herbstluftwm/config_vars b/.config/init/vars index b910fed..0c07a69 100755 --- a/.config/herbstluftwm/config_vars +++ b/.config/init/vars @@ -1,9 +1,16 @@ #!/bin/bash -############### -# Arch Blue # -############### -# +############# +# general # +############# + +ttfont='Fira Mono 10' + +############ +# themes # +############ + +# Arch Blue #bg_normal='#333333' #fg_normal='#efefef' #bg_focus='#00aad4' @@ -17,10 +24,7 @@ #fg_yellow='#ffa466' #fg_blue='#00aad4' -############### -# Section 9 # -############### -# +# Section 9 #bg_normal='#333333' #fg_normal='#efefef' #bg_focus='#714BA7' @@ -34,10 +38,7 @@ #fg_yellow='#ffa466' #fg_blue='#00aad4' -############### -# Lain Blind # -############### -# +# Lain Blind #bg_normal='#262626' #fg_normal='#c1b48e' #bg_focus='#d0758b' @@ -51,10 +52,7 @@ #fg_yellow='#d0758b' #fg_blue='#d0758b' -########### -# Aigis # -########### - +# Aigis bg_normal='#262626' fg_normal='#c1b48e' bg_focus='#d0758b' @@ -68,11 +66,13 @@ fg_green='#badbb4' fg_yellow='#b9c780' fg_blue='#99cff3' +############## +# lemonbar # +############## + bheight=18 #dfont='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*' bfont1='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*' bfont2='-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*' efont='-*-tamsyn-medium-*-*-*-14-*-*-*-*-*-*-*' - - diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc deleted file mode 100644 index 85760c4..0000000 --- a/.config/zathura/zathurarc +++ /dev/null @@ -1,4 +0,0 @@ -set font "Droid Sans Mono 10" -set inputbar-fg "#2d2d2d" -set tabbar-focus-fg "#2d2d2d" -set completion-highlight-bg "#d64937" @@ -221,6 +221,10 @@ endfunction function! Settings_haskell() "settings + setlocal shiftwidth=4 + setlocal tabstop=4 + setlocal softtabstop=4 + setlocal expandtab "mappings nnoremap <buffer> -- O--<Space> endfunction @@ -256,6 +260,13 @@ function! Settings_nim() nnoremap <buffer> -_ O##<Space> endfunction +function! Settings_python() + call Settings_script() + "settings + setlocal expandtab + "mappings +endfunction + function! Settings_script() "settings setlocal shiftwidth=4 |