aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2017-03-01 00:54:06 -0700
committerkatherine <shmibs@shmibbles.me>2017-03-01 00:54:06 -0700
commit5aba9de367932be46aa471c71076d9e623d5abce (patch)
treef4284a126603af874de9731b357041df1f2fd1d0
parentce4b99960f11ee9371ea4468247643d42ac05f9b (diff)
downloaddotfiles-5aba9de367932be46aa471c71076d9e623d5abce.tar.gz
snapshot
various smöl changes
-rwxr-xr-x.config/herbstluftwm/autostart40
-rwxr-xr-x.config/herbstluftwm/mpc-status.sh9
-rw-r--r--.config/init/funcreqs/gifo2
-rwxr-xr-x.config/init/funcs/gifo21
-rwxr-xr-x.config/init/funcs/make-gif40
-rw-r--r--.config/init/gen/urxvt-theme.sh4
-rw-r--r--.config/init/vars10
-rw-r--r--.config/ranger/rc.conf2
-rw-r--r--.xinitrc9
9 files changed, 88 insertions, 49 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
index 1432460..a2ad57d 100755
--- a/.config/herbstluftwm/autostart
+++ b/.config/herbstluftwm/autostart
@@ -126,27 +126,27 @@ hc keybind Mod1-XF86PowerOff spawn mate-session-save --shutdown-dialog
hc keybind Print spawn mate-screenshot
# ranger
-hc keybind Mod4-Shift-Control-Return spawn urxvtc -name "ranger" -e ranger ~
-hc keybind Mod4-Shift-Control-b spawn urxvtc -name "ranger" -e ranger ~/documents/books
-hc keybind Mod4-Shift-Control-c spawn urxvtc -name "ranger" -e ranger ~/documents/comics
-hc keybind Mod4-Shift-Control-d spawn urxvtc -name "ranger" -e ranger ~/downloads
-hc keybind Mod4-Shift-Control-g spawn urxvtc -name "ranger" -e ranger ~/games
-hc keybind Mod4-Shift-Control-i spawn urxvtc -name "ranger" -e ranger ~/images
-hc keybind Mod4-Shift-Control-m spawn urxvtc -name "ranger" -e ranger ~/music
-hc keybind Mod4-Shift-Control-n spawn urxvtc -name "ranger" -e ranger ~/documents/manga
-hc keybind Mod4-Shift-Control-p spawn urxvtc -name "ranger" -e ranger ~/projects
-hc keybind Mod4-Shift-Control-s spawn urxvtc -name "ranger" -e ranger ~/desktop
-hc keybind Mod4-Shift-Control-r spawn urxvtc -name "ranger" -e ranger ~/romz
-hc keybind Mod4-Shift-Control-t spawn urxvtc -name "ranger" -e ranger ~/thcool
-hc keybind Mod4-Shift-Control-v spawn urxvtc -name "ranger" -e ranger ~/videos
-hc keybind Mod4-Shift-Control-w spawn urxvtc -name "ranger" -e ranger ~/documents/writing
+hc keybind Mod4-Shift-Control-Return spawn urxvt -name "ranger" -e ranger ~
+hc keybind Mod4-Shift-Control-b spawn urxvt -name "ranger" -e ranger ~/documents/books
+hc keybind Mod4-Shift-Control-c spawn urxvt -name "ranger" -e ranger ~/documents/comics
+hc keybind Mod4-Shift-Control-d spawn urxvt -name "ranger" -e ranger ~/downloads
+hc keybind Mod4-Shift-Control-g spawn urxvt -name "ranger" -e ranger ~/games
+hc keybind Mod4-Shift-Control-i spawn urxvt -name "ranger" -e ranger ~/images
+hc keybind Mod4-Shift-Control-m spawn urxvt -name "ranger" -e ranger ~/music
+hc keybind Mod4-Shift-Control-n spawn urxvt -name "ranger" -e ranger ~/documents/manga
+hc keybind Mod4-Shift-Control-p spawn urxvt -name "ranger" -e ranger ~/projects
+hc keybind Mod4-Shift-Control-s spawn urxvt -name "ranger" -e ranger ~/desktop
+hc keybind Mod4-Shift-Control-r spawn urxvt -name "ranger" -e ranger ~/romz
+hc keybind Mod4-Shift-Control-t spawn urxvt -name "ranger" -e ranger ~/thcool
+hc keybind Mod4-Shift-Control-v spawn urxvt -name "ranger" -e ranger ~/videos
+hc keybind Mod4-Shift-Control-w spawn urxvt -name "ranger" -e ranger ~/documents/writing
# grab colour to clipboard
hc keybind Mod4-c spawn ~/.config/herbstluftwm/colourgrab.sh
-hc keybind Mod4-Shift-n spawn urxvtc -name "notes" -e $EDITOR ~/notes
+hc keybind Mod4-Shift-n spawn urxvt -name "notes" -e $EDITOR ~/notes
# spawn
-hc keybind Mod4-Return spawn urxvtc
+hc keybind Mod4-Return spawn urxvt
hc keybind Mod4-Shift-b spawn primusrun VBoxSDL --startvm arch
hc keybind Mod4-Shift-c spawn cvlc v4l2://
hc keybind Mod4-Shift-d spawn ~/games/desura/desura
@@ -155,10 +155,10 @@ hc keybind Mod4-Shift-g spawn gwaei
hc keybind Mod4-Shift-i spawn gimp
hc keybind Mod4-Shift-m spawn mathematica
hc keybind Mod4-Shift-o spawn ~/stuffs/tor/start-tor-browser
-hc keybind Mod4-Shift-p spawn urxvtc -e pms
+hc keybind Mod4-Shift-p spawn urxvt -e pms
hc keybind Mod4-Shift-t spawn transmission-gtk
-hc keybind Mod4-Shift-v spawn urxvtc -name "$EDITOR" -e $EDITOR
-hc keybind Mod4-Shift-w spawn urxvtc -name "weechat" -e weechat
+hc keybind Mod4-Shift-v spawn urxvt -name "$EDITOR" -e $EDITOR
+hc keybind Mod4-Shift-w spawn urxvt -name "weechat" -e weechat
# dmenu
hc keybind Mod4-0 spawn dmenu_run -fn "${bfont}:size=${bfont_size}" \
@@ -214,6 +214,6 @@ pkill dunst
dunst -lb $bg_normal -nb $bg_normal -cb $bg_focus \
-lf $fg_normal -nf $fg_normal -cf $fg_focus \
-frame_color $bg_focus -geom "0x3-4+$(($bheight + 4))" \
- -fn "$mfont $mfont_size,$jfont $jfont_size, $bkfont $bkfont_size" \
+ -fn "$mfont $mfont_size,$jfont $jfont_size,$cfont $cfont_size,$efont $efont_size,$bkfont $bkfont_size" \
-max_icon_size 0
diff --git a/.config/herbstluftwm/mpc-status.sh b/.config/herbstluftwm/mpc-status.sh
index 1c44eee..a9a1fd9 100755
--- a/.config/herbstluftwm/mpc-status.sh
+++ b/.config/herbstluftwm/mpc-status.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+# i patched dunst to clear all on SIGUSR1
+killall -SIGUSR1 dunst
+# race condition, obvs, but this should be plenty time
+
case "$1" in
next)
mpc next
@@ -13,13 +17,11 @@ esac
mpc status >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
- killall -SIGUSR1 dunst
notify-send "mpd disconnected"
exit
fi
if [[ -z "$(mpc status | grep -E '\[(playing|paused)\]')" ]]; then
- killall -SIGUSR1 dunst
notify-send "mpd stopped"
exit
fi
@@ -34,7 +36,4 @@ 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/init/funcreqs/gifo b/.config/init/funcreqs/gifo
new file mode 100644
index 0000000..6724e30
--- /dev/null
+++ b/.config/init/funcreqs/gifo
@@ -0,0 +1,2 @@
+func_init_prereqs=(gifsicle du cut tr)
+func_init_checks=()
diff --git a/.config/init/funcs/gifo b/.config/init/funcs/gifo
new file mode 100755
index 0000000..854b45a
--- /dev/null
+++ b/.config/init/funcs/gifo
@@ -0,0 +1,21 @@
+#!/usr/bin/env zsh
+# optimise gifs with gifsicle
+
+local before
+local after
+local ofile
+
+for i in $@; do
+ if [[ -f "$i" ]]; then
+ ofile="$i.out"
+ while [[ -f "$ofile" ]]; do
+ ofile="$ofile.out"
+ done
+ du -h "$i" | cut -f 1 | read before
+ echo "$i..."
+ gifsicle --no-ignore-errors -w -O3 "$i" -o "$i.out"
+ [[ -f "$ofile" ]] && rm "$i" && mv "$ofile" "$i" && \
+ du -h "$i" | cut -f 1 | read after && \
+ echo " $before -> $after" || echo " failed"
+ fi
+done
diff --git a/.config/init/funcs/make-gif b/.config/init/funcs/make-gif
index 3221e97..e100650 100755
--- a/.config/init/funcs/make-gif
+++ b/.config/init/funcs/make-gif
@@ -10,9 +10,9 @@ usage() {
echo ""
echo " description option default val"
echo " start time -s <time> 00:00:00"
- echo " length in seconds -t <int> full length"
- echo " gif fps -f <int> 10"
- echo " gif pixel width -w <int> 480"
+ echo " length in seconds -t <num> full length"
+ echo " gif fps -f <num> 10"
+ echo " gif pixel width -w <num> 480"
echo " use subtitles -b"
echo " use subtitle track -n <int> 0"
[[ $hasgsic ]] && echo "optimise with gifsicle -g"
@@ -28,8 +28,10 @@ local subs=""
local strack=0
local gsic=""
-local timepat='^(([0-9][0-9]:){1,2}[0-9][0-9]|[0-9]+)$'
-local intpat='^[0-9]+$'
+local timepat='^(([0-9][0-9]:){1,2}[0-9][0-9]|[0-9]+)(\.[0-9]+){0,1}$'
+local numpat='^[1-9][0-9]*(\.[0-9]+){0,1}$'
+local intpat='^[1-9][0-9]*$'
+local zintpat='^[0-9]+$'
# tmp var used to old '-t' if length is used
local t=""
@@ -44,25 +46,25 @@ if [[ $hasgsic ]]; then
start="$OPTARG"
;;
t)
- [[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "length must be an integer"
+ [[ ! $(echo $OPTARG | grep -oE "$numpat") ]] \
+ && usage "length must be a positive rational number"
length=$OPTARG
t="-t"
;;
f)
- [[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "start time must be an integer"
+ [[ ! $(echo $OPTARG | grep -oE "$numpat") ]] \
+ && usage "fps must be a positive rational number"
fps=$OPTARG
;;
w)
[[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "fps must be an integer"
+ && usage "width must be a positive integer"
width=$OPTARG
;;
b) subs=true ;;
n)
- [[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "sub track specifier must be an integer"
+ [[ ! $(echo $OPTARG | grep -oE "$zintpat") ]] \
+ && usage "sub track index must be a non-negative integer"
strack=$OPTARG
;;
g) gsic=true ;;
@@ -79,25 +81,25 @@ else
start="$OPTARG"
;;
t)
- [[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "length must be an integer"
+ [[ ! $(echo $OPTARG | grep -oE "$numpat") ]] \
+ && usage "length must be a positive rational number"
length=$OPTARG
t="-t"
;;
f)
- [[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "start time must be an integer"
+ [[ ! $(echo $OPTARG | grep -oE "$numpat") ]] \
+ && usage "fps must be a positive rational number"
fps=$OPTARG
;;
w)
[[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "fps must be an integer"
+ && usage "width must be a positive integer"
width=$OPTARG
;;
b) subs=true ;;
n)
- [[ ! $(echo $OPTARG | grep -oE "$intpat") ]] \
- && usage "sub track specifier must be an integer"
+ [[ ! $(echo $OPTARG | grep -oE "$zintpat") ]] \
+ && usage "sub track index must be a non-negative integer"
strack=$OPTARG
;;
h) usage ;;
diff --git a/.config/init/gen/urxvt-theme.sh b/.config/init/gen/urxvt-theme.sh
index 40e986b..97f7951 100644
--- a/.config/init/gen/urxvt-theme.sh
+++ b/.config/init/gen/urxvt-theme.sh
@@ -44,9 +44,9 @@ URxvt*color15: $light_white
echo -n "URxvt*font: "
echo -n "xft:${mfont}:size=${mfont_size}, "
echo -n "xft:${jfont}:size=${jfont_size}, "
+echo -n "xft:${cfont}:size=${cfont_size}, "
+echo -n "xft:${efont}:size=${efont_size}, "
echo "xft:${bkfont}:size=${bkfont_size}"
} > /tmp/urxvt-theme
-xrdb -merge /tmp/urxvt-theme
-
diff --git a/.config/init/vars b/.config/init/vars
index af1a09c..23b2153 100644
--- a/.config/init/vars
+++ b/.config/init/vars
@@ -243,6 +243,16 @@ jfont='Noto Sans Mono CJK JP Regular'
jfont_size='9'
jfont_off='-1'
+# c font
+cfont='Noto Sans Mono CJK SC Regular'
+cfont_size='9'
+cfont_off='-1'
+
+# emoji font
+efont='Noto Emoji'
+efont_size='9'
+efont_off='-1'
+
# backup font
bkfont='Dejavu Sans Mono'
bkfont_size='9'
diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf
index 25ac810..9101f1e 100644
--- a/.config/ranger/rc.conf
+++ b/.config/ranger/rc.conf
@@ -395,7 +395,7 @@ map cm search_next order=mtime
map ca search_next order=atime
# Tabs
-map <C-t> tab_new
+map <C-t> tab_new ~
map <C-n> tab_move 1
map <C-p> tab_move -1
map <C-w> tab_close
diff --git a/.xinitrc b/.xinitrc
index 9a1c860..b8a735a 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -4,7 +4,13 @@
#merge Xresources
if [ -s ~/.Xresources ]
then
- xrdb -merge ~/.Xresources
+ xrdb -override ~/.Xresources
+fi
+
+#merge Xresources
+if [ -s /tmp/urxvt-theme ]
+then
+ xrdb -override /tmp/urxvt-theme
fi
#add compose key
@@ -42,7 +48,6 @@ xset -dpms
xset s off
#daemons
-urxvtd &
compton -b --backend glx --vsync opengl
#QT style mimic gtk