summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/common/ytclipo2
-rwxr-xr-xbin/extra/append2mpv30
-rwxr-xr-xbin/extra/sgimg6
-rw-r--r--config/essentials/nvim/lua/user/zk.lua5
-rw-r--r--config/essentials/zsh/.zshrc1
-rw-r--r--config/essentials/zsh/aliases.sh19
-rw-r--r--config/essentials/zsh/functions.zsh13
-rw-r--r--config/wayland/mako/config2
8 files changed, 64 insertions, 14 deletions
diff --git a/bin/common/ytclipo b/bin/common/ytclipo
index 5d86c3f..8997539 100755
--- a/bin/common/ytclipo
+++ b/bin/common/ytclipo
@@ -23,5 +23,5 @@ yt-dlp "$inp" \
-f "b" \
-S "res:1080" \
-P "$HOME/vids/youtube/" \
- -o "%(channel)s - %(title)s.%(ext)s"
+ -o "%(channel)s/%(title)s.%(ext)s"
notify-send "ytclipo" "finished downloading." || :
diff --git a/bin/extra/append2mpv b/bin/extra/append2mpv
new file mode 100755
index 0000000..28c3916
--- /dev/null
+++ b/bin/extra/append2mpv
@@ -0,0 +1,30 @@
+#!/bin/sh
+IPC="/tmp/mpvsocket"
+
+die () { >&2 printf '%s\n' "$@"; exit 1; }
+append_to_mpv()
+{
+ file="$(readlink -f "$1")"
+ if [ ! -r "$file" ]
+ then
+ >&2 printf '%s\n' "'$file' not found"
+ return
+ fi
+
+ echo '{ "command": ["loadfile", "'"$file"'", "append"] }' |
+ socat - "$IPC"
+}
+
+[ -S "$IPC" ] || die "$IPC is not a socket or doesn't exist"
+which socat > /dev/null || exit 1
+
+
+if [ -t 0 ]
+then
+ append_to_mpv "$1"
+else
+ while read -r file
+ do
+ append_to_mpv "$file"
+ done
+fi
diff --git a/bin/extra/sgimg b/bin/extra/sgimg
new file mode 100755
index 0000000..7c1823c
--- /dev/null
+++ b/bin/extra/sgimg
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+imv "$(find ~/.local/share/gurk/ -type f -printf "%A@\t%p\n" |
+ sort -n |
+ tail -n 1 |
+ cut -f 2-)"
diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua
index 98476ca..3641025 100644
--- a/config/essentials/nvim/lua/user/zk.lua
+++ b/config/essentials/nvim/lua/user/zk.lua
@@ -41,6 +41,11 @@ require("telekasten").setup({
media_previewer = "telescope-media-files",
follow_url_fallback = nil,
vaults = {
+ Ideas = {
+ home = home .. "/" .. "Ideas",
+ template_new_note = home .. "/" .. "templates/new_note.md",
+ new_note_filename = "title",
+ },
Driving = {
home = home .. "/" .. "Driving",
template_new_note = home .. "/" .. "templates/new_note.md",
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index db93ac9..1de3e91 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -30,7 +30,6 @@ zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f'
zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f'
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
# show a 'ls -a' like outptut when listing files
-zstyle ':completion:*' file-list all
zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS}
# Group completions by categories
diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh
index 2596285..a166513 100644
--- a/config/essentials/zsh/aliases.sh
+++ b/config/essentials/zsh/aliases.sh
@@ -191,15 +191,17 @@ alias smcr='systemctl restart'
alias smcrl='systemctl reload'
alias smcd='systemctl daemon-reload'
alias smce='systemctl edit'
+alias smcen='systemctl enable'
#user
alias smcu='systemctl --user'
-alias smcus='systemctl status --user'
-alias smcust='systemctl start --user'
-alias smcuS='systemctl stop --user'
-alias smcur='systemctl restart --user'
-alias smcurl='systemctl reload --user'
-alias smcud='systemctl daemon-reload --user'
-alias smcue='systemctl edit --user'
+alias smcus='systemctl --user status'
+alias smcust='systemctl --user start'
+alias smcuS='systemctl --user stop'
+alias smcur='systemctl --user restart'
+alias smcurl='systemctl --user reload'
+alias smcud='systemctl --user daemon-reload'
+alias smcue='systemctl --user edit'
+alias smcuen='systemctl --user enable'
#doas
alias dsmc='doas systemctl'
alias dsmcs='doas systemctl status'
@@ -209,6 +211,7 @@ alias dsmcr='doas systemctl restart'
alias dsmcrl='doas systemctl reload'
alias dsmcd='doas systemctl daemon-reload'
alias dsmce='doas systemctl edit'
+alias dsmcen='doas systemctl enable'
# virtualbox aliases
alias vbm='vboxmanage'
@@ -279,7 +282,7 @@ alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp"
alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"'
alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c'
alias fzps='fzf --print0 | xargs -0I{}'
-alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s - %(title)s.%(ext)s"'
+alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"'
# docker aliases
alias dcb='docker build'
diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh
index 4145813..da8bf12 100644
--- a/config/essentials/zsh/functions.zsh
+++ b/config/essentials/zsh/functions.zsh
@@ -242,10 +242,17 @@ pacsize()
mime-default ()
{
- logn "Setting '$1' as default for its mimetypes"
- grep "MimeType=" /usr/share/applications/"$1".desktop |
+ local mime
+ [ "${mime:=$1}" ] ||
+ mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' |
+ sed 's/\.desktop$//' |
+ fzf)"
+
+ logn "Setting '$mime' as default for its mimetypes"
+ [ "$mime" ] || exit 1
+ grep "MimeType=" /usr/share/applications/"$mime".desktop |
cut -d '=' -f 2- | tr ';' '\0' |
- xargs -0I{} xdg-mime default "$1".desktop "{}"
+ xargs -0I{} xdg-mime default "$mime".desktop "{}"
logn "Done."
}
diff --git a/config/wayland/mako/config b/config/wayland/mako/config
index 4380506..06eed6e 100644
--- a/config/wayland/mako/config
+++ b/config/wayland/mako/config
@@ -24,6 +24,6 @@ default-timeout=0
default-timeout=2000
group-by=category
-[app-name=gurk]
+[summary=lolaa]
# 45887 = 70%
on-notify=exec paplay --volume=45887 ~/.local/share/sounds/ring1.ogg