Compare commits
No commits in common. "f17dd5aad28bbd0283cf53a7e90754881afe9853" and "9bc42d3c4d92ee80af622e88e06681a81991a1d8" have entirely different histories.
f17dd5aad2
...
9bc42d3c4d
8 changed files with 100 additions and 14 deletions
5
bin/deezer
Executable file
5
bin/deezer
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
exec xargs /usr/bin/deezer \
|
||||
"$@" \
|
||||
< ~/.config/electron13-flags.conf
|
||||
|
1
bin/freetube
Symbolic link
1
bin/freetube
Symbolic link
|
@ -0,0 +1 @@
|
|||
waylectron
|
1
bin/heroic
Symbolic link
1
bin/heroic
Symbolic link
|
@ -0,0 +1 @@
|
|||
waylectron
|
15
bin/instvnc
Executable file
15
bin/instvnc
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
display="$(grep "$LOGNAME" /etc/tigervnc/vncserver.users | head -n 1 | awk -F '=' '{ print $1 }')"
|
||||
echo "Using display: $display"
|
||||
test -n "$display"
|
||||
|
||||
set -x
|
||||
cd
|
||||
exec \
|
||||
screen \
|
||||
-d \
|
||||
-m \
|
||||
vncserver \
|
||||
"$display"
|
||||
|
14
bin/iwqr
14
bin/iwqr
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ "$(whoami)" != root ]; then
|
||||
exec sudo "$0" "$@"
|
||||
fi
|
||||
|
||||
cd /var/lib/iwd
|
||||
|
||||
field='Connected network'
|
||||
ssid=$(iwctl station wlan show | grep '^\s*'"${field}"'\s' | xargs | sed "s/^${field} //")
|
||||
unset field
|
||||
passphrase=$(awk -F = '($1 == "'"${1}"'") { print $2 }' "${ssid}.psk")
|
||||
|
||||
qrencode -s 1 -l H -o - "WIFI:T:WPA;S:${ssid};P:${passphrase};;" | catimg -H 0 -
|
8
bin/makeprio
Executable file
8
bin/makeprio
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
pid="$(pidof "$1")"
|
||||
shift
|
||||
prio="${1:--22}"
|
||||
|
||||
sudo renice "$prio" "$pid"
|
||||
|
53
bin/miam
Executable file
53
bin/miam
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Functions
|
||||
# Throw
|
||||
function throw {
|
||||
>&2 echo "$1"
|
||||
exit "$2"
|
||||
}
|
||||
|
||||
# Throw a value
|
||||
function throw-value {
|
||||
throw "Invalid value for \"$1\": \"$2\"" "$3"
|
||||
}
|
||||
|
||||
# Variables
|
||||
selection_mode="$1"
|
||||
saving_mode="$2"
|
||||
screenshot_d="/tmp"
|
||||
_command=()
|
||||
|
||||
# Command building
|
||||
_command+=("maim")
|
||||
case "$selection_mode" in
|
||||
"full")
|
||||
:
|
||||
;;
|
||||
"area")
|
||||
_command+=("-s")
|
||||
;;
|
||||
*)
|
||||
throw-value "selection mode" "$selection_mode" 1
|
||||
;;
|
||||
esac
|
||||
case "$saving_mode" in
|
||||
"clip")
|
||||
_command+=("|")
|
||||
_command+=("xclip" "-selection" "clipboard" "-t" "image/png")
|
||||
;;
|
||||
"file")
|
||||
_command+=(">" "${screenshot_d}/$(printf '%s-screenshot-%s.png' "$LOGNAME" "$(date +'%Y_%m_%d_%s')")")
|
||||
;;
|
||||
*)
|
||||
throw-value "saving mode" "$saving_mode" 2
|
||||
;;
|
||||
esac
|
||||
|
||||
# Debug
|
||||
#echo "${_command[@]}"
|
||||
#exit 0
|
||||
|
||||
# Execution
|
||||
"${_command[@]}"
|
||||
|
17
bin/qrconn
Executable file
17
bin/qrconn
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ "$(whoami)" != root ]; then
|
||||
exec sudo "$0" "$@"
|
||||
fi
|
||||
|
||||
cd "/var/lib/connman/$(connmanctl services | head -n 1 | awk '{ print $NF }')"
|
||||
|
||||
get_var() {
|
||||
awk -F = '($1 == "'"${1}"'") { print $2 }' settings
|
||||
}
|
||||
|
||||
ssid="$(get_var Name)"
|
||||
psk="$(get_var Passphrase)"
|
||||
|
||||
qrencode -s 1 -l H -o - "WIFI:T:WPA;S:${ssid};P:${psk};;" | catimg -H 0 -
|
||||
|
Loading…
Reference in a new issue