Compare commits

..

No commits in common. "d69a0f40e163a10b0e36eb8a3fa387cf30be49f1" and "930cbbc47cbff86a3dfccf16334702be3ea9de23" have entirely different histories.

21 changed files with 51 additions and 104 deletions

View file

@ -24,7 +24,6 @@ vcs = "~"
[nvim.files] [nvim.files]
"nvim/.config/nvim/spell/de.utf-8.add.spl" = { target = "~/.config/nvim/spell/de.utf-8.add.spl", type = "symbolic" } "nvim/.config/nvim/spell/de.utf-8.add.spl" = { target = "~/.config/nvim/spell/de.utf-8.add.spl", type = "symbolic" }
"nvim/.config/nvim/spell/en.utf-8.add.spl" = { target = "~/.config/nvim/spell/en.utf-8.add.spl", type = "symbolic" } "nvim/.config/nvim/spell/en.utf-8.add.spl" = { target = "~/.config/nvim/spell/en.utf-8.add.spl", type = "symbolic" }
"nvim/.config/nvim/snippets/quarto.snippets" = { target = "~/.config/nvim/snippets/quarto.snippets", type = "symbolic" }
nvim = "~" nvim = "~"
[scripts.files] [scripts.files]

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
# relink all stowed files from anywhere # relink all stowed files from anywhere
# grepping is to remove meaningless stderr lines until this bug is fixed: # grepping is to remove meaningless stderr lines until this bug is fixed:
# https://github.com/aspiers/stow/issues/65 # https://github.com/aspiers/stow/issues/65
@ -10,8 +10,6 @@
# to customize this to your own needs, change the `push folder` to the # to customize this to your own needs, change the `push folder` to the
# location of your dotfiles (stow) repository # location of your dotfiles (stow) repository
dotlink() { alias dotlink="pushd ~/.dotfiles;\
cd ~/.dotfiles || return dotter deploy;\
dotter "${@:-deploy}" popd"
cd "$OLDPWD" || return
}

View file

@ -4,6 +4,12 @@
if [ -d "$TURNSTILE_ENV_DIR" ]; then if [ -d "$TURNSTILE_ENV_DIR" ]; then
echo "$DISPLAY" >"$TURNSTILE_ENV_DIR/DISPLAY" echo "$DISPLAY" >"$TURNSTILE_ENV_DIR/DISPLAY"
echo "$WAYLAND_DISPLAY" >"$TURNSTILE_ENV_DIR/WAYLAND_DISPLAY" echo "$WAYLAND_DISPLAY" >"$TURNSTILE_ENV_DIR/WAYLAND_DISPLAY"
echo "ADDING KEYCHAIN TO ENV"
keychain --eval --quiet --agents ssh,gpg C414FF88A557F29AFEF76C7E73BA40D5AFAF49C9
echo "$SSH_AUTH_SOCK">"$TURNSTILE_ENV_DIR/SSH_AUTH_SOCK"
echo "$SSH_AGENT_PID">"$TURNSTILE_ENV_DIR/SSH_AGENT_PID"
echo "$GPG_AGENT_INFO">"$TURNSTILE_ENV_DIR/GPG_AGENT_INFO"
echo "DONE ADDING KEYCHAIN TO ENV"
fi fi
mod="Mod4" mod="Mod4"

View file

@ -24,7 +24,7 @@
"grug-far.nvim": { "branch": "main", "commit": "3e72486d0123d08f5b253847ab6e00ca12353242" }, "grug-far.nvim": { "branch": "main", "commit": "3e72486d0123d08f5b253847ab6e00ca12353242" },
"helpview.nvim": { "branch": "main", "commit": "49e8d4782ae73274a35d606fde2844b6e958a0c7" }, "helpview.nvim": { "branch": "main", "commit": "49e8d4782ae73274a35d606fde2844b6e958a0c7" },
"hunk.nvim": { "branch": "master", "commit": "b475ba0011e4b8ef7d7ddecd9764ee1a5f41366d" }, "hunk.nvim": { "branch": "master", "commit": "b475ba0011e4b8ef7d7ddecd9764ee1a5f41366d" },
"image.nvim": { "branch": "master", "commit": "a4638ec549c6aa56264cb0371255192ff37a8a90" }, "image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" },
"img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" }, "img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" },
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" }, "jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },

View file

@ -9,7 +9,7 @@
local nushell = { lsp = { nushell = {} }, ts = { "nu" } } local nushell = { lsp = { nushell = {} }, ts = { "nu" } }
if vim.fn.executable("nufmt") == 1 then if vim.fn.executable("nufmt") == 1 then
nushell.format = { nu = { "nufmt" } } nushell.format = {nu = {"nufmt"}}
end end
local languages = { local languages = {
@ -103,10 +103,7 @@ local languages = {
lint = { typescript = { "eslint_d" }, typescriptreact = { "eslint_d" } }, lint = { typescript = { "eslint_d" }, typescriptreact = { "eslint_d" } },
format = { typescript = { "prettier" }, typescriptreact = { "prettier" } }, format = { typescript = { "prettier" }, typescriptreact = { "prettier" } },
}, },
typst = { typst = { lsp = { tinymist = { settings = { formatterMode = "typstyle" } } }, ts = { "typst" } },
lsp = { tinymist = { settings = { formatterMode = "typstyle" } } },
ts = { "typst" },
},
vue = { format = { vue = { "prettier", "rustywind" } } }, vue = { format = { vue = { "prettier", "rustywind" } } },
yaml = { lsp = { yamlls = {}, ansiblels = {} }, ts = { "yaml" }, format = { yaml = { "prettier" } } }, yaml = { lsp = { yamlls = {}, ansiblels = {} }, ts = { "yaml" }, format = { yaml = { "prettier" } } },
zsh = { format = { zsh = { "shfmt" } } }, zsh = { format = { zsh = { "shfmt" } } },

View file

@ -55,9 +55,7 @@ return {
-- image display -- image display
{ {
-- "3rd/image.nvim", -- using Fork until https://github.com/3rd/image.nvim/pull/280 is merged "3rd/image.nvim",
"UnaTried/image.nvim",
name = "image.nvim",
version = false, version = false,
dependencies = { dependencies = {
{ "leafo/magick" }, -- luarock, ensure global luarock51 dependency { "leafo/magick" }, -- luarock, ensure global luarock51 dependency
@ -73,8 +71,12 @@ return {
only_render_image_at_cursor = true, only_render_image_at_cursor = true,
filetypes = { "markdown", "vimwiki", "quarto" }, filetypes = { "markdown", "vimwiki", "quarto" },
}, },
neorg = { only_render_image_at_cursor = true }, neorg = {
typst = { only_render_image_at_cursor = true }, only_render_image_at_cursor = true,
},
typst = {
only_render_image_at_cursor = true,
},
}, },
}, },
config = function(_, opts) config = function(_, opts)
@ -104,7 +106,7 @@ return {
"benlubas/molten-nvim", "benlubas/molten-nvim",
dependencies = { dependencies = {
{ "willothy/wezterm.nvim", config = true }, { "willothy/wezterm.nvim", config = true },
{ "image.nvim", optional = true }, { "3rd/image.nvim", optional = true },
}, },
build = ":UpdateRemotePlugins", build = ":UpdateRemotePlugins",
init = function() init = function()

View file

@ -40,6 +40,3 @@ c.aliases["cookie-block"] = "spawn --userscript qute-cookie-block"
# open last downloads in dmenu-like # open last downloads in dmenu-like
c.aliases["recent-downloads"] = "spawn --userscript recently-downloaded" c.aliases["recent-downloads"] = "spawn --userscript recently-downloaded"
# annotate with hypothesis
c.aliases["hypothesis"] = "jseval (function(){window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s)})();'hypothesis enabled'"

View file

@ -86,7 +86,6 @@ config.bind('"p', "send-to-scihub", mode="normal") # view current page doi on s
config.bind(";p", "hint links run send-to-scihub") # view linked doi on scihub config.bind(";p", "hint links run send-to-scihub") # view linked doi on scihub
config.bind(lleader + "r", "readable", mode="normal") config.bind(lleader + "r", "readable", mode="normal")
config.bind(lleader + "a", "hypothesis", mode="normal")
# set stylesheets for the browser to use # set stylesheets for the browser to use
config.bind( config.bind(

View file

@ -12,16 +12,6 @@
# Configure your shaarli instance with this: # Configure your shaarli instance with this:
INSTANCE="https://links.martyoeh.me" INSTANCE="https://links.martyoeh.me"
_open() {
if command -v open >/dev/null 2>&1; then
open "$1" &
elif command -v mimeo >/dev/null 2>&1; then
mimeo "$1" &
else
xdg-open "$1" &
fi
}
# send page to shaarli instance and open the 'post' page to edit it # send page to shaarli instance and open the 'post' page to edit it
if [ "$#" -gt 0 ]; then if [ "$#" -gt 0 ]; then
BM="$INSTANCE/bookmarks/new?url=$*&auto_close" BM="$INSTANCE/bookmarks/new?url=$*&auto_close"
@ -29,8 +19,9 @@ else
BM="$INSTANCE/bookmarks/new?url=$QUTE_URL&auto_close" BM="$INSTANCE/bookmarks/new?url=$QUTE_URL&auto_close"
fi fi
if [ "$QUTE_FIFO" != "" ]; then if [ -n "$QUTE_FIFO" ]; then
echo "open -t -r $BM" >>"$QUTE_FIFO" echo "open -t -r $BM" >>"$QUTE_FIFO"
else else
_open "$BM" xdg-open "$BM"
fi fi

View file

@ -21,7 +21,6 @@
# continue surfing like normal, only that you can now also access # continue surfing like normal, only that you can now also access
# any gemini pages as if they were part of the normal http protocol. # any gemini pages as if they were part of the normal http protocol.
import shutil
import cgi import cgi
import html import html
import os import os
@ -380,10 +379,7 @@ def open_url(url: str, open_args: str) -> None:
with open(fifo, "w") as qfifo: with open(fifo, "w") as qfifo:
qfifo.write(f"open {open_args} {to_open}") qfifo.write(f"open {open_args} {to_open}")
return return
if shutil.which("mimeo"): os.system(f"xdg-open {to_open}")
_ = os.system(f"mimeo {to_open}")
elif shutil.which("xdg-open"):
_ = os.system(f"xdg-open {to_open}")
if __name__ == "__main__": if __name__ == "__main__":

View file

@ -12,16 +12,6 @@
# Configure your shaarli instance with this: # Configure your shaarli instance with this:
SHAARLI_INSTANCE="https://links.martyoeh.me" SHAARLI_INSTANCE="https://links.martyoeh.me"
_open() {
if command -v open >/dev/null 2>&1; then
open "$1" &
elif command -v mimeo >/dev/null 2>&1; then
mimeo "$1" &
else
xdg-open "$1" &
fi
}
# send page to shaarli instance and open the 'post' page to edit it # send page to shaarli instance and open the 'post' page to edit it
if [ "$#" -gt 0 ]; then if [ "$#" -gt 0 ]; then
BM="$SHAARLI_INSTANCE/?post=$*" BM="$SHAARLI_INSTANCE/?post=$*"
@ -32,6 +22,6 @@ fi
if [ -n "$QUTE_FIFO" ]; then if [ -n "$QUTE_FIFO" ]; then
echo "open -t -r $BM" >>"$QUTE_FIFO" echo "open -t -r $BM" >>"$QUTE_FIFO"
else else
_open "$BM" xdg-open "$BM"
fi fi

View file

@ -12,16 +12,6 @@
# Configure your wallabag instance with this: # Configure your wallabag instance with this:
WALLABAG_INSTANCE="https://read.martyoeh.me" WALLABAG_INSTANCE="https://read.martyoeh.me"
_open() {
if command -v open >/dev/null 2>&1; then
open "$1" &
elif command -v mimeo >/dev/null 2>&1; then
mimeo "$1" &
else
xdg-open "$1" &
fi
}
# only works for wallabag v2.* # only works for wallabag v2.*
if [ "$#" -gt 0 ]; then if [ "$#" -gt 0 ]; then
BM="$WALLABAG_INSTANCE/bookmarklet?url=$*" BM="$WALLABAG_INSTANCE/bookmarklet?url=$*"
@ -32,5 +22,5 @@ fi
if [ -n "$QUTE_FIFO" ]; then if [ -n "$QUTE_FIFO" ]; then
echo "open -b -r $BM" >>"$QUTE_FIFO" echo "open -b -r $BM" >>"$QUTE_FIFO"
else else
_open "$BM" xdg-open "$BM"
fi fi

View file

@ -100,14 +100,19 @@ if [ -z "$line" ]; then
exit 0 exit 0
fi fi
msg info "file is $line"
path="$DOWNLOAD_DIR/$line" path="$DOWNLOAD_DIR/$line"
filetype=$(xdg-mime query filetype "$path")
application=$(xdg-mime query default "$filetype")
msg info "Opening »$line«." if [ -z "$application" ]; then
die "Do not know how to open »$line« of type $filetype"
fi
if command -v open >/dev/null 2>&1; then msg info "Opening »$line« (of type $filetype) with ${application%.desktop}"
if type open >/dev/null 2>&1; then
open "$path" & open "$path" &
elif command -v mimeo >/dev/null 2>&1; then
mimeo "$path" &
else else
xdg-open "$path" & xdg-open "$path" &
fi fi

3
services/sv/_example/log/run Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env sh
exec svlogd -ttt /home/marty/myservice/logs

4
services/sv/_example/run Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh -e
exec 2>&1
exec /home/marty/myservice/example-service.sh

View file

@ -1,3 +0,0 @@
#!/usr/bin/env sh
exec vlogger -t loadenv -p daemon

View file

@ -1,29 +0,0 @@
#!/bin/sh
# Loadenv service ensures turstile environment gets populated with all
# profile-loaded environment variables.
#
# To use this service with other turnstile user services, ensure it gets
# started before anything else is started by putting it into `turnstile-ready`
# service conf as a core service.
#
# Will also load the profile file from a custom XDG-compliant
# ~/.config/sh/profile directory before falling back to the home directory
# ~/.profile file.
# This location can be manually overriden by putting the following into the
# service conf file:
# XDG_PROFILE=/my/location/somewhere/profile
[ -r ./conf ] && . ./conf
if [ -e "$HOME/.config/sh/profile" ]; then
XDG_PROFILE="${XDG_PROFILE:-HOME/.config/sh/profile}"
fi
ENV=${XDG_PROFILE:-$HOME/.profile} sh -i -c env | while IFS= read -r line; do
value=${line#*=}
name=${line%%=*}
echo "$value" > "$TURNSTILE_ENV_DIR/$name"
done
exec 2>&1
exec pause

View file

@ -2,5 +2,9 @@
[ -r ./conf ] && . ./conf [ -r ./conf ] && . ./conf
if [ -d "$TURNSTILE_ENV_DIR" ]; then
echo "$HOME/.local/bin:$PATH" > "$TURNSTILE_ENV_DIR/PATH"
fi
exec 2>&1 exec 2>&1
exec chpst -e "$TURNSTILE_ENV_DIR" river -log-level warning exec chpst -e "$TURNSTILE_ENV_DIR" river -log-level warning

View file

@ -1 +1 @@
core_services="loadenv dbus" core_services="dbus"

View file

@ -243,7 +243,7 @@ video-reverse=false
# Your audio viewer. # Your audio viewer.
# default=xdg-open # default=xdg-open
audio-viewer=mimeo audio-viewer=xdg-open
# Open the audio viewer in the same terminal as toot. Only for terminal based # Open the audio viewer in the same terminal as toot. Only for terminal based
# viewers. # viewers.
@ -261,7 +261,7 @@ audio-reverse=false
# Your web browser. # Your web browser.
# default=xdg-open # default=xdg-open
link-viewer=mimeo link-viewer=xdg-open
# Open the browser in the same terminal as toot. Only for terminal based # Open the browser in the same terminal as toot. Only for terminal based
# browsers. # browsers.

View file

@ -63,9 +63,7 @@ alias l = ls
alias cl = clear alias cl = clear
alias md = mkdir alias md = mkdir
def --env mcd [path: path] { def --env mcd [path: one_of(string glob)] {
mkdir $path mkdir $path
cd $path cd $path
} }
alias v = nvim