Compare commits
6 Commits
771d23fe76
...
829052147b
Author | SHA1 | Date | |
---|---|---|---|
829052147b | |||
024b5696ab | |||
dd9ff5bc26 | |||
100b453c05 | |||
bb0e48b95e | |||
6a9a9dd8d4 |
22
backuper
22
backuper
@ -1,21 +1,19 @@
|
||||
#!/bin/env bash
|
||||
|
||||
copy () {
|
||||
while read Line; do
|
||||
echo "Syncing $(basename $Line)"
|
||||
rsync -ahAX -v --delete "$Line" $HOME/.local/backup
|
||||
done <<< "$(cat $HOME/.config/rsync/sync-list)"
|
||||
while read -r Line; do
|
||||
echo "Syncing $(basename "$Line")"
|
||||
rsync -ahAX -v --delete "$Line" "$HOME"/.local/backup
|
||||
done <<< "$(cat "$HOME"/.config/rsync/sync-list)"
|
||||
}
|
||||
|
||||
encrypt () {
|
||||
x=$(date +%d.%m.%y)
|
||||
cd "$HOME/.local"
|
||||
tar cv -I"zstd -19 -T0" -f "$HOME/.local/cloud/backup-$x.tar.zst" "backup"
|
||||
read -p "Enter public key" pubKey
|
||||
age -r $pubKey "$HOME/.local/cloud/backup-$x.tar.zst" > "$HOME/.local/cloud/backup-$x.tar.zst.age"
|
||||
shred -uzn3 "$HOME/.local/cloud/backup-$x.tar.zst"
|
||||
cd "$HOME/.local" || exit 1
|
||||
[ ! -d "$HOME/.local/cloud" ] || mkdir -p "$HOME/.local/cloud"
|
||||
tar cv -I"zstd -19 -T0" "backup" | age -r "age1chj26ez7ucr2smkr8sfc9ddaa0fcyfljh5f5uk5kuyd8ctahs9wslfs708" > "$HOME/.local/cloud/backup-$x.tar.zst.age"
|
||||
}
|
||||
|
||||
[ -z "$@" ] && exit 1
|
||||
[ "$1" = "copy" ] && copy
|
||||
[ "$1" = "encrypt" ] && encrypt
|
||||
[ -z "$*" ] && exit 1
|
||||
[ "$1" = "copy" ] && copy && exit 0
|
||||
[ "$1" = "encrypt" ] && encrypt && exit 0
|
||||
|
10
gaming-time
10
gaming-time
@ -37,19 +37,19 @@ x11_on () {
|
||||
xrandr --output eDP --set TearFree off
|
||||
}
|
||||
|
||||
if [ -f $HOME/.cache/gaming.lock ]; then
|
||||
[ $XDG_SESSION_TYPE = "wayland" ] && wayland_off || x11_off
|
||||
if [ -f "$HOME"/.cache/gaming.lock ]; then
|
||||
[ "$XDG_SESSION_TYPE" = "wayland" ] && wayland_off || x11_off
|
||||
start-program transmission-daemon
|
||||
start-program syncthing
|
||||
nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=2'
|
||||
rm $HOME/.cache/gaming.lock
|
||||
rm "$HOME"/.cache/gaming.lock
|
||||
quick-notify "Gaming Time" "OFF"
|
||||
else
|
||||
[ $XDG_SESSION_TYPE = "wayland" ] && wayland_on || x11_on
|
||||
[ "$XDG_SESSION_TYPE" = "wayland" ] && wayland_on || x11_on
|
||||
transmission-remote --exit
|
||||
syncthing cli operations shutdown
|
||||
kill-nicely ferdium
|
||||
nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'
|
||||
touch $HOME/.cache/gaming.lock
|
||||
touch "$HOME"/.cache/gaming.lock
|
||||
quick-notify "Gaming Time" "ON"
|
||||
fi
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
# Because of my regular non american laptop onboard keyboard layout and american externals one this is my hack to use both for dedicated device.
|
||||
|
||||
ids=$(xinput | grep "SEMICO USB Keyboard" | grep "keyboard" | cut -d '=' -f 2 | cut -f 1)
|
||||
ids=$(xinput | grep 'AT Translated Set 2 keyboard' | cut -d '=' -f 2 | awk '{ print $1 }')
|
||||
|
||||
for id in $ids; do
|
||||
setxkbmap -device $id -layout us -option caps:escape
|
||||
setxkbmap -device "$id" -layout hr -option caps:escape
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
id=$(xinput list --id-only 'MOSART Semi. 2.4G INPUT DEVICE Mouse')
|
||||
id=$(xinput list --id-only 'pointer:Logitech G305')
|
||||
|
||||
xinput --set-prop $id 'libinput Accel Speed' -0.5
|
||||
xinput --set-prop $id 'libinput Accel Profile Enabled' 0, 1
|
||||
xinput --set-prop "$id" 'libinput Accel Speed' 0
|
||||
xinput --set-prop "$id" 'libinput Accel Profile Enabled' 0, 1
|
||||
|
15
mprofile
Executable file
15
mprofile
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
profiles=$(find "$HOME"/.config/mblaze -type f -exec basename "{}" \;)
|
||||
currentMaildir=$(grep "^Maildir:" "$HOME"/.mblaze/profile | cut -d: -f 2 | sed 's/ //g')
|
||||
|
||||
[ -z "$1" ] && basename "$(grep -w "$currentMaildir" -l -R "$HOME"/.config/mblaze)" && exit 0
|
||||
[ "$1" = "-l" ] && printf '%s\n' "$profiles" && exit 0
|
||||
|
||||
profile="$1"
|
||||
|
||||
if printf '%s\n' "$profiles" | grep -qw "$profile"; then
|
||||
cp "$HOME"/.config/mblaze/"$profile" "$HOME"/.mblaze/profile
|
||||
else
|
||||
printf '%s\n' "This profile doesn't exist"
|
||||
fi
|
9
rand-game
Executable file
9
rand-game
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
random=$(jq 'select(.hidden != true) | select(.removed != true) | select(.name | contains("Proton") | not) | select(.name | contains("Steam") | not) | input_filename' -r "$HOME"/.local/share/cartridges/games/*.json | sort -R | head -n 1)
|
||||
name=$(jq '.name' -r "$random")
|
||||
exec=$(jq '.executable | if type == "array" then .[] end' -r "$random")
|
||||
|
||||
answer=$(printf "yes\nno" | dmenu -p "Want to play $name?")
|
||||
|
||||
[ "$answer" = "yes" ] && eval "$exec" || exit
|
Loading…
Reference in New Issue
Block a user