mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01:08 +01:00
feat(scripts): dmenu-emoji
This commit is contained in:
@@ -101,7 +101,6 @@
|
|||||||
# nur.repos.kmein.python3Packages.spotify-cli-linux
|
# nur.repos.kmein.python3Packages.spotify-cli-linux
|
||||||
youtubeDL
|
youtubeDL
|
||||||
bc # calculator
|
bc # calculator
|
||||||
fzf
|
|
||||||
pass
|
pass
|
||||||
gnupg
|
gnupg
|
||||||
scripts.favicon
|
scripts.favicon
|
||||||
@@ -113,6 +112,7 @@
|
|||||||
scripts.n
|
scripts.n
|
||||||
scripts.vf
|
scripts.vf
|
||||||
scripts.vg
|
scripts.vg
|
||||||
|
scripts.emoji-menu
|
||||||
scripts.fkill
|
scripts.fkill
|
||||||
scripts.wttr
|
scripts.wttr
|
||||||
# kmein.slide
|
# kmein.slide
|
||||||
|
|||||||
@@ -4,6 +4,27 @@ let
|
|||||||
makeScript = { binPath ? [], name, src }: pkgs.writeScriptBin name (builtins.readFile src);
|
makeScript = { binPath ? [], name, src }: pkgs.writeScriptBin name (builtins.readFile src);
|
||||||
in
|
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 {
|
instaget = makeScript {
|
||||||
binPath = [ pkgs.jq pkgs.curl pkgs.gnugrep ];
|
binPath = [ pkgs.jq pkgs.curl pkgs.gnugrep ];
|
||||||
src = ./instaget.sh;
|
src = ./instaget.sh;
|
||||||
|
|||||||
Reference in New Issue
Block a user