From 04ea964440221a09d9a66af52749287ddbf49315 Mon Sep 17 00:00:00 2001 From: shmibs Date: Mon, 15 Jun 2015 14:55:33 -0700 Subject: incremental update changes i've let back up over time --- .Xresources | 2 +- .config/dunst/dunstrc | 2 +- .config/herbstluftwm/autostart | 2 +- .config/herbstluftwm/config_vars | 33 +++++++++++++--- .config/herbstluftwm/panel.sh | 83 +++++++++++++++++++++++++++++----------- .config/nitrogen/bg-saved.cfg | 2 +- .config/ranger/rc.conf | 2 +- .config/ranger/rifle.conf | 18 ++++----- .config/sxiv/exec/key-handler | 4 +- .pentadactylrc | 4 +- .vimrc | 18 +++++---- .xinitrc | 37 +++++++++++++++++- .zshrc | 40 ++++++++++++++++--- 13 files changed, 186 insertions(+), 61 deletions(-) diff --git a/.Xresources b/.Xresources index 0e17630..158d4bd 100644 --- a/.Xresources +++ b/.Xresources @@ -133,7 +133,7 @@ URxvt*color15: #f0f0f0 ! URxvt*borderColor: colour ! Select the fonts to be used. This is a comma separated list of font names that are checked in order when trying to find glyphs for characters. The first font -URxvt*font: xft:Tamsyn:size=11 +URxvt*font: xft:Tamsyn:size=15, xft:MS Gothic:size=15, xft:Dotum:size=15 ! URxvt*boldFont: fontlist diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 749ebed..1202f9b 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -1,5 +1,5 @@ [global] - font = Tamsyn 12 + font = Tamsyn 16 # allow a small subset of html markup: # bold diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index 5c9841b..8963277 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -173,7 +173,7 @@ 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~'(FTL|Tegaki-recognize|PlayOnLinux|PCSX2|Tilem2|Wine)' pseudotile=on focus=on hc rule class~'(mednafen)' pseudotile=on focus=on # unlock, just to be sure diff --git a/.config/herbstluftwm/config_vars b/.config/herbstluftwm/config_vars index c736528..b910fed 100755 --- a/.config/herbstluftwm/config_vars +++ b/.config/herbstluftwm/config_vars @@ -37,6 +37,23 @@ ############### # Lain Blind # ############### +# +#bg_normal='#262626' +#fg_normal='#c1b48e' +#bg_focus='#d0758b' +#fg_focus='#efefef' +#bg_urgent='#ff4070' +#fg_urgent='#efefef' +# +#fg_grey='#808080' +#fg_red='#d0758b' +#fg_green='#d0758b' +#fg_yellow='#d0758b' +#fg_blue='#d0758b' + +########### +# Aigis # +########### bg_normal='#262626' fg_normal='#c1b48e' @@ -45,13 +62,17 @@ fg_focus='#efefef' bg_urgent='#ff4070' fg_urgent='#efefef' -fg_grey='#808080' -fg_red='#d0758b' -fg_green='#d0758b' -fg_yellow='#d0758b' -fg_blue='#d0758b' +fg_grey='#566a72' +fg_red='#ba5654' +fg_green='#badbb4' +fg_yellow='#b9c780' +fg_blue='#99cff3' bheight=18 -dfont='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*' +#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/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index eff47cb..7588e54 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -34,6 +34,12 @@ fg_green=$(echo -n '#ff'; echo "$fg_green" | tr -d '#') fg_yellow=$(echo -n '#ff'; echo "$fg_yellow" | tr -d '#') fg_blue=$(echo -n '#ff'; echo "$fg_blue" | tr -d '#') +# these are annoying, but i can't figure out a stateless way to handle rotation +declare -i mpd_offset +declare -i mpd_length +declare mpd_current +declare mpd_playing + hc pad $monitor $bheight @@ -45,6 +51,20 @@ hc pad $monitor $bheight # functions for retrieving and processing data # upon events +update_mpd() { + echo -n "%{F${bg_focus}}|%{F${fg_normal} A:mpd:} " + echo -n "%{F${fg_green}}\uE05C%{F${fg_normal}} " + #echo -n "$mpd_current" | cut -c -$(expr 20 - "$mpd_offset") + echo "%{A}" + if [[ $mpd_length -gt 20 ]]; then + if [[ $mpd_offset -lt $[mpd_length-1] ]]; then + mpd_offset=$[mpd_offset+1] + else + mpd_offset=0 + fi + fi +} + update_taglist() { echo -n "%{l}%{B${bg_normal} F${fg_normal} U${fg_normal}}" hc tag_status | tr '\t' '\n' | sed \ @@ -62,7 +82,7 @@ update_taglist() { update_winlist() { focus_id=$(hc get_attr clients.focus.winid) - if [[ "$focus_id" == "" ]]; then + if [[ -z "$focus_id" ]]; then return fi @@ -102,8 +122,7 @@ fields[5]="" fields[6]="" # date fields[7]="" -# vertical separator and gap for tray -#fields[8]="%{F${bg_focus}}| %{F${fg_normal}}" + ###################### @@ -123,6 +142,17 @@ get_date() { } | awk '$0 != l { print ; l=$0 ; fflush(); }' } +get_mpd() { + while true; do + if [[ -z "$(mpc status | grep '\[playing\]')" ]]; then + echo -e "mpd\tpaused" + else + echo -e "mpd\tplaying" + fi + mpc idle player + done +} + get_stat() { { conky -c ~/.config/herbstluftwm/panel/conky_stats @@ -132,7 +162,7 @@ get_stat() { get_when() { { while true; do - if [[ "$(when --future=2 | sed '1,2d')" == "" ]]; then + if [[ -z "$(when --future=2 | sed '1,2d')" ]]; then echo -e 'when\t0' else echo -e 'when\t1' @@ -142,12 +172,6 @@ get_when() { } | awk '$0 != l { print ; l=$0 ; fflush(); }' } -get_mpd() { - while true; do - mpc current -f "mpd\t%artist%\t%album%\t%title%" --wait - done -} - ####################### @@ -164,8 +188,8 @@ get_mpd() { child[2]=$! get_when & child[3]=$! - #get_mpd & - #child[4]=$! + get_mpd & + child[4]=$! hc --idle @@ -173,7 +197,7 @@ get_mpd() { kill $id done - pkill bar + pkill lemonbar } 2> /dev/null | { @@ -198,6 +222,24 @@ get_mpd() { case "${event[0]}" in date) fields[7]="%{F${bg_focus}}|%{F${fg_normal} A:date:} \uE015 ${event[@]:1} %{A}" + if [[ $mpd_playing ]]; then + fields[5]=$(update_mpd) + fi + ;; + + mpd) + if [[ "${event[1]}" == "playing" ]]; then + mpd_offset=0 + mpd_current="$(mpc current) " + mpd_length=${#mpd_current} + mpd_playing=true + fields[5]=$(update_mpd) + else + mpd_offset=0 + mpd_length=0 + mpd_current="" + mpd_playing=false + fi ;; stats) @@ -245,7 +287,8 @@ get_mpd() { done # pass the events into bar -} 2> /dev/null | bar -f $dfont -g${width}x${bheight}+${xpos}+${ypos} \ +} 2> /dev/null | lemonbar -f "$bfont1" -f "$bfont2" \ + -g${width}x${bheight}+${xpos}+${ypos} \ -B ${bg_normal} -F ${fg_normal} | \ { @@ -259,15 +302,9 @@ get_mpd() { date) notify-send "$(cal)" ;; - #mpd) - # artist=$(mpc current -f '%artist%') - # albumartist=$(mpc current -f '%albumartist%') - # if [[ "$artist" != "$albumartist" ]]; then - # artist=$(echo -e "album artist: $albumartist\nartist: $artist") - # else - # artist=$(echo "artist: $artist") - # fi - # file="/home/shmibs/music/$(mpc current -f '%file%')" + mpd) + notify-send "$(mpc status)" + ;; stats) urxvt -e htop & ;; diff --git a/.config/nitrogen/bg-saved.cfg b/.config/nitrogen/bg-saved.cfg index 025fc89..71190f2 100644 --- a/.config/nitrogen/bg-saved.cfg +++ b/.config/nitrogen/bg-saved.cfg @@ -1,4 +1,4 @@ [:0.0] -file=/home/shmibs/backdrops/shadowed/lain-bed.png +file=/home/shmibs/backdrops/shadowed/aigis-1920x1080.png mode=5 bgcolor=#000000 diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index d8a94ac..ab29508 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -61,7 +61,7 @@ set vcs_backend_bzr disabled set preview_images false # Use a unicode "..." character to mark cut-off filenames? -set unicode_ellipsis true +set unicode_ellipsis false # Show dotfiles in the bookmark preview box? set show_hidden_bookmarks true diff --git a/.config/ranger/rifle.conf b/.config/ranger/rifle.conf index ed66344..aa57817 100644 --- a/.config/ranger/rifle.conf +++ b/.config/ranger/rifle.conf @@ -47,6 +47,15 @@ # Note: When using rifle in ranger, there is an additional flag "c" for # only running the current file even if you have marked multiple files. +#------------------------------------------- +# Misc +#------------------------------------------- +# Define the "editor" for text files as first action +mime ^text, label editor = "$EDITOR" -- "$@" +mime ^text, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" +!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@" +!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" + #------------------------------------------- # Websites #------------------------------------------- @@ -69,15 +78,6 @@ ext x?html?, has links, terminal = links "$@" ext x?html?, has lynx, terminal = lynx -- "$@" ext x?html?, has w3m, terminal = w3m "$@" -#------------------------------------------- -# Misc -#------------------------------------------- -# Define the "editor" for text files as first action -mime ^text, label editor = "$EDITOR" -- "$@" -mime ^text, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" -!mime ^text, ext xml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@" -!mime ^text, ext xml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@" - # wine ext exe, has wine, X, flag f = wine "$1" diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index 9eed7d3..01ec679 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -14,7 +14,7 @@ do "g") gimp "$file" & ;; "s") - scp "$file" shmibbles.me:/srv/http/tmp/ + scp "$file" shmibbles.me:http/tmp/ if [ $? -ne 0 ]; then notify-send "uploading $(basename $file) to /tmp/ failed" else @@ -25,7 +25,7 @@ do fi ;; "i") - scp "$file" shmibbles.me:/srv/http/img/ + scp "$file" shmibbles.me:http/img/ if [ $? -ne 0 ]; then notify-send "uploading $(basename $file) to /img/ failed" else diff --git a/.pentadactylrc b/.pentadactylrc index 5de3545..4df8e70 100644 --- a/.pentadactylrc +++ b/.pentadactylrc @@ -3,8 +3,8 @@ loadplugins '\.(js|penta)$' group user highlight Hint font: bold 12px "Droid Sans Mono", monospace !important; margin: -.2ex; padding: 0 0 0 1px; outline: 1px solid rgba(0, 0, 0, .5); background: rgba(255, 248, 231, .8); color: black; text-transform: uppercase; -map -count -modes=n,v ! :tabopenduckduckgo! -map -count -modes=n,v s :tabopenduckduckgo +map -count -modes=n,v ! :tabopenduckduckgo-lite! +map -count -modes=n,v s :tabopenduckduckgo-lite map -count -modes=n,v S :openduckduckgo map -count -modes=n,v -builtin \b set hintkeys=sldkfjgh diff --git a/.vimrc b/.vimrc index 0a4d03a..9fd3225 100644 --- a/.vimrc +++ b/.vimrc @@ -78,7 +78,7 @@ noremap gr gq "insert lines below nnoremap ++ == -nnoremap = Oaj +nnoremap = Oj "folds! nnoremap fo zO @@ -118,17 +118,19 @@ end " FILETYPE SETTINGS " """"""""""""""""""""""" -"always use rust instead of hercules -au BufNewFile,BufRead *.rs set filetype=rust - -"always use LaTeX -au BufNewFile,BufRead *.tex set filetype=tex - "annoying syntax-related values that need to be set before files are "opened let g:c_no_comment_fold = 1 let g:c_no_if0_fold = 1 +if has("autocmd") + +"always use rust instead of hercules +autocmd BufNewFile,BufRead *.rs set filetype=rust + +"always use LaTeX +autocmd BufNewFile,BufRead *.tex set filetype=tex + "other filetype-specific settings. i can't figure out how to stick all "the FileTypes in one dict (mostly because i have no idea what i'm "doing with viml), so separate lines it is. @@ -252,3 +254,5 @@ function! Settings_vim() "mappings nnoremap -- O" endfunction + +endif "autocmd diff --git a/.xinitrc b/.xinitrc index 009bdf6..b738bd9 100644 --- a/.xinitrc +++ b/.xinitrc @@ -4,43 +4,70 @@ then xrdb -merge ~/.Xresources fi +echo "1" > test + #add compose key if [ -s ~/.Xmodmap ] then xmodmap ~/.Xmodmap fi +echo "2" >> test + + #input! export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" fcitx & +echo "3" >> test + + #clean up sxiv cache #and ensure necessary EV #exists sxiv -c export XDG_CACHE_HOME=/home/shmibs/.cache +echo "4" >> test + + #clear vimtags -rm ~/.vimtags +#rm ~/.vimtags + +echo "5" >> test + -#load local fonts +#load more fonts xset +fp /usr/share/fonts/local +xset +fp /usr/share/fonts/misc xset fp rehash +echo "6" >> test + + #infinality settings export INFINALITY_FT_BRIGHTNESS="-10" export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16" +echo "7" >> test + + #disable power saving, so screen doesn't power off xset -dpms xset s off +echo "8" >> test + + #daemons urxvtd & compton -b --backend glx --vsync drm +echo "9" >> test + + #QT style mimic gtk #export QT_STYLE_OVERRIDE=gtk @@ -49,7 +76,13 @@ compton -b --backend glx --vsync drm #nvidia graphics cards to shut up command -v optirun && $(echo "" | optirun bar) +echo "10" >> test + + xsetroot -cursor_name left_ptr nitrogen --restore +echo "11" >> test + + exec mate-session diff --git a/.zshrc b/.zshrc index 723a154..b9b875d 100644 --- a/.zshrc +++ b/.zshrc @@ -82,16 +82,27 @@ bindkey '^N' down-history ################### ALIASES ################## -alias ls='ls --color=auto' -alias grep='grep --color=auto' +alias ag='ag --color-match "1;34"' alias diff='colordiff' -alias less='less -R' +alias grep='grep --color=auto' alias latex='latex -output-format=pdf' -alias ag='ag --color-match "1;34"' -alias svim='sudo -E vim' +alias less='less -R' +alias ls='ls --color=auto' + +# ignore non-tracked files +git() { + if [[ $# -gt 0 ]] && [[ "$1" == "status" ]]; then + shift + $(which -p git) status -uno "$@" + else + $(which -p git) "$@" + fi +} alias def='sdcv' +alias dvd='mpv --deinterlace=yes dvd://' alias ssh-socks='ssh -C2qTnN -D 9853 shmibbles.me' +alias svim='sudo -E vim' alias thesaurus='aiksaurus' alias vmount='udevil mount' alias vumount='udevil umount' @@ -306,3 +317,22 @@ make-gif() { rm -f make-gif-palette.png rm -f make-gif-in } + +fuck() { + fuck="fuck" + while true; do + echo -en "\e[$((RANDOM%2));$((RANDOM%8+30))m" + + for i in {1..4}; do + if [[ $((RANDOM%2)) -eq 1 ]]; then + echo -n $fuck[$i] | tr '[:lower:]' '[:upper:]' + else + echo -n $fuck[$i] + fi + done + + for i in {1..$((RANDOM%20))}; do + echo -n " " + done + done +} -- cgit v1.2.3