summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/define3
-rwxr-xr-x.local/bin/gd2pdf3
-rwxr-xr-x.local/bin/groffdown54
-rwxr-xr-x.local/bin/manualgen6
-rwxr-xr-x.local/bin/remaps2
-rwxr-xr-x.local/bin/sshchoose6
-rwxr-xr-x.local/bin/texinit9
7 files changed, 18 insertions, 65 deletions
diff --git a/.local/bin/define b/.local/bin/define
deleted file mode 100755
index ac3c61f..0000000
--- a/.local/bin/define
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-sdcv --color $1 | less
diff --git a/.local/bin/gd2pdf b/.local/bin/gd2pdf
deleted file mode 100755
index 057f13a..0000000
--- a/.local/bin/gd2pdf
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-groffdown "$1" | refer -PS -e -p"$REFERBIB" | groff -me -ms -kejpt -T pdf | zathura -
diff --git a/.local/bin/groffdown b/.local/bin/groffdown
deleted file mode 100755
index f2810a5..0000000
--- a/.local/bin/groffdown
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-file=$(readlink -f "$1")
-dir=$(dirname "$file")
-base="${file%.*}"
-
-output=$( sed -e '1,1d
- s/title:/\.TL\n/
- s/author:/\.AU\n/
- s/date:/\.ND\n/
- s/institution:/\.AI\n/
-
- s/\\begin{abstract}/\.AB/
- s/\\end{abstract}/\.AE/
-
- s/^\#####.\(.*\)/\.NH 5\n\1\n\.PP/g
- s/^\####.\(.*\)/\.NH 4\n\1\n\.PP/g
- s/^\###.\(.*\)/\.NH 3\n\1\n\.PP/g
- s/^\##.\(.*\)/\.NH 2\n\1\n\.PP/g
- s/^\#.\(.*\)/\.NH 1\n\1\n\.PP/g
-
- s/\*\*\*\(.*\)\*\*\*$/\n\.BI\ \"\1\"\ /g
- s/\*\*\*\(.*\)\*\*\*\(.\)$/\n\.BI\ \"\1\"\ \"\2\"/g
- s/\*\*\*\(.*\)\*\*\*\(.\)/\n\.BI\ \"\1\"\ \"\2\"\n/g
-
- s/\*\*\(.*\)\*\*$/\n\.B\ \"\1\"\ /g
- s/\*\*\(.*\)\*\*\(.\)$/\n\.B\ \"\1\"\ \"\2\"/g
- s/\*\*\(.*\)\*\*\(.\)/\n\.B\ \"\1\"\ \"\2\"\n/g
-
- s/\*\(.*\)\*$/\n\.I\ \"\1\"\ /g
- s/\*\(.*\)\*\(.\)$/\n\.I\ \"\1\"\ \"\2\"/g
- s/\*\(.*\)\*\(.\)/\n\.I\ \"\1\"\ \"\2\"\n/g
-
- s/`\(.*\)`$/\n\.CW\ \"\1\"\ /g
- s/`\(.*\)`\(.\)$/\n\.CW\ \"\1\"\ \"\2\"/g
- s/`\(.*\)`\(.\)/\n\.CW\ \"\1\"\ \"\2\"\n/g
-
- s/^\ ...............-\ /.IP\ \\(bu\ 10\n/g
- s/^\ ...........-\ /.IP\ \\(bu\ 8\n/g
- s/^\ .......-\ /.IP\ \\(bu\ 6\n/g
- s/^\ ...-\ /.IP\ \\(bu\ 4\n/g
- s/^-\ /.IP\ \\(bu\ 2\n/g
- s/^\ .*-\ /.IP\ \\(bu\ 12\n/g
-
- ' $1)
-# echo "$output" | groff -me -ms -kejpt -T pdf > $base.pdf
-
-# echo "$output" > $base.ms
-# groff -ms $base.ms -T pdf > $base.pdf
-
-echo "$output"
-
-# $output >> output.ms
-# s/\*\*\*.*\*\*\*/Hi\1hi/g
diff --git a/.local/bin/manualgen b/.local/bin/manualgen
index 738ef5c..16a7653 100755
--- a/.local/bin/manualgen
+++ b/.local/bin/manualgen
@@ -10,10 +10,10 @@ s/\s*#-#$/\n##/;
sed "s/-->/##\ /;
s/:\(.*\)$/:\1\`/;
s/\s+\s/+/g;
- s/#\*\*:.*//")
+ s/#\*\*:.*//;
+ s/\(^##.*\)/\1\n/g")
manual=$(cat $HOME/.config/manual.part)
-printf " $manual \n $config" | gd2pdf
+printf "$manual\n$config" | lowdown -sTms | pdfroff -itk -mspdf | zathura -
-# printf " $manual \n $config"
diff --git a/.local/bin/remaps b/.local/bin/remaps
index ed6ae43..595022d 100755
--- a/.local/bin/remaps
+++ b/.local/bin/remaps
@@ -9,3 +9,5 @@ setxkbmap -option caps:super
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
# Map the menu button to right super as well.
xmodmap -e 'keycode 135 = Super_R'
+# Software fix for key bounce (debouncing)
+xkbset bo 50
diff --git a/.local/bin/sshchoose b/.local/bin/sshchoose
new file mode 100755
index 0000000..6b884c6
--- /dev/null
+++ b/.local/bin/sshchoose
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+choice="$(pass ls ssh/ | sed '1d;s/^.*\s//g' | fzf)"
+
+ssh "$(pass ssh/$choice)"
+
diff --git a/.local/bin/texinit b/.local/bin/texinit
index 5568c99..8d5adf2 100755
--- a/.local/bin/texinit
+++ b/.local/bin/texinit
@@ -1,6 +1,11 @@
#!/bin/sh
-cp $HOME/Dropbox/A/Scholar/All/Templates/Text/LaTeX/001personal/cegep-lanaudiere/article/* ./
-ln $BIB/citations.bib ./citations.bib
+case form in "$1";
+ rnw)
+ cp $HOME/Dropbox/A/Scholar/All/Templates/LaTeX/cegep/main.rnw ;;
+ *)
+ cp $HOME/Dropbox/A/Scholar/All/Templates/LaTeX/cegep/main.tex ;;
+esac
+
mkdir archives