From 8f2810ac20c942f784d0cae1d11812d6ce51c308 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 19 Jul 2022 17:04:17 -0400 Subject: samedir now sd, libxft-bgra message removed --- .config/shell/aliasrc | 2 ++ .config/shell/profile | 12 +----------- .local/bin/samedir | 10 ---------- .local/bin/sd | 10 ++++++++++ 4 files changed, 13 insertions(+), 21 deletions(-) delete mode 100755 .local/bin/samedir create mode 100755 .local/bin/sd diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 27d4527..8273a2f 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -11,6 +11,8 @@ for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do alias $command="sudo $command" done; unset command +se() { cd ~/.local/bin; $EDITOR $(fzf) ;} + # Verbosity and settings that you pretty much just always are going to want. alias \ cp="cp -iv" \ diff --git a/.config/shell/profile b/.config/shell/profile index 9515179..62d5e79 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -140,17 +140,7 @@ ex=🎯:\ *.java=♨:\ " -[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 & - -if pacman -Qs libxft-bgra >/dev/null 2>&1; then - # Start graphical server on user's current tty if not already running. - [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" -else - echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm. -Please run: - \033[32myay -S libxft-bgra-git\033[0m -and replace \`libxft\`. Afterwards, you may start the graphical server by running \`startx\`." -fi +[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1 # Switch escape and caps if tty and no passwd required: sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null diff --git a/.local/bin/samedir b/.local/bin/samedir deleted file mode 100755 index 371ec64..0000000 --- a/.local/bin/samedir +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Open a terminal window in the same directory as the currently active window. - -PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p") -PID="$(pstree -lpA "$PID")" -PID="${PID##*"${SHELL##*/}"(}" -PID="${PID%%)*}" -cd "$(readlink /proc/"$PID"/cwd)" || return 1 -"$TERMINAL" diff --git a/.local/bin/sd b/.local/bin/sd new file mode 100755 index 0000000..371ec64 --- /dev/null +++ b/.local/bin/sd @@ -0,0 +1,10 @@ +#!/bin/sh + +# Open a terminal window in the same directory as the currently active window. + +PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p") +PID="$(pstree -lpA "$PID")" +PID="${PID##*"${SHELL##*/}"(}" +PID="${PID%%)*}" +cd "$(readlink /proc/"$PID"/cwd)" || return 1 +"$TERMINAL" -- cgit v1.3.1