Compare commits
No commits in common. "829052147b56e9f84860442cd36ce7158d77e5f8" and "771d23fe76122647b75736e5f4fa2cf22b1cf7ba" have entirely different histories.
829052147b
...
771d23fe76
22
backuper
22
backuper
@ -1,19 +1,21 @@
|
||||
#!/bin/env bash
|
||||
|
||||
copy () {
|
||||
while read -r Line; do
|
||||
echo "Syncing $(basename "$Line")"
|
||||
rsync -ahAX -v --delete "$Line" "$HOME"/.local/backup
|
||||
done <<< "$(cat "$HOME"/.config/rsync/sync-list)"
|
||||
while read 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" || 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"
|
||||
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"
|
||||
}
|
||||
|
||||
[ -z "$*" ] && exit 1
|
||||
[ "$1" = "copy" ] && copy && exit 0
|
||||
[ "$1" = "encrypt" ] && encrypt && exit 0
|
||||
[ -z "$@" ] && exit 1
|
||||
[ "$1" = "copy" ] && copy
|
||||
[ "$1" = "encrypt" ] && encrypt
|
||||
|
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 'AT Translated Set 2 keyboard' | cut -d '=' -f 2 | awk '{ print $1 }')
|
||||
ids=$(xinput | grep "SEMICO USB Keyboard" | grep "keyboard" | cut -d '=' -f 2 | cut -f 1)
|
||||
|
||||
for id in $ids; do
|
||||
setxkbmap -device "$id" -layout hr -option caps:escape
|
||||
setxkbmap -device $id -layout us -option caps:escape
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
id=$(xinput list --id-only 'pointer:Logitech G305')
|
||||
id=$(xinput list --id-only 'MOSART Semi. 2.4G INPUT DEVICE Mouse')
|
||||
|
||||
xinput --set-prop "$id" 'libinput Accel Speed' 0
|
||||
xinput --set-prop "$id" 'libinput Accel Profile Enabled' 0, 1
|
||||
xinput --set-prop $id 'libinput Accel Speed' -0.5
|
||||
xinput --set-prop $id 'libinput Accel Profile Enabled' 0, 1
|
||||
|
15
mprofile
15
mprofile
@ -1,15 +0,0 @@
|
||||
#!/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
|
@ -1,9 +0,0 @@
|
||||
#!/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