summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.aliases.bashrc2
-rw-r--r--.bashrc1
-rw-r--r--.config/foot/foot.ini4
-rw-r--r--.config/kak/kakrc1
-rw-r--r--.config/sway/config9
-rw-r--r--.ssh/config4
-rwxr-xr-xbin/rupload45
7 files changed, 49 insertions, 17 deletions
diff --git a/.aliases.bashrc b/.aliases.bashrc
index 2fd4c22..023026b 100644
--- a/.aliases.bashrc
+++ b/.aliases.bashrc
@@ -19,3 +19,5 @@ apwd () {
alias mirror='mpv --untimed --profile=low-latency --vf=hflip /dev/video0'
alias gds='git diff --staged'
+
+alias mp='mpv --vid=no'
diff --git a/.bashrc b/.bashrc
index 68db74e..6c89e6f 100644
--- a/.bashrc
+++ b/.bashrc
@@ -34,6 +34,7 @@ PROMPT_COMMAND='history -a; set_title "$(_dirtitle)"'
# environment
export XDG_CONFIG_HOME=$HOME/.config
export EDITOR=kak
+export MPD_HOST=192.168.0.23
# paths
export LUA_PATH_5_3="$HOME/.local/lib/lua/5.3/?.lua;$HOME/.local/share/lua/5.3/?.lua;;"
diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini
index 8d0c0c0..bfe16d9 100644
--- a/.config/foot/foot.ini
+++ b/.config/foot/foot.ini
@@ -165,8 +165,8 @@ bright7=ffffff
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
-show-urls-launch=Control+Shift+u
-show-urls-copy=Control+Shift+o
+show-urls-launch=Mod1+u
+show-urls-copy=Mod1+o
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
diff --git a/.config/kak/kakrc b/.config/kak/kakrc
index fb2baec..22cf734 100644
--- a/.config/kak/kakrc
+++ b/.config/kak/kakrc
@@ -26,3 +26,4 @@ evaluate-commands %sh{
}
+alias global Wq write-quit
diff --git a/.config/sway/config b/.config/sway/config
index 472663f..2ce6169 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -8,14 +8,15 @@ set $right l
set $term foot
set $menu bemenu-run | xargs swaymsg exec --
-# output * bg /home/rebecca/art/img/lagana.png stretch
-# output * bg /home/rebecca/med/misc/computer.png stretch
-output * bg /home/rebecca/med/misc/goo.jpg stretch
+output * bg /home/rebecca/med/misc/man_pogging_at_egg.png stretch
input * {
xkb_layout "gb,gb"
xkb_variant "dvorak,"
xkb_options "grp:shifts_toggle,caps:swapescape,compose:ralt"
+
+ repeat_delay 200
+ repeat_rate 50
}
input type:touchpad {
@@ -152,6 +153,8 @@ bindsym XF86AudioMute exec 'amixer set Master toggle'
bindsym XF86MonBrightnessUp exec 'brightnessctl --min-value=75 s +5%'
bindsym XF86MonBrightnessDown exec 'brightnessctl --min-value=75 s 5%-'
+bindsym $mod+Shift+s sticky toggle
+
client.focused #663399 #663399 #ffffff
bindsym Print exec slurp|grim -g- -|feh - -.wG -A'[upload]/home/rebecca/bin/rupload -x png %F' --action1 '[copy]wl-copy -t image/png <%F'
diff --git a/.ssh/config b/.ssh/config
index 70f066b..4d51158 100644
--- a/.ssh/config
+++ b/.ssh/config
@@ -29,3 +29,7 @@ Host jerver
Host newjerver
HostName 192.168.0.16
+
+Host media
+ Hostname 192.168.0.23
+ User media
diff --git a/bin/rupload b/bin/rupload
index c414b68..74c943c 100755
--- a/bin/rupload
+++ b/bin/rupload
@@ -1,5 +1,9 @@
#!/bin/sh
+REMOTE="do"
+URLBASE="https://ubq323.website/files/"
+REMOTEDIR="/srv/web/ubq/files/"
+
if [ $# -eq 0 ]; then
printf '%s\n' "usage: $0 [-n] [-p] [-x EXT | -r NAME | -R] FILENAME" >&2
printf '\t%s\n' "-n: dry run (don't actually upload anything)" >&2
@@ -13,6 +17,7 @@ fi
dry_run=0
samename=0
printurl=0
+saved_stdin=0
override_rname=
while [ $# -gt 1 ]; do
if [ "$1" = "-x" ]; then
@@ -36,30 +41,43 @@ while [ $# -gt 1 ]; do
fi
done
-if [ ! -f "$1" ]; then
- printf %s "$1: file does not exist" >&2
+target="$1"
+
+if [ "$1" = "-" ]; then
+ tempfile="$(mktemp /tmp/tmp_XXXXXXXXXXX)"
+ # echo yeah "$tempfile"
+ cat >"$tempfile"
+ saved_stdin=1
+ target="$tempfile"
+fi
+
+tidy_tempfile() {
+ if [ "$saved_stdin" -eq 1 ]; then
+ rm "$tempfile"
+ fi
+}
+
+if [ ! -f "$target" ]; then
+ printf "%s: file does not exist\n" "$target" >&2
exit 1
fi
if [ "$samename" -eq 1 ]; then
- override_rname="$(basename "$1")"
+ override_rname="$(basename "$target")"
fi
-REMOTE="do"
-URLBASE="https://ubq323.website/files/"
-REMOTEDIR="/srv/web/ubq/files/"
-ext="${1#*.}"
-if [ "$ext" = "$1" ]; then
+ext="${target#*.}"
+if [ "$ext" = "$target" ]; then
ext='.file'
- bname="$(basename "$1")"
+ bname="$(basename "$target")"
else
ext=".$ext"
- bname="$(basename "$1" "$ext")"
+ bname="$(basename "$target" "$ext")"
fi
ext=${override_ext:-$ext}
-rbname="$(md5sum "$1"|cut -d' ' -f1|tr 'a-z' 'A-Z'|basenc -d --base16|basenc --base64url|head -c8)"
+rbname="$(md5sum "$target"|cut -d' ' -f1|tr 'a-z' 'A-Z'|basenc -d --base16|basenc --base64url|head -c8)"
rname="${override_rname:-$rbname$ext}"
exists_already() {
@@ -75,10 +93,11 @@ done
printf 'uploading to %s\n' "$rname" >&2
if [ "$dry_run" -eq 1 ]; then
echo dryrun, not uploading anything
+ tidy_tempfile
exit 0
fi
-scp -q "$1" "${REMOTE}:$REMOTEDIR$rname"
+scp -q "$target" "${REMOTE}:$REMOTEDIR$rname"
ssh "$REMOTE" chmod a+r "$REMOTEDIR$rname"
url="$URLBASE$rname"
@@ -89,3 +108,5 @@ else
printf '%s\n' "$url"
fi
+tidy_tempfile
+