Compare commits

..

No commits in common. "2a140772258930a729bb05461804723d6073aa53" and "868fbb687b9be7b3107370a3499e30ccc679b7fb" have entirely different histories.

3 changed files with 2 additions and 40 deletions

View File

@ -11,8 +11,7 @@ encrypt () {
x=$(date +%d.%m.%y) x=$(date +%d.%m.%y)
cd "$HOME/.local" cd "$HOME/.local"
tar cv -I"zstd -19 -T0" -f "$HOME/.local/cloud/backup-$x.tar.zst" "backup" tar cv -I"zstd -19 -T0" -f "$HOME/.local/cloud/backup-$x.tar.zst" "backup"
read -p "Enter public key" pubKey gpg -c --no-symkey-cache --cipher-algo AES256 -o "$HOME/.local/cloud/backup-$x.tar.zst.gpg" "$HOME/.local/cloud/backup-$x.tar.zst"
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" shred -uzn3 "$HOME/.local/cloud/backup-$x.tar.zst"
} }

View File

@ -1,37 +0,0 @@
#!/bin/bash
# basic scratchpad functionality for dk
# spawns a set command with a known title if not already open
# if open toggle between the current workspace and the last
# written by Nathaniel Maia - 2021
# example rule for the below script to be placed in your dkrc
# dkcmd rule class="^scratchpad$" float=true
# Dinamically get both class and command of the needed scratchpad
title="$1"
shift
cmd="$@"
# window ID, we need to printf it as 8 hex digits to later match with dk status
win=$(printf '0x%08x' "$(xwininfo -root -children | awk '/'"$title"'/ {print $1}')")
stat=$(dkcmd status num=1 type=full)
if (( win != 0 )); then
# window is already open so toggle it
ws=$(awk '/^workspaces:/ { for (i = 1; i <= NF; i++) { if ($i ~ "*") print i - 1 } }' <<< "$stat")
wins=$(sed -n '/^windows:/,/^$/p' <<< "$stat")
win_ws=$(grep "^\s*${win}" <<< "$wins" | awk -F'" ' '{print $4}' | cut -d' ' -f1)
if (( win_ws == ws )); then
# hide it
# we could create a new workspace and place it there instead to not mess with the users existing workspaces
dkcmd ws send "$win" "$(awk '/numws/{print $2}' <<< "$stat")"
else
# show it
dkcmd ws send "$win" "$ws"
fi
else
# the window is not yet spawned so do so
${cmd} &>/dev/null & disown
fi

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
/usr/bin/paccache -ruk0 /usr/bin/paccache -ruk1
/usr/bin/paccache -rk2 /usr/bin/paccache -rk2