Update key binds, deploy script, and remove tmux starting by default
This commit is contained in:
parent
c241b5d20f
commit
8b087082d6
6 changed files with 45 additions and 11 deletions
|
@ -1 +0,0 @@
|
|||
/home/aselimov/projects/utility/scripts/pubs-rofi.sh
|
26
bin/pubs-rofi.sh
Executable file
26
bin/pubs-rofi.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
#This script wraps various pub commands into a dmenu menu
|
||||
function fail {
|
||||
printf '%s\n' "$1" >&2
|
||||
exit "${2-1}"
|
||||
}
|
||||
|
||||
dmenu="dmenu -theme-str 'window {width: 80%;}' -i"
|
||||
citekey=$(pubs list | eval "$dmenu" | cut -d ' ' -f 1 | tr -d '[]\n' )
|
||||
|
||||
if [ "$citekey" = "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "open" ]; then
|
||||
pubs doc open "$citekey"
|
||||
elif [ "$1" = "tag" ]; then
|
||||
echo $citekey| tr -d '\n'| xclip
|
||||
xdotool type "$citekey"
|
||||
elif [ "$1" = "url" ]; then
|
||||
url=$(grep "url =" $HOME/.pubs/bib/$citekey.bib | cut -d "{" -f 2 | tr -d "{ },")
|
||||
echo $url| tr -d '\n'| xclip
|
||||
xdotool type "$url"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue