epic letter.tmac macro, remove newline char from menu-bookmarks

This commit is contained in:
tavo-wasd 2023-10-01 18:30:13 -06:00
parent 3b5e64fe5b
commit ca4a20a8f4
6 changed files with 48 additions and 18 deletions

13
groff/letter.tmac Normal file
View file

@ -0,0 +1,13 @@
.\" US letter dimensions
.device papersize=8.5i,11i
.
.\" Calculate line length with PO
.de CALCLL
.if (\\n[PO] == 0) \{\
. \" If PO not defined, set to 1i
. nr PO 1i
.\}
.nr LL \\n[PO]*-2+8.5i
.nr LT \\n[PO]*-2+8.5i
..
.CALCLL

View file

@ -1,5 +1,5 @@
\" Quality of life utilities .\" Quality of life utilities
\" for easier eqn usage. .\" for easier eqn usage.
. .
.EQ .EQ
delim $$ delim $$

View file

@ -1,7 +1,7 @@
\" Markdown-like syntax for custom headings .\" Markdown-like syntax for custom headings
\" and other text formatting options. .\" and other text formatting options.
. .
\" --- Headings --- .\" --- Headings ---
.de # .de #
. nf . nf
. NH . NH
@ -66,7 +66,7 @@
. fi . fi
.. ..
. .
\" --- Lists --- .\" --- Lists ---
.de * .de *
. IP \(bu 2 . IP \(bu 2
\\$1 \\$1
@ -80,14 +80,14 @@
\\$1 \\$1
.. ..
. .
\" --- Block quotes --- .\" --- Block quotes ---
.de > .de >
. QP . QP
. I . I
. ad b . ad b
.. ..
. .
\" --- Horizontal rule --- .\" --- Horizontal rule ---
.de --- .de ---
\l'\\n(.lu\(ul' \l'\\n(.lu\(ul'
.. ..

View file

@ -1,12 +1,12 @@
\" Borrowed from Sudarson Nantha .\" Borrowed from Sudarson Nantha
\" github.com/SudarsonNantha .\" github.com/SudarsonNantha
\" --- .\" ---
\" Relocate .TC at the end of the document to either .\" Relocate .TC at the end of the document to either
\" 'before' or 'after' (by giving those arguments) .\" 'before' or 'after' (by giving those arguments)
\" the page where this macro was sourced. .\" the page where this macro was sourced.
\" --- .\" ---
\" Requires -mspdf macros .\" Requires -mspdf macros
.
.if '\*[.T]'pdf' \X'pdf: pagename here' .if '\*[.T]'pdf' \X'pdf: pagename here'
.rn TC TCold .rn TC TCold
.de TC .de TC

View file

@ -20,3 +20,19 @@
.\" Auto-numbered tables: \\n+[tblnum] .\" Auto-numbered tables: \\n+[tblnum]
.\" Current table: \\n[tblnum] .\" Current table: \\n[tblnum]
.nr tblnum 0 1 .nr tblnum 0 1
.
.\" Begin code block
.de CS
.sp 1
.B1
.sp 0.5
.ft CW
..
.
.\" End code block
.de CE
.sp 1
.B2
.ft
.sp 1
..

View file

@ -5,4 +5,5 @@
name=$(cut -d '-' -f 1 $HOME/Documents/bookmarks | grep -v '^#' | sed '/^\s*$/d' | menu "Site:") name=$(cut -d '-' -f 1 $HOME/Documents/bookmarks | grep -v '^#' | sed '/^\s*$/d' | menu "Site:")
[ -z "$name" ] && exit [ -z "$name" ] && exit
grep "$name" $HOME/Documents/bookmarks | cut -d '-' -f 2- | xsel -ib && notify-send "󰃀 Bookmarks" "'$name' copied to clipboard" grep "$name" $HOME/Documents/bookmarks | cut -d '-' -f 2- | tr -d '\n' |
xsel -ib && notify-send "󰃀 Bookmarks" "'$name' copied to clipboard"