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
|
# Dotenv
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
.bash_history
|
||||||
.bash_aliases/private
|
.bash_aliases/private
|
||||||
.bashrc.d/private
|
.bashrc.d/private
|
||||||
desg/
|
desg/
|
||||||
|
|
|
@ -57,6 +57,9 @@ def code_inline():
|
||||||
def code():
|
def code():
|
||||||
return code_inline() or code_block()
|
return code_inline() or code_block()
|
||||||
|
|
||||||
|
def slugify(text):
|
||||||
|
return re.sub('\s+', '-', text.lower())
|
||||||
|
|
||||||
def linkify(text, link):
|
def linkify(text, link):
|
||||||
return f"[{text}]({link})"
|
return f"[{text}]({link})"
|
||||||
|
|
||||||
|
@ -741,6 +744,12 @@ for i in range(int(match.group(1)), int(match.group(2)) + 1):
|
||||||
`
|
`
|
||||||
endsnippet
|
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
|
snippet cp(\d+) "Comment current page (and date)" r
|
||||||
`!p snip.rv = "<!--" + datetime.now().strftime("%Y-%m-%d") + " p. " + match.group(1) + "-->"`
|
`!p snip.rv = "<!--" + datetime.now().strftime("%Y-%m-%d") + " p. " + match.group(1) + "-->"`
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import XMonad
|
import XMonad
|
||||||
import XMonad.Actions.CopyWindow (copyToAll, killAllOtherCopies)
|
import XMonad.Actions.CopyWindow (copyToAll, killAllOtherCopies)
|
||||||
import XMonad.Actions.FloatSnap
|
import XMonad.Actions.FloatSnap
|
||||||
|
import Control.Monad (liftM2)
|
||||||
import XMonad.Hooks.DynamicProperty
|
import XMonad.Hooks.DynamicProperty
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
|
@ -60,7 +61,7 @@ pp =
|
||||||
-- Workspaces & screens {{{
|
-- Workspaces & screens {{{
|
||||||
|
|
||||||
-- Shift to workspace and view workspace
|
-- 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