Compare commits
3 commits
46abb5f07a
...
06e24eac37
Author | SHA1 | Date | |
---|---|---|---|
Geoffrey Frogeye | 06e24eac37 | ||
Geoffrey Frogeye | 6b13214c4d | ||
Geoffrey Frogeye | 45e32adc61 |
|
@ -3,6 +3,7 @@
|
|||
# Remove SSH and GPG keys from keystores
|
||||
ssh-add -D
|
||||
echo RELOADAGENT | gpg-connect-agent
|
||||
rm -rf "/tmp/cached_pass_$UID"
|
||||
|
||||
|
||||
dm-tool lock
|
||||
|
|
11
config/polybar/bars.ini
Normal file
11
config/polybar/bars.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[bar/base]
|
||||
monitor = ${env:display}
|
||||
bottom = true
|
||||
|
||||
[bar/primary]
|
||||
inherit = bar/base
|
||||
modules-right = date
|
||||
|
||||
[bar/secondary]
|
||||
inherit = bar/base
|
||||
modules-right = date
|
2
config/polybar/config.ini
Normal file
2
config/polybar/config.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
include-file = modules.ini
|
||||
include-file = bars.ini
|
|
@ -21,7 +21,7 @@ do
|
|||
else
|
||||
bar="secondary"
|
||||
fi
|
||||
polybar $bar &
|
||||
polybar -q $bar -c ~/.config/polybar/config.ini &
|
||||
done
|
||||
|
||||
echo "Bars launched..."
|
||||
|
|
3
config/polybar/modules.ini
Normal file
3
config/polybar/modules.ini
Normal file
|
@ -0,0 +1,3 @@
|
|||
[module/date]
|
||||
type = internal/date
|
||||
date = %m-%d %H:%M:%S
|
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
|
||||
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||
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
|
||||
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||
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
|
||||
echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||
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
|
||||
progressbar2==3.47.0
|
||||
coloredlogs>=10.0<11
|
||||
progressbar2>=3.47.0<4
|
||||
youtube-dl>=2021.6.6
|
||||
|
|
|
@ -47,6 +47,7 @@ if __name__ == "__main__":
|
|||
env_var="SUBJECT",
|
||||
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("-g", "--gtube", env_var="GTUBE", action="store_true")
|
||||
|
@ -176,6 +177,7 @@ Input arguments:
|
|||
send(f"AUTH PLAIN {encoded}")
|
||||
send(f"MAIL FROM: <{args.sender}>")
|
||||
send(f"RCPT TO: <{args.receiver}>")
|
||||
if not args.callout:
|
||||
send("DATA")
|
||||
send(text)
|
||||
send("QUIT")
|
||||
|
|
|
@ -291,6 +291,7 @@ if $INSTALL_VIDEO
|
|||
then
|
||||
i vlc # Video player
|
||||
i mpv # Audio/Video player
|
||||
i mpv-thumbnail-script # Show thumbnails for mpv
|
||||
i ffmpeg # Video/Audio file handler
|
||||
i youtube-dl # Downloader for videos
|
||||
i megatools # Downloader for mega.nz
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#
|
||||
# Executed by xinit (startx)
|
||||
|
||||
echo ~/.xinitrc
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/*; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
|
|
115
xsession
115
xsession
|
@ -3,58 +3,91 @@
|
|||
#
|
||||
# ~/.xsession
|
||||
#
|
||||
# Might be sourced by DM when on custom
|
||||
# TODO Test that on a DM I guess?
|
||||
# Sourced by display managers
|
||||
#
|
||||
|
||||
# Load Xresources
|
||||
[ -f ~/.config/Xresources/main ] && xrdb -I"$HOME" ~/.config/Xresources/main
|
||||
|
||||
# Disable the bell
|
||||
xset b off
|
||||
|
||||
found=0
|
||||
tryDM() {
|
||||
if [ $found -eq 0 ]; then
|
||||
parameters=''
|
||||
case $1 in
|
||||
awesome ) executable=awesome;;
|
||||
bspwm ) executable=bspwm;;
|
||||
catwm ) executable=catwm;;
|
||||
cinnamon ) executable=cinnamon-session;;
|
||||
dwm ) executable=dwm;;
|
||||
enlightenment ) executable=enlightenment_start;;
|
||||
ede ) executable=startede;;
|
||||
fluxbox ) executable=startfluxbox;;
|
||||
gnome ) executable=gnome-session;;
|
||||
gnome-classic ) executable=gnome-session; parameters="--session=gnome-classic";;
|
||||
i3|i3wm ) executable=i3;;
|
||||
icewm ) executable=icewm-session;;
|
||||
jwm ) executable=jwm;;
|
||||
kde ) executable=startkde;;
|
||||
mate ) executable=mate-session;;
|
||||
monster|monsterwm ) executable=monsterwm;;
|
||||
notion ) executable=notion;;
|
||||
openbox ) executable=openbox-session;;
|
||||
plasma ) executable=startplasma-x11;;
|
||||
unity ) executable=unity;;
|
||||
xfce|xfce4 ) executable=startxfce4;;
|
||||
xmonad ) executable=xmonad;;
|
||||
*) executable=$1;;
|
||||
esac
|
||||
if command -v "$executable"
|
||||
# Folders to search for desktop environments (DE) in
|
||||
sessions_dirs="/usr/share/xsessions"
|
||||
|
||||
# If we have locally installed DE try them before system ones
|
||||
sessions_dir_local="$HOME/.local/share/xsessions"
|
||||
if [ -d "$sessions_dir_local" ]
|
||||
then
|
||||
sessions_dirs="$sessions_dir_local $sessions_dirs"
|
||||
fi
|
||||
|
||||
# If we have junest installed DE try them before all others
|
||||
sessions_dir_junest="$HOME/.local/share/xsessions"
|
||||
if [ -d "$sessions_dir_junest" ]
|
||||
then
|
||||
sessions_dirs="$sessions_dir_junest $sessions_dirs"
|
||||
fi
|
||||
|
||||
startSession() {
|
||||
session_dir="$1"
|
||||
session_name="$2"
|
||||
|
||||
session_file="${session_dir}/${session_name}.desktop"
|
||||
executable="$(grep ^Exec= "$session_file" | cut -d'=' -f2)"
|
||||
# TODO Does this work with parameters?
|
||||
# gnome-classic might need some
|
||||
|
||||
# If this is a Junest DE, we need to wrap it
|
||||
if [ "$sessions_dir" = "$sessions_dir_junest" ]
|
||||
then
|
||||
found=1
|
||||
# Some DMs enforce that to you,
|
||||
# which shows warning on Junest
|
||||
unset LD_PRELOAD
|
||||
|
||||
# The intended way:
|
||||
# exec ~/.local/bin/junest "$executable" $parameters
|
||||
# Too restricted to the outside (e.g. Yubikey isn't accessible)
|
||||
|
||||
# The custom way
|
||||
exec ~/.local/bin/junest --backend-args "--dev-bind /run /run" "$executable" $parameters
|
||||
|
||||
# The fallback wrappers way
|
||||
# export PATH="$PATH:~/.junest/usr/bin_wrappers"
|
||||
# exec "$executable" $parameters
|
||||
# Should work but doesn't, I forgot why
|
||||
|
||||
# The "I do what I want" way
|
||||
#exec bwrap --bind $HOME/.junest / --bind $HOME $HOME --bind /tmp /tmp --proc /proc --dev-bind /dev /dev --dev-bind /run /run "$executable" $parameters
|
||||
# Even Alacritty doesn't work here
|
||||
|
||||
fi
|
||||
|
||||
exec "$executable" $parameters
|
||||
}
|
||||
|
||||
trySession() { # session_name
|
||||
session_name="$1"
|
||||
for sessions_dir in $sessions_dirs
|
||||
do
|
||||
session_file="$sessions_dir/${session_name}.desktop"
|
||||
if [ -f "$session_file" ]
|
||||
then
|
||||
startSession "$sessions_dir" "$session_name"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
tryDM "$1"
|
||||
trySession "$1"
|
||||
fi
|
||||
tryDM i3
|
||||
tryDM xfce4
|
||||
tryDM mate
|
||||
tryDM plasma
|
||||
tryDM gnome
|
||||
tryDM kde
|
||||
trySession i3
|
||||
trySession xfce4
|
||||
trySession mate
|
||||
trySession plasma
|
||||
trySession gnome
|
||||
trySession kde
|
||||
|
||||
# If we found nothing by then,
|
||||
# I guess it's up to the DM to default to something
|
||||
|
|
Loading…
Reference in a new issue