Script changes!
This commit is contained in:
parent
45e32adc61
commit
6b13214c4d
|
@ -3,6 +3,7 @@
|
||||||
# Remove SSH and GPG keys from keystores
|
# Remove SSH and GPG keys from keystores
|
||||||
ssh-add -D
|
ssh-add -D
|
||||||
echo RELOADAGENT | gpg-connect-agent
|
echo RELOADAGENT | gpg-connect-agent
|
||||||
|
rm -rf "/tmp/cached_pass_$UID"
|
||||||
|
|
||||||
|
|
||||||
dm-tool lock
|
dm-tool lock
|
||||||
|
|
29
config/scripts/cached_pass
Executable file
29
config/scripts/cached_pass
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# TODO Password changed?
|
||||||
|
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [[ $# -ne 1 ]]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 pass-name"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
name="$1"
|
||||||
|
|
||||||
|
BASEDIR="/tmp/cached_pass_${UID}"
|
||||||
|
mkdir -p "$BASEDIR"
|
||||||
|
chmod 700 "$BASEDIR"
|
||||||
|
|
||||||
|
name_base64="$(echo "$name" | base64)"
|
||||||
|
file="${BASEDIR}/${name_base64}"
|
||||||
|
|
||||||
|
if [ ! -f "${file}" ]
|
||||||
|
then
|
||||||
|
pass="$(pass ${name} | head -1)"
|
||||||
|
echo -n $pass > "${file}"
|
||||||
|
notify-send -u low "cached_pass" "Cached: ${name}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat "${file}"
|
|
@ -5,4 +5,4 @@
|
||||||
cd ~/.dotfiles/config/automatrop
|
cd ~/.dotfiles/config/automatrop
|
||||||
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||||
xrandr --output HDMI-0 --brightness 1
|
xrandr --output HDMI-0 --brightness 1
|
||||||
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --connection local
|
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --connection local --limit $HOSTNAME
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
cd ~/.dotfiles/config/automatrop
|
cd ~/.dotfiles/config/automatrop
|
||||||
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||||
xrandr --output HDMI-0 --brightness 1
|
xrandr --output HDMI-0 --brightness 1
|
||||||
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-light --tags color --connection local
|
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-light --tags color --connection local --limit $HOSTNAME
|
||||||
|
|
28
config/scripts/lestrte
Executable file
28
config/scripts/lestrte
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import random
|
||||||
|
|
||||||
|
# maj = True
|
||||||
|
|
||||||
|
for line in sys.stdin:
|
||||||
|
nl = ""
|
||||||
|
word = ""
|
||||||
|
grace = True
|
||||||
|
for c in line:
|
||||||
|
if c.isalpha():
|
||||||
|
if grace:
|
||||||
|
nl += word
|
||||||
|
nl += c
|
||||||
|
word = ""
|
||||||
|
grace = False
|
||||||
|
else:
|
||||||
|
word += c
|
||||||
|
else:
|
||||||
|
wrd = list(word)
|
||||||
|
random.shuffle(wrd)
|
||||||
|
nl += ''.join(wrd)
|
||||||
|
nl += c
|
||||||
|
word = ""
|
||||||
|
grace = True
|
||||||
|
print(nl, end="")
|
|
@ -5,4 +5,4 @@
|
||||||
cd ~/.dotfiles/config/automatrop
|
cd ~/.dotfiles/config/automatrop
|
||||||
echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||||
xrandr --output HDMI-0 --brightness 0.5
|
xrandr --output HDMI-0 --brightness 0.5
|
||||||
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --connection local
|
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --connection local --limit $HOSTNAME
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
coloredlogs==10.0
|
coloredlogs>=10.0<11
|
||||||
progressbar2==3.47.0
|
progressbar2>=3.47.0<4
|
||||||
|
youtube-dl>=2021.6.6
|
||||||
|
|
|
@ -47,6 +47,7 @@ if __name__ == "__main__":
|
||||||
env_var="SUBJECT",
|
env_var="SUBJECT",
|
||||||
default=f"Test message {now.strftime('%H:%M:%S')}",
|
default=f"Test message {now.strftime('%H:%M:%S')}",
|
||||||
)
|
)
|
||||||
|
parser.add_argument("-c", "--callout", env_var="CALLOUT", action="store_true")
|
||||||
|
|
||||||
parser.add_argument("-b", "--body", env_var="BODY", default="")
|
parser.add_argument("-b", "--body", env_var="BODY", default="")
|
||||||
parser.add_argument("-g", "--gtube", env_var="GTUBE", action="store_true")
|
parser.add_argument("-g", "--gtube", env_var="GTUBE", action="store_true")
|
||||||
|
@ -176,8 +177,9 @@ Input arguments:
|
||||||
send(f"AUTH PLAIN {encoded}")
|
send(f"AUTH PLAIN {encoded}")
|
||||||
send(f"MAIL FROM: <{args.sender}>")
|
send(f"MAIL FROM: <{args.sender}>")
|
||||||
send(f"RCPT TO: <{args.receiver}>")
|
send(f"RCPT TO: <{args.receiver}>")
|
||||||
send("DATA")
|
if not args.callout:
|
||||||
send(text)
|
send("DATA")
|
||||||
|
send(text)
|
||||||
send("QUIT")
|
send("QUIT")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
|
@ -291,6 +291,7 @@ if $INSTALL_VIDEO
|
||||||
then
|
then
|
||||||
i vlc # Video player
|
i vlc # Video player
|
||||||
i mpv # Audio/Video player
|
i mpv # Audio/Video player
|
||||||
|
i mpv-thumbnail-script # Show thumbnails for mpv
|
||||||
i ffmpeg # Video/Audio file handler
|
i ffmpeg # Video/Audio file handler
|
||||||
i youtube-dl # Downloader for videos
|
i youtube-dl # Downloader for videos
|
||||||
i megatools # Downloader for mega.nz
|
i megatools # Downloader for mega.nz
|
||||||
|
|
Loading…
Reference in a new issue