Initial commit

This commit is contained in:
agryphus 2023-08-02 00:45:22 -04:00
commit 85f5be4658
18 changed files with 663 additions and 0 deletions

19
.local/bin/dmenuunicode Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
# The famous "get a menu of emojis to copy" script.
# Get user selection via dmenu from emoji file.
chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | dmenu -i -l 30 | sed "s/ .*//")
# Exit if none chosen.
[ -z "$chosen" ] && exit
# If you run this command with an argument, it will automatically insert the
# character. Otherwise, show a message that the emoji has been copied.
if [ -n "$1" ]; then
xdotool type "$chosen"
else
printf "%s" "$chosen" | xclip -selection clipboard
notify-send "'$chosen' copied to clipboard." &
fi

20
.local/bin/lfub Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
set -e
cleanup() {
exec 3>&-
rm "$FIFO_UEBERZUG"
}
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
lf "$@"
else
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$"
mkfifo "$FIFO_UEBERZUG"
ueberzug layer -s --output x11 <"$FIFO_UEBERZUG" -p json &
exec 3>"$FIFO_UEBERZUG"
trap cleanup HUP INT QUIT TERM PWR EXIT
lf "$@" 3>&-
fi

9
.local/bin/passmenu Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# This script exists because I want to use dmenu instead of dmenu-wl, which passmenu
# defaults to if it sees that your $WAYLAND_DISPLAY variable is set. I also passed
# $PINENTRY_USER_DATA which will eventually reach the pinentry-wrapper script and launch
# a graphical pinentry as opposed to my curses default, since launching pinentry-curses
# outside of a terminal just breaks everything.
PINENTRY_USER_DATA=qt WAYLAND_DISPLAY= /usr/bin/passmenu

14
.local/bin/pinentry-wrapper Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Defaults to Qt, with a choice of curses for selected programs
# PINENTRY_USER_DATA is a GnuPG defined variable (see man gpg)
case "$PINENTRY_USER_DATA" in
qt)
exec /usr/bin/pinentry-qt "$@"
;;
*)
exec /usr/bin/pinentry-curses "$@"
;;
esac

7
.local/bin/zathura Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/sh
# This was created because the x backend of zathura did not want to listen
# to the $DISPLAY environment variable and refused to open inside of my VcXsrv x
# server instance. I could not alias this in my .zshrc either because when zathura
# is launched from dmenu or from vimtex, it would not follow the alias.
GDK_BACKEND=x11 /usr/bin/zathura "$@"