fa2020 update
This commit is contained in:
20
mv2figs.sh
20
mv2figs.sh
@@ -1,8 +1,24 @@
|
||||
#!/bin/bash
|
||||
#mv2figs: used by the <ctrl-z> screenshot shortcut set in .config/i3/config
|
||||
#!/bin/bash
|
||||
if [ "$1" == "-h" ] ; then
|
||||
echo "
|
||||
mv2figs - move image to figure assets folder and put html figure string containing relative link to the asset on system clipboard
|
||||
- used by the <ctrl-z> screenshot shortcut set in .config/sway/config and .config/i3/config
|
||||
- default figure assets set as HOME/figures
|
||||
|
||||
Usage: mv2figs.sh img.jpg
|
||||
mv2figs.sh img.jpg ~/myproject/assets
|
||||
"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
#default image location
|
||||
blobFolder=$HOME/figures
|
||||
# blobFolder=$HOME/figures
|
||||
blobFolder=${2:-$HOME/figures}
|
||||
|
||||
#TODO: add xorg-x11 vs wayland logic here
|
||||
# wayland: use "wl-copy"
|
||||
#xorg-x11: use "xclip -selection clipboard"
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ xsltproc --novalid $styleSheet $uid.xml > $uid.bib
|
||||
|
||||
#extract some strings to make a nice filename for the pdf
|
||||
key="LastName";
|
||||
author=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#")
|
||||
author=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#" | tr -d " ")
|
||||
|
||||
key="MedlineTA";
|
||||
journal=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#" | tr -d " ")
|
||||
|
||||
2
sdoi.sh
2
sdoi.sh
@@ -55,7 +55,7 @@ if [ -z "$fn" ]; then
|
||||
else
|
||||
#extract some strings to make a nice filename for the pdf
|
||||
key="LastName";
|
||||
author=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#")
|
||||
author=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#" | tr -d " ")
|
||||
|
||||
key="MedlineTA";
|
||||
journal=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#" | tr -d " ")
|
||||
|
||||
2
spmid.sh
2
spmid.sh
@@ -39,7 +39,7 @@ if [ -z "$fn" ]; then
|
||||
else
|
||||
#extract some strings to make a nice filename for the pdf
|
||||
key="LastName";
|
||||
author=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#")
|
||||
author=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#" | tr -d " ")
|
||||
|
||||
key="MedlineTA";
|
||||
journal=$(grep $key --max-count=1 $uid.xml | sed -E "s#\W*<$key>(.+)</$key>\W*#\1#" | tr -d " ")
|
||||
|
||||
14
ws
14
ws
@@ -10,7 +10,7 @@ if [ "$1" == "-h" ] ; then
|
||||
ws
|
||||
ws ~/projects
|
||||
|
||||
#with i3wm for example:
|
||||
#with i3wm|sway for example:
|
||||
1. select workspace e.g. <\$mod+2>
|
||||
2. open dbus quick menu <\$mod+d> and type ws
|
||||
"
|
||||
@@ -21,6 +21,8 @@ fi
|
||||
set -e
|
||||
|
||||
myLocalConfig="$HOME/.bashrc.local"
|
||||
# myTerm=${TERM:-urxvt}
|
||||
myTerm=${TERM:-alacritty}
|
||||
|
||||
if [[ -e $myLocalConfig ]]; then
|
||||
source $myLocalConfig
|
||||
@@ -35,10 +37,20 @@ fi
|
||||
# echo $workDir
|
||||
# echo $workingDirectory
|
||||
|
||||
if [[ $myTerm == urxvt ]]; then
|
||||
#urxvt -e "dimr &"
|
||||
urxvt -cd $workingDirectory -title "$(basename $workingDirectory) woola" -e bash -ic "$HOME/bin/woola" &
|
||||
urxvt -cd $workingDirectory -title "$(basename $workingDirectory) ranger" -e bash -ic "ranger" &
|
||||
urxvt -cd $workingDirectory &
|
||||
fi
|
||||
|
||||
if [[ $myTerm == alacritty ]]; then
|
||||
alacritty --working-directory $workingDirectory --title "$(basename $workingDirectory) woola" -e bash -ic "$HOME/bin/woola" &
|
||||
alacritty --working-directory $workingDirectory --title "$(basename $workingDirectory) ranger" -e bash -ic "ranger" &
|
||||
alacritty --working-directory $workingDirectory &
|
||||
else
|
||||
echo "edit script for compatibility with terminal"
|
||||
fi
|
||||
|
||||
if [[ -e $myLocalConfig ]]; then
|
||||
sed -i -E "s|(export workDir=).+|\1$workingDirectory|" "$myLocalConfig"
|
||||
|
||||
Reference in New Issue
Block a user