]> git.sev.monster Git - dotfiles.git/commitdiff
Merge branch 'master' of home:git/dotfiles
authords6 <git@ds6.pw>
Thu, 12 Apr 2018 04:35:33 +0000 (23:35 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:28 +0000 (16:27 -0500)
extrapolated some bsd-only stuff

base/.Xresources
base/.gitconfig
base/.mailrc [new file with mode: 0644]
base/.vim/pack/repeat.vim/start/vim-repeat
base/.vimrc
base/.xinitrc
base/.zprofile [new file with mode: 0644]
base/.zshenv
bin/mpc-notify
install.sh

index b6219793f376d4cce8c4c5e5fb7c9dd7bbb934a8..04f76749a2d9a9d9ff0825b4638bcf61fde758e1 100644 (file)
@@ -68,7 +68,7 @@ Xcursor.theme:            Paper
 
 
 ! URxvt
-URxvt.termName:           rxvt-256color
+URxvt.termName:           rxvt-unicode-256color
 URxvt.perl-ext:
 URxvt.perl-ext-common:    searchable-scrollback,confirm-paste,matcher,font-size
 
@@ -100,7 +100,7 @@ URxvt.keysym.M-slash:     font-size:show
 URxvt.print-pipe:         cat > "$HOME/urxvt-$(date +'%Y-%m-%d-%H%M%S')"
 
 ! bg terminal 1
-TermBg1.termName:         rxvt-256color
+TermBg1.termName:         rxvt-unicode-256color
 TermBg1.perl-ext:
 TermBg1.perl-ext-common:
 
@@ -115,7 +115,7 @@ TermBg1.shading:          80
 TermBg1.blurRadius:       2x4
 
 ! bg terminal 2
-TermBg2.termName:         rxvt-256color
+TermBg2.termName:         rxvt-unicode-256color
 TermBg2.perl-ext:
 TermBg2.perl-ext-common:
 
index 71dc34b3770994af827d34b35efd2fea950b0414..17b6e1ccf8147ce22771020795f18e4035027014 100644 (file)
@@ -4,3 +4,4 @@
 
 [alias]
        pushall = !git remote | xargs -L1 -P3 git push
+       pull-submodules = submodule foreach git pull origin master
diff --git a/base/.mailrc b/base/.mailrc
new file mode 100644 (file)
index 0000000..2081266
--- /dev/null
@@ -0,0 +1,7 @@
+set append ask
+set indentprefix="> "
+set PAGER=more
+set EDITOR=vim
+set VISUAL=vim
+set folder=Mail
+retain bcc cc date from subject to
index 070ee903245999b2b79f7386631ffd29ce9b8e9f..8106e142dfdc278ff3eaaadd7b362ad7949d4357 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 070ee903245999b2b79f7386631ffd29ce9b8e9f
+Subproject commit 8106e142dfdc278ff3eaaadd7b362ad7949d4357
index 7469238bcfb515655220309c0c3f7c140f56deed..c3cff3fdaed1d4a052f32b22addf6f48a99b4b54 100644 (file)
@@ -6,9 +6,9 @@ source $VIMRUNTIME/defaults.vim
 packadd matchit
 
 set backup
-set backupdir=$HOME/tmp/vim//
+set backupdir=$HOME/var/tmp/vim//
 set undofile
-set undodir=$HOME/tmp/vim//
+set undodir=$HOME/var/tmp/vim//
 
 set autoindent
 set colorcolumn=80
index cd5b9cc9d0e9c31166a96d35759623bda5612baf..36171bfe26cb34209f5d224d3f6685c95c2cdce8 100644 (file)
@@ -39,7 +39,7 @@ volumeicon &
 
 # daemons
 dunst &
-mpc-notify &
+mpc-notify -d &
 xautolock -time 10 -locker "$HOME/bin/l" &
 xbanish &
 eval `ssh-agent`
diff --git a/base/.zprofile b/base/.zprofile
new file mode 100644 (file)
index 0000000..39abb7d
--- /dev/null
@@ -0,0 +1,5 @@
+case "`uname`" in *BSD*)
+       mkdir -m 700 "/tmp/home-$LOGNAME" > /dev/null 2>&1
+       unlink "$HOME/tmp" > /dev/null 2>&1
+       ln -sFh "/tmp/home-$LOGNAME" "$HOME/tmp";;
+esac
index ab47bdf9283f45f46d29738efef2b21c86483cab..3a577ad275c84cd53f41b1e729cc70afbf0798ab 100644 (file)
@@ -5,6 +5,7 @@ export XDG_DATA_HOME=~/share
 export XDG_DATA_DIRS=~/.local/share:/usr/local/share/:/usr/share/
 export XDG_CACHE_HOME=~/tmp
 
+export DVTM_TERM=rxvt-unicode
 export CLICOLOR=
 export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
 export GREP_OPTIONS=--color=auto
index 370b6fe59de7f34a5e9a0beff0bd85cd7e7626e7..ceecca4e3f53808705ed5a4eb0bfb0677923bdc9 100755 (executable)
@@ -1,6 +1,47 @@
 #!/bin/sh
-replaces_id=0
-mpc idleloop player | while read -r x; do
-       #notify-send -u low -t 3000 -a mpc "`mpc current`"
-       replaces_id=$(expr "$(gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify mpc $replaces_id 'audio-volume-high' "`mpc current`" '' '[]' '{"urgency": <byte 0>}' 3000)" : '(uint32 \([0-9]*\),)')
-done
+#TODO: help
+mpc=mpc
+dest=org.freedesktop.Notifications
+opath=/org/freedesktop/Notifications
+meth=$dest.Notify
+idfile=~/tmp/mpc-notify.id
+
+notify() {
+       replaces_id=0
+       if [ -e $idfile ]; then
+               replaces_id=`cat $idfile`
+       fi
+       echo $(expr "$(gdbus call --session \
+       --dest $dest --object-path $opath --method $meth \
+       mpc $replaces_id audio-volume-high "${1:-$out1}" "${2:-$out2}" '[]' \
+       '{"urgency": <byte 0>}' 3000)" : '(uint32 \([0-9]*\),)') > $idfile
+}
+
+getoutput() {
+       #TODO test if not playing for some commands
+       #if mpc -f '' status | awk 'NR==2' | grep -v '^\[playing\]'; then
+       case "$1" in
+               current)
+                       out1=`$mpc -f %artist% current`
+                       out2="`$mpc -f %title% current`\n`mpc -f %album% current`";;
+               status) out1=`$mpc current`
+                       out2=`$mpc -f '%album% (%date%)' status`;;
+               *)       return 1;;
+       esac
+       if [ -z "$out1$out2" ]; then
+               out1='Stopped'
+       fi
+}
+
+cmd=${1:-current}
+case "$cmd" in
+       -d|--daemon|idle|idleloop)
+               cmd=${2:-current}
+               $mpc idleloop player | while read -r x; do
+                       getoutput $cmd
+                       notify "$out1" "$out2"
+               done
+               return;;
+       *)      getoutput $cmd || return 1;;
+esac
+notify "$out1" "$out2"
index ae7c6886c00d93dd1cd3231fae95b2a932e4acde..5f2c3d4f0f2052693555da277d1e3d5ec06784d2 100755 (executable)
@@ -1,28 +1,29 @@
 #!/bin/sh
 
+# test
 if [ 0 -eq 1 ]; then
-       mkdir() { echo "$*"; }
+       mkdir() { echo -- "$*"; }
        alias ln="echo ln"
        alias rm="echo rm"
        alias cap_mkdb="echo cap_mkdb"
        alias unlink="echo unlink"
 fi
 
-#create preferred folder structure
+# create preferred folder structure
 cd ~
 mkdir -p bin etc share .urxvt/ext > /dev/null 2>&1
-mkdir -m 700 tmp tmp/vim > /dev/null 2>&1
+mkdir -m 700 var/tmp var/tmp/vim > /dev/null 2>&1
 cd -
 
-#accomodate linuxisms
+# accomodate multiple userlands
 fex='-perm -ugo=x'
 case "$OSTYPE" in
        # TODO: make links safer for systems without -Fw
        freebsd)        lnargs=-sFhvw;;
        netbsd|openbsd) lnargs=-sfhv;;
        *)              lnargs=-sfnv
-                       #android busybox find doesn't have -executable
-                       #and its sh doesn't set OSTYPE :DD
+                       # android busybox find doesn't have -executable
+                       # and its sh doesn't set OSTYPE :DD
                        if [ -z "$ANDROID_ROOT" ]; then
                                fex=-executable
                        fi;;
@@ -33,6 +34,7 @@ l() {
        [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$x}" "$1"
 }
 
+# link files
 find "$PWD/base" -mindepth 1 -maxdepth 1 | while read -r x; do
        l "$HOME/`basename "$x"`"
 done
@@ -50,10 +52,14 @@ cd ~
 if [ "$OSTYPE" = "freebsd" ]; then
        touch .hushlogin
 
-       #FreeBSD tries `_secure_path' on `.login_conf' before reading the database,
-       #so it needs to be compiled and unlinked for it to actually take effect.
+       # FreeBSD tries `_secure_path' on `.login_conf' before reading the
+       # database, so it needs to be compiled and unlinked for it to actually
+       # take effect.
        rm .login_conf.db
        cap_mkdb .login_conf
+
 fi
 unlink .login_conf
+# run .zprofile to set up tmp
+zsh .zprofile
 cd -
This page took 0.049564 seconds and 4 git commands to generate.