diff options
| -rw-r--r-- | linking_example.sh | 2 | ||||
| -rwxr-xr-x | public/.local/bin/dmenu-snippet.sh | 17 | ||||
| -rw-r--r-- | public/.local/share/dmenu/snippet/references.wiki | 3 | ||||
| -rw-r--r-- | public/.local/share/dmenu/snippet/syntaxhighlight.wiki | 7 | ||||
| -rw-r--r-- | public/.xbindkeysrc | 8 |
5 files changed, 32 insertions, 5 deletions
diff --git a/linking_example.sh b/linking_example.sh index 2a1bc84..2c607c5 100644 --- a/linking_example.sh +++ b/linking_example.sh @@ -37,7 +37,7 @@ ln -sf $dotfiles/public/.config/zathura mkdir -p $dest/.local/share cd $dest/.local/share -ln -s $target/../public/.local/share/dmenu +ln -s $dotfiles/public/.local/share/dmenu mkdir -p $dest/code/dwm cd $dest/code/dwm diff --git a/public/.local/bin/dmenu-snippet.sh b/public/.local/bin/dmenu-snippet.sh new file mode 100755 index 0000000..46f21de --- /dev/null +++ b/public/.local/bin/dmenu-snippet.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Simple dmenu-based snippet tool that copies selected snippet to clipboard + +SNIPPETS_DIR="$HOME/.local/share/dmenu/snippet" +[ ! -d "$SNIPPETS_DIR" ] && mkdir -p "$SNIPPETS_DIR" + +# Select snippet file using dmenu +SNIPPET=$(ls "$SNIPPETS_DIR" | dmenu -i -l 10 -p "Select snippet:") + +# Exit if no snippet selected +[ -z "$SNIPPET" ] && exit 1 + +# Copy snippet content to clipboard +cat "$SNIPPETS_DIR/$SNIPPET" | xclip -selection clipboard + +# Notify user +notify-send "Snippet copied" "$SNIPPET copied to clipboard" diff --git a/public/.local/share/dmenu/snippet/references.wiki b/public/.local/share/dmenu/snippet/references.wiki new file mode 100644 index 0000000..518f731 --- /dev/null +++ b/public/.local/share/dmenu/snippet/references.wiki @@ -0,0 +1,3 @@ +== References == + +<references /> diff --git a/public/.local/share/dmenu/snippet/syntaxhighlight.wiki b/public/.local/share/dmenu/snippet/syntaxhighlight.wiki new file mode 100644 index 0000000..eef2530 --- /dev/null +++ b/public/.local/share/dmenu/snippet/syntaxhighlight.wiki @@ -0,0 +1,7 @@ +<syntaxhighlight lang="c"> +#include <stdio.h> +int main(int argc, char *argv[]) { + printf("Hello world!\n"); + return 0; +} +</syntaxhighlight> diff --git a/public/.xbindkeysrc b/public/.xbindkeysrc index e42ed03..b13bb79 100644 --- a/public/.xbindkeysrc +++ b/public/.xbindkeysrc @@ -147,9 +147,12 @@ "dmenu-webshortcuts.sh" Alt + w -"dmenu-emojicopy.sh" +"dmenu-emoji.sh" Alt + e +"dmenu-snippet.sh" + Alt + s + "screenshot.sh" Print @@ -198,9 +201,6 @@ "zeal" Mod4 + h -"dmenu-emoji.sh" - Mod4 + i - # Media control # ------------- |
