diff options
author | katherine <shmibs@shmibbles.me> | 2016-01-22 05:23:51 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2016-01-22 05:23:51 -0700 |
commit | 52850cd050a543c5a00eadeec70ed385f9176d98 (patch) | |
tree | d954cad8690a40c06610582a2f4fcd5dda36ee2b | |
parent | ef9435ab2b64aea178db4de02c6f994ac8f8cd26 (diff) | |
download | dotfiles-52850cd050a543c5a00eadeec70ed385f9176d98.tar.gz |
create .config/init/ for initialising configs
-rwxr-xr-x | .config/herbstluftwm/autostart | 16 | ||||
-rwxr-xr-x | .config/herbstluftwm/calc.sh | 2 | ||||
-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 |
9 files changed, 123 insertions, 97 deletions
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/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" |