aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-12-08 09:43:44 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-12-08 09:43:44 -0700
commitbc06b8ae7e83c2901dff2bc7a2947b3e870be168 (patch)
treee9fc5116b42e7f8672c90a4baf2312562ad80ced /.config/init
parent965f07eb383810da6c2233d324d427eb147e40f4 (diff)
downloaddotfiles-bc06b8ae7e83c2901dff2bc7a2947b3e870be168.tar.gz
use tmpdir in vars
Diffstat (limited to '.config/init')
-rwxr-xr-x.config/init/funcs/scap8
-rwxr-xr-x.config/init/funcs/ssh-scrot11
-rw-r--r--.config/init/gen/bg-saved.sh2
-rw-r--r--.config/init/gen/x-theme.sh2
-rw-r--r--.config/init/gen/zathurarc.sh2
-rw-r--r--.config/init/vars9
6 files changed, 21 insertions, 13 deletions
diff --git a/.config/init/funcs/scap b/.config/init/funcs/scap
index f87eb93..94c39f7 100755
--- a/.config/init/funcs/scap
+++ b/.config/init/funcs/scap
@@ -1,18 +1,20 @@
#!/usr/bin/env zsh
# capture webm
+source $HOME/.config/init/vars
+
xset q
[[ $? -ne 0 ]] && return 1
archey3
sleep .2
-if [[ -e '/tmp/cap.mp4' ]]; then
- rm '/tmp/cap.mp4' || return 1
+if [[ -e "$tmpdir/cap.mp4" ]]; then
+ rm "$tmpdir/cap.mp4" || return 1
fi
echo 'recording...'
ffmpeg -v panic -video_size 1920x1080 -framerate 20 -f x11grab -i :0.0 \
-f pulse -ac 2 -i default -af aresample=async=1 \
- -c:v libx264 -q 0 -preset ultrafast '/tmp/cap.mp4'
+ -c:v libx264 -q 0 -preset ultrafast "$tmpdir/cap.mp4"
diff --git a/.config/init/funcs/ssh-scrot b/.config/init/funcs/ssh-scrot
index 8fa243c..e5a3a36 100755
--- a/.config/init/funcs/ssh-scrot
+++ b/.config/init/funcs/ssh-scrot
@@ -1,5 +1,8 @@
#!/usr/bin/env zsh
# take a screenshot, upload to /img/scrot, and update current symlink
+#
+
+source $HOME/.config/init/vars
archey3
@@ -30,10 +33,10 @@ done
echo 'cheese!'
sleep .1
-scrot /tmp/$name.png
-convert -scale 250x /tmp/$name.png /tmp/${name}_small.png
+scrot $tmpdir/$name.png
+convert -scale 250x $tmpdir/$name.png $tmpdir/${name}_small.png
-scp /tmp/$name.png /tmp/${name}_small.png airen-no-jikken.icu:http/img/scrot/$date
+scp $tmpdir/$name.png $tmpdir/${name}_small.png airen-no-jikken.icu:http/img/scrot/$date
echo "https://airen-no-jikken.icu/img/scrot/$date/$name.png" | tr -d '\n' | xclip -i -selection clipboard
echo "https://airen-no-jikken.icu/img/scrot/$date/$name.png" | tr -d '\n' | xclip -i -selection primary
@@ -42,4 +45,4 @@ echo "https://airen-no-jikken.icu/img/scrot/$date/${name}_small.png" | tr -d '\n
echo 'sent!'
-rm /tmp/$name.png /tmp/${name}_small.png
+rm $tmpdir/$name.png $tmpdir/${name}_small.png
diff --git a/.config/init/gen/bg-saved.sh b/.config/init/gen/bg-saved.sh
index 5a6c8e9..eb7e3b1 100644
--- a/.config/init/gen/bg-saved.sh
+++ b/.config/init/gen/bg-saved.sh
@@ -2,4 +2,4 @@ echo "\
[xin_-1]
file=$HOME/backdrops/shadowed/$wallpaper
mode=0
-bgcolor=#000000" > /tmp/bg-saved.cfg
+bgcolor=#000000" > $tmpdir/bg-saved.cfg
diff --git a/.config/init/gen/x-theme.sh b/.config/init/gen/x-theme.sh
index 374f9a2..26505e5 100644
--- a/.config/init/gen/x-theme.sh
+++ b/.config/init/gen/x-theme.sh
@@ -58,5 +58,5 @@ echo "xft:${bkfont}:size=${bkfont_size}"
echo -n "Sxiv.font: xft:${mfont}:size=${mfont_size}"
-} > /tmp/x-theme
+} > $tmpdir/x-theme
diff --git a/.config/init/gen/zathurarc.sh b/.config/init/gen/zathurarc.sh
index 387b1e3..f1b7e8b 100644
--- a/.config/init/gen/zathurarc.sh
+++ b/.config/init/gen/zathurarc.sh
@@ -26,4 +26,4 @@ for i in ${focus[@]}; do
echo "set $i-bg \"$bg_focus\""
done
-} > /tmp/zathurarc
+} > $tmpdir/zathurarc
diff --git a/.config/init/vars b/.config/init/vars
index 7215db8..8a4356e 100644
--- a/.config/init/vars
+++ b/.config/init/vars
@@ -321,11 +321,11 @@ wallpaper='kuro.jpg'
std_black='#100e10'
std_red='#9e3e00'
-std_green='#248753'
+std_green='#2c945d'
std_yellow='#b28158'
std_blue='#405c90'
std_magenta='#763d3f'
-std_cyan='#52aea0'
+std_cyan='#4b9f92'
std_white='#d7dbda'
light_black='#2f2c2f'
@@ -334,7 +334,7 @@ light_green='#569822'
light_yellow='#dbb460'
light_blue='#558b9f'
light_magenta='#b04857'
-light_cyan='#52e1db'
+light_cyan='#49c8c2'
light_white='#f3fdf4'
bg_normal="$std_black"
@@ -412,6 +412,9 @@ tablet_mode=""
kbrate=25
kbdelay=300
+# where should temporary files be stored?
+tmpdir="/tmp"
+
# use overrides, if any
if [ -f ~/.config/init/voverride ]; then
source ~/.config/init/voverride