mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
feat(scripts): dmenu-emoji
This commit is contained in:
@@ -101,7 +101,6 @@
|
||||
# nur.repos.kmein.python3Packages.spotify-cli-linux
|
||||
youtubeDL
|
||||
bc # calculator
|
||||
fzf
|
||||
pass
|
||||
gnupg
|
||||
scripts.favicon
|
||||
@@ -113,6 +112,7 @@
|
||||
scripts.n
|
||||
scripts.vf
|
||||
scripts.vg
|
||||
scripts.emoji-menu
|
||||
scripts.fkill
|
||||
scripts.wttr
|
||||
# kmein.slide
|
||||
|
||||
@@ -4,6 +4,27 @@ let
|
||||
makeScript = { binPath ? [], name, src }: pkgs.writeScriptBin name (builtins.readFile src);
|
||||
in
|
||||
{
|
||||
# https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
||||
emoji-menu =
|
||||
let emoji-file = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
|
||||
sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
|
||||
};
|
||||
in with pkgs; writers.writeDashBin "emoji-menu" ''
|
||||
PATH=${makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
|
||||
chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//")
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
xdotool key Shift+Insert
|
||||
else
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
||||
'';
|
||||
|
||||
instaget = makeScript {
|
||||
binPath = [ pkgs.jq pkgs.curl pkgs.gnugrep ];
|
||||
src = ./instaget.sh;
|
||||
|
||||
Reference in New Issue
Block a user