dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

.interrobangrc (3596B)


      1 # ░▀█▀░█▀█░▀█▀░█▀▀░█▀▄░█▀▄░█▀█░█▀▄░█▀█░█▀█░█▀▀░░
      2 # ░░█░░█░█░░█░░█▀▀░█▀▄░█▀▄░█░█░█▀▄░█▀█░█░█░█░█░░
      3 # ░▀▀▀░▀░▀░░▀░░▀▀▀░▀░▀░▀░▀░▀▀▀░▀▀░░▀░▀░▀░▀░▀▀▀░░
      4 
      5 ## BASIC CONFIGURATION
      6 
      7 #set font      = fixed
      8 set font      = -misc-tamzen-medium-r-normal-*-15-*-*-*-*-*-*-*
      9 set geometry  = 1000x30+30+30
     10 # colors 0=fg 1=bg 2=unmatch_fg 3=unmatch_bg 4=match_fg 5=match_bg
     11 set colors	  = #baba9e #2b2b2d #3d3a3b #131313 #bbbbbb #753747
     12 set border    = 6px #3d3a3b
     13 set bangchar  = !
     14 set run_hook  = %s || (notify-send "drak: command not found";interrobang)
     15 #set autocomp  = 1
     16 set list      = true
     17 set last      = true
     18 set margin    = -80
     19 set shell     = /usr/bin/zsh
     20 set flags     = -ic
     21 
     22 
     23 ## COMMON BANGS AND COMPLETITON OPTIONS
     24 
     25 bang term     = urxvtc -hold -e %s
     26 bang web      = qutebrowser %s
     27 bang pdf      = zathura "%s"
     28 bang vid      = mpv "%s"
     29 bang man      = urxvtc -e man %s
     30 bang ddg      = qutebrowser "https://duckduckgo.com/?q=%s"
     31 bang calc     = notify-send "$(echo '%s' | bc -l)"
     32 bang ba       = urxvtc -e buku -a %s
     33 bang bt       = urxvtc -hold --e buku --np -t %s
     34 bang bo       = urxvtc -e buku -o %s
     35 bang mpv      = urxvtc -e mpv "%s"
     36 bang todo     = urxvtc -hold -e watch todo
     37 bang ?        = echo "interrobang ignored \"%s\""
     38 bang quit     = case "%s" in shutdown) sudo systemctl poweroff ;; reboot) sudo systemctl reboot ;; logout) killall xinit ;; cancel) exit ;; esac
     39 bang uh       = urxvtc -e $(hidden -c | grep -i "%s" | awk -F: '{print $NF}' | tr -d "'")
     40 
     41 tab default   = percontation "%s" %s | sort -u
     42 tab calc      = str="%s%s"; echo "!calc $(echo ${str#\!calc} | bc -l)"
     43 tab ?         = ignore="%s%s"; awk '/^bang/ {print "!"$2" ";}' ~/.interrobangrc
     44 tab quit      = echo -e "cancel\nshutdown\nreboot\nlogout" | grep "^%s%s"
     45 tab uh        = for i in $(hidden | awk '{print $NF}' | tr '[:upper:]' '[:lower:]') ; do echo "!uh $i" ; done
     46 
     47 
     48 ## EXAMPLES OF COMPLEX COMPLETION OR SCRIPTING
     49 
     50 #####
     51 ## percontation can find .desktop files:
     52 ##   path: (default) show binaries in $PATH
     53 ##   desktop: list desktop files that match
     54 ##   desktop+: same as above, plus substring matching with comments
     55 ##  NOTE: see the desktop bang definition below
     56 ## compgen uses bash's default completion
     57 #tab default   = percontation desktop path "%s" %s | sort -u
     58 #tab default   = percontation desktop+ path "%s" %s | sort -u
     59 #tab default   = compgen -P "%s" -cf %s
     60 
     61 #####
     62 ## Example logout tool:
     63 ##   uncomment the following bang and tab lines
     64 #bang logout   = case "%s" in shutdown) sudo systemctl poweroff ;; sleep) sudo systemctl suspend ;; reboot) sudo systemctl reboot ;; logout) killall xinit ;; cancel) exit ;; esac
     65 
     66 #tab logout    = echo -e "cancel\nshutdown\nsleep\nreboot\nlogout" | grep "^%s%s"
     67 
     68 #####
     69 ## desktop bangs
     70 ##   The first version ignores any parameters to the desktop file and
     71 ##     just executes the associated binary
     72 ##   The second version passes parameters and parses the desktop file
     73 ##     properly, but requires an external tool to do so.  This tool
     74 ##     is not included in the interrobang package.
     75 #bang desktop  = ARG="%s"; FILE=$(find /usr/share/applications/ -name ${ARG%% *}.desktop | head -1); $(awk '/^Exec=/ {sub(/Exec=/,"",$1); print $1;}' $FILE)
     76 
     77 #bang desktop  = ARG="%s"; FILE=$(find /usr/share/applications/ -name ${ARG%% *}.desktop | head -1); PARAM=${ARG#* }; desktop-exec $FILE $PARAM
     78