mirror of
https://github.com/kmein/niveum
synced 2026-03-18 19:11:08 +01:00
move to wayland
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
dmenu,
|
||||
gawk,
|
||||
libnotify,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
khard,
|
||||
}:
|
||||
writers.writeDashBin "emailmenu" ''
|
||||
@@ -16,11 +16,11 @@ writers.writeDashBin "emailmenu" ''
|
||||
dmenu
|
||||
gawk
|
||||
libnotify
|
||||
xclip
|
||||
wl-clipboard
|
||||
]
|
||||
}
|
||||
chosen=$(${khard}/bin/khard email --parsable | awk '!seen[$0]++' | dmenu -i -p 📧 -1 -l 10 | tee --append "$history_file" | cut -f1)
|
||||
[ "$chosen" != "" ] || exit
|
||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||
echo "$chosen" | tr -d '\n' | wl-copy
|
||||
notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." &
|
||||
''
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
curl,
|
||||
gnused,
|
||||
coreutils,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
libnotify,
|
||||
writers,
|
||||
options ? { },
|
||||
@@ -17,14 +17,6 @@ let
|
||||
{
|
||||
imports = [ options ];
|
||||
options = {
|
||||
selection = lib.mkOption {
|
||||
default = "clipboard";
|
||||
type = lib.types.enum [
|
||||
"primary"
|
||||
"secondary"
|
||||
"clipboard"
|
||||
];
|
||||
};
|
||||
dmenu = lib.mkOption {
|
||||
default = "${dmenu}/bin/dmenu -i -p klem";
|
||||
type = lib.types.path;
|
||||
@@ -49,7 +41,7 @@ in
|
||||
writers.writeDashBin "klem" ''
|
||||
set -efu
|
||||
|
||||
${xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
${wl-clipboard}/bin/wl-paste \
|
||||
| case $(echo "${lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)}" | ${cfg.dmenu}) in
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (option: script: ''
|
||||
@@ -58,7 +50,7 @@ writers.writeDashBin "klem" ''
|
||||
)}
|
||||
*) ${coreutils}/bin/cat ;;
|
||||
esac \
|
||||
| ${xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
| ${wl-clipboard}/bin/wl-copy
|
||||
|
||||
${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
''
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
executableName ? "mpv-radio",
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes",
|
||||
mpvCommand ? "${mpv}/bin/mpv",
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
writers,
|
||||
mktemp,
|
||||
qrencode,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
nsxiv,
|
||||
}:
|
||||
writers.writeDashBin "qrpaste" ''
|
||||
@@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" ''
|
||||
clean() {
|
||||
rm "$file"
|
||||
}
|
||||
${qrencode}/bin/qrencode "$(${xclip}/bin/xclip -selection clipboard -out)" -o "$file"
|
||||
${qrencode}/bin/qrencode "$(${wl-clipboard}/bin/wl-paste)" -o "$file"
|
||||
${nsxiv}/bin/nsxiv "$file"
|
||||
''
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
writers,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
espeak,
|
||||
}:
|
||||
writers.writeDashBin "ttspaste" ''
|
||||
${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak
|
||||
${wl-clipboard}/bin/wl-paste | ${espeak}/bin/espeak
|
||||
''
|
||||
# curl, mpv,
|
||||
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
dmenu,
|
||||
gnused,
|
||||
libnotify,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
xdotool,
|
||||
gawk,
|
||||
fetchFromGitHub,
|
||||
@@ -113,7 +113,7 @@ writers.writeDashBin "unicodmenu" ''
|
||||
gawk
|
||||
gnused
|
||||
libnotify
|
||||
xclip
|
||||
wl-clipboard
|
||||
xdotool
|
||||
]
|
||||
}
|
||||
@@ -127,7 +127,7 @@ writers.writeDashBin "unicodmenu" ''
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||
echo "$chosen" | tr -d '\n' | wl-copy
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
xdotool key Shift+Insert
|
||||
|
||||
Reference in New Issue
Block a user