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
\" for easier eqn usage.
.\" Quality of life utilities
.\" for easier eqn usage.
.
.EQ
delim $$

View file

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

View file

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

View file

@ -20,3 +20,19 @@
.\" Auto-numbered tables: \\n+[tblnum]
.\" Current table: \\n[tblnum]
.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:")
[ -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"