mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-31 04:57:57 +00:00
Update polybar and UltiSnips snippets
This commit is contained in:
parent
3df3e71c52
commit
67f893804f
@ -1,7 +1,7 @@
|
||||
global !p
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
def relative_date(days):
|
||||
def relative_date(days = 0):
|
||||
time_difference = timedelta(days=int(days))
|
||||
calculated_date = datetime.today() + time_difference
|
||||
|
||||
@ -24,12 +24,18 @@ snip.rv = datetime.today().strftime("%F")
|
||||
`
|
||||
endsnippet
|
||||
|
||||
|
||||
# Quick formatting.
|
||||
snippet sign "Quick signature" i
|
||||
${1:Sincerely,}
|
||||
${2:Gabriel Arazas}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet retrieve "Quick retrieval date in informal format" i
|
||||
(retrieved `!p snip.rv = datetime.today().strftime("%F")`)
|
||||
endsnippet
|
||||
|
||||
snippet ie "Parenthetical material Latin 'id est' (ie)" iw
|
||||
(i.e., $1) $0
|
||||
endsnippet
|
||||
@ -38,6 +44,8 @@ snippet eg "Parenthetical material Latin 'exempli gratia' (eg)" iw
|
||||
(e.g., $1) $0
|
||||
endsnippet
|
||||
|
||||
|
||||
# Em dashes (I've these dedicated snippets for some reason).
|
||||
snippet em "Quick em dash"
|
||||
—
|
||||
endsnippet
|
||||
@ -54,6 +62,7 @@ snippet em-eg "'exempli gratia' surrounded with em dash" iw
|
||||
— e.g., $1 — $0
|
||||
endsnippet
|
||||
|
||||
|
||||
# Quick word snippets
|
||||
# Each of these quick word snippets has a prefix of `qw-`
|
||||
snippet qw-lx "LaTeX" iw
|
||||
@ -64,6 +73,7 @@ snippet qw-as "Asciidoctor" iw
|
||||
Asciidoctor
|
||||
endsnippet
|
||||
|
||||
|
||||
# Miscellaneous snippets
|
||||
snippet #! "Quick snippet for a shebang." bi
|
||||
#!${1:/usr/bin/env} ${2:sh}
|
||||
|
@ -121,14 +121,13 @@ $0
|
||||
endsnippet
|
||||
|
||||
snippet "-table h (\d+)-" "Make a quick table with the headers already set up" bir
|
||||
[cols="`!p snip.rv = match.group(1)`", options="headers"]
|
||||
[cols="`!p snip.rv = match.group(1)`", options="headers"`!p snip.rv=smart_space(t[1], ", ", loose=True)`$1]
|
||||
|===
|
||||
$1
|
||||
`!p
|
||||
number_of_headers = int(match.group(1))
|
||||
|
||||
for i in range(0, number_of_headers):
|
||||
snip.rv += f"| Header {i + 1}\n"
|
||||
snip += f"| Header {i + 1}"
|
||||
`
|
||||
$2
|
||||
|
||||
@ -180,6 +179,14 @@ $1
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet verbatim "Literal text block" bi
|
||||
....
|
||||
$1
|
||||
....
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet sidebar "Sidebar as an open block" bi
|
||||
[sidebar]
|
||||
.${1:<title>}
|
||||
@ -197,10 +204,16 @@ endsnippet
|
||||
|
||||
snippet append "Appendix block" bi
|
||||
[appendix]
|
||||
== ${1:Appendix}
|
||||
== ${1:Additional readings}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet bibres "Bibliographical resource in a definition block" bi
|
||||
${1:<link>}[${2:<title>}] (retrieved ${3:date})::
|
||||
${4:<description>}
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet stem "Stem block" bi
|
||||
[stem]
|
||||
++++
|
||||
|
@ -126,7 +126,7 @@
|
||||
inherit = module-common-style
|
||||
type = internal/network
|
||||
interface = enp4s0
|
||||
interval = 3.0
|
||||
interval = 3
|
||||
|
||||
format-connected-prefix = "ETH"
|
||||
format-connected-prefix-padding = 1
|
||||
@ -134,13 +134,17 @@
|
||||
format-connected-prefix-background = ${colors.network_module_bg}
|
||||
format-connected-background = ${colors.foreground}
|
||||
format-connected-foreground = ${colors.background}
|
||||
label-connected = OK
|
||||
label-connected = "OK"
|
||||
label-connected-padding = 1
|
||||
|
||||
format-disconnected = <label-disconnected>
|
||||
format-disconnected-background = ${colors.background}
|
||||
format-disconnected-prefix = "ETH"
|
||||
format-disconnected-prefix-padding = 1
|
||||
format-disconnected-prefix-foreground = ${colors.background}
|
||||
format-disconnected-prefix-background = ${colors.network_module_bg}
|
||||
format-disconnected-background = ${colors.foreground}
|
||||
format-disconnected-foreground = ${colors.background}
|
||||
label-disconnected-padding = 1
|
||||
label-disconnected = N/A
|
||||
label-disconnected = "N/A"
|
||||
label-disconnected-foreground = ${colors.foreground}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user