Compare commits
3 Commits
2e29cb8292
...
e11085ca91
Author | SHA1 | Date |
---|---|---|
Hektor Misplon | e11085ca91 | |
Hektor Misplon | 4e625a45fa | |
Hektor Misplon | 2793ac2349 |
|
@ -83,6 +83,7 @@ dkms.conf
|
|||
# Dotenv
|
||||
.env
|
||||
|
||||
.bash_history
|
||||
.bash_aliases/private
|
||||
.bashrc.d/private
|
||||
desg/
|
||||
|
|
|
@ -57,6 +57,9 @@ def code_inline():
|
|||
def code():
|
||||
return code_inline() or code_block()
|
||||
|
||||
def slugify(text):
|
||||
return re.sub('\s+', '-', text.lower())
|
||||
|
||||
def linkify(text, link):
|
||||
return f"[{text}]({link})"
|
||||
|
||||
|
@ -741,6 +744,12 @@ for i in range(int(match.group(1)), int(match.group(2)) + 1):
|
|||
`
|
||||
endsnippet
|
||||
|
||||
snippet "sec([\sA-z]+)" "Link section titled ..." r
|
||||
`!p
|
||||
snip.rv = "* " + linkify(match.group(1), f"{snip.basename}_{slugify(match.group(1))}")
|
||||
`
|
||||
endsnippet
|
||||
|
||||
snippet cp(\d+) "Comment current page (and date)" r
|
||||
`!p snip.rv = "<!--" + datetime.now().strftime("%Y-%m-%d") + " p. " + match.group(1) + "-->"`
|
||||
endsnippet
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import XMonad
|
||||
import XMonad.Actions.CopyWindow (copyToAll, killAllOtherCopies)
|
||||
import XMonad.Actions.FloatSnap
|
||||
import Control.Monad (liftM2)
|
||||
import XMonad.Hooks.DynamicProperty
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.ManageDocks
|
||||
|
@ -60,7 +61,7 @@ pp =
|
|||
-- Workspaces & screens {{{
|
||||
|
||||
-- Shift to workspace and view workspace
|
||||
shiftAndView id = doF (W.view id) <> doF (W.shift id)
|
||||
shiftAndView = doF . liftM2 (.) W.greedyView W.shift
|
||||
|
||||
-- }}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue