cleanup
This commit is contained in:
parent
4e94930d54
commit
e9a5136760
|
@ -14,11 +14,17 @@ if [ -n "$SESSIONFILES" ]; then
|
|||
set -e
|
||||
fi
|
||||
|
||||
echo "Sourcing $X11_CONFIG/xprofile"
|
||||
|
||||
. "$X11_CONFIG/xprofile"
|
||||
|
||||
echo $DBUS_SESSION_BUS_ADDRESS > $XDG_STATE_HOME/dbus_session_bus_address
|
||||
|
||||
echo "Starting DWM with PATH='$PATH:$HOME'"
|
||||
|
||||
dwm
|
||||
|
||||
echo "Exited DWM, Killing $(jobs -p | awk "{print \$3}")"
|
||||
|
||||
kill $(jobs -p | awk "{print \$3}")
|
||||
'
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#!/bin/sh
|
||||
# shellcheck disable=SC2068,SC2086
|
||||
|
||||
start() {
|
||||
pidof -sx $1 || $@ >"${HOME}/.local/log/${1}.log" 2>&1 &
|
||||
pidof -sx "$1" || "$@" >"${HOME}/.local/log/${1}.log" 2>&1 &
|
||||
}
|
||||
|
||||
start xwallpaper --zoom "${XDG_DATA_HOME}/bg"
|
||||
|
@ -15,5 +14,6 @@ start unclutter -noevents
|
|||
start dunst
|
||||
start syncthingtray
|
||||
start system-config-printer-applet
|
||||
|
||||
start "$HOME/.local/libexec/daemons/remapd"
|
||||
start env PATH="$HOME/.local/libexec/statusbar:$PATH" dwmblocks
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
RED="\033[31m"
|
||||
RESET="\033[0m"
|
||||
|
||||
|
@ -11,12 +10,12 @@ f="$(realpath "$1")" w=$2 h=$3 x=$4 y=$5
|
|||
image() {
|
||||
f=$1 w=$2 h=$3 x=$4 y=$5
|
||||
if [ -f "$f" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
|
||||
name=$(basename "$0")
|
||||
name=$(basename "$0")
|
||||
if [ "$name" = "sixel" ]; then
|
||||
[ "$TERM_PROGRAM" = "tmux" ] && tmuxflags="--passthrough tmux"
|
||||
# shellcheck disable=2086
|
||||
chafa "$f" -f sixel -s "$(($2 - 2))x$3" --animate false --polite on $tmuxflags
|
||||
exit 0
|
||||
exit 0
|
||||
elif [ "$name" = "ueberzug" ]; then
|
||||
if command -V ueberzug >/dev/null 2>&1; then
|
||||
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$(($4 + 3))" "$(($5 + 1))" "$(($2 - 6))" "$(($3 - 2))" "$1" >"$FIFO_UEBERZUG"
|
||||
|
@ -86,7 +85,7 @@ mimetest() {
|
|||
image/*) image "$f" "$w" "$h" "$x" "$y" ;;
|
||||
video/*) video "$f" "$w" "$h" "$x" "$y" ;;
|
||||
*opendocument*) run odt2txt "$f" ;;
|
||||
*/markdown) run glow -s "$XDG_CONFIG_HOME/glow/style.json" "$f" --width "$w";;
|
||||
*/markdown) run glow -s "$XDG_CONFIG_HOME/glow/style.json" "$f" --width "$w" ;;
|
||||
*/html) run lynx -dump "$f" ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
|
@ -102,8 +101,8 @@ if command -v gio 1>/dev/null 2>&1; then
|
|||
mimetest "$giorun" && exit 1
|
||||
fi
|
||||
|
||||
case $(file -b "$f") in
|
||||
*ASCII* | *UTF*) text "$f" "$w" ;;
|
||||
case "$(file -b "$f")" in
|
||||
*text*) text "$f" "$w" ;;
|
||||
*)
|
||||
printf "%b" "\$(file --mime-type)\t\t\t : $filerun\n"
|
||||
[ -n "$giorun" ] && printf "%b" "\$(gio info)\t\t\t\t : $giorun\n"
|
||||
|
|
Loading…
Reference in New Issue