From 1ed6cb71685a9aee1cdb91bee661365d8ce4eba8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 11 Apr 2020 17:37:26 +0200 Subject: l: init bruellwuerfel --- lass/5pkgs/bruellwuerfel/default.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lass/5pkgs/bruellwuerfel/default.nix (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/bruellwuerfel/default.nix b/lass/5pkgs/bruellwuerfel/default.nix new file mode 100644 index 000000000..cb8f08fa8 --- /dev/null +++ b/lass/5pkgs/bruellwuerfel/default.nix @@ -0,0 +1,26 @@ +{ yarn2nix-moretea, fetchFromGitHub, nodePackages, nodejs }: let + #src = ~/src/bruellwuerfel; + src = fetchFromGitHub { + owner = "krebs"; + repo = "bruellwuerfel"; + rev = "57e20e630f732ce4e15b495ec5f9bf72a121b959"; + sha256 = "08zwwl24sq21r497a03lqpy2x10az8frrsh6d38xm92snd1yf85b"; + }; + +in yarn2nix-moretea.mkYarnModules rec { + pname = "bruellwuerfel"; + version = "1.0"; + name = "${pname}-${version}"; + packageJSON = "${src}/package.json"; + yarnLock = "${src}/yarn.lock"; + postBuild = '' + cp -r ${src}/{src,tsconfig.json} $out/ + cd $out + ${nodePackages.typescript}/bin/tsc || : + mkdir -p $out/bin + echo '#!/bin/sh' > $out/bin/bruellwuerfel + echo "export NODE_PATH=$out/dist" >> $out/bin/bruellwuerfel + echo "${nodejs}/bin/node $out/dist/index.js" >> $out/bin/bruellwuerfel + chmod +x $out/bin/bruellwuerfel + ''; +} -- cgit v1.2.3 From 843a537bd7fbedd8eb5fd61a1172dd8229440606 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 14 Apr 2020 19:49:00 +0200 Subject: l fzfmenu: show query if no match --- lass/5pkgs/fzfmenu/default.nix | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/fzfmenu/default.nix b/lass/5pkgs/fzfmenu/default.nix index bdae8ceed..a158eeaac 100644 --- a/lass/5pkgs/fzfmenu/default.nix +++ b/lass/5pkgs/fzfmenu/default.nix @@ -32,14 +32,24 @@ pkgs.writeDashBin "fzfmenu" '' done INPUT=$(${pkgs.coreutils}/bin/cat) OUTPUT="$(${pkgs.coreutils}/bin/mktemp)" - ${pkgs.rxvt_unicode}/bin/urxvt \ - -name fzfmenu -title fzfmenu \ - -e ${pkgs.dash}/bin/dash -c \ - "echo \"$INPUT\" | ${pkgs.fzf}/bin/fzf \ - --history=/dev/null \ - --print-query \ - --prompt=\"$PROMPT\" \ - > \"$OUTPUT\"" 2>/dev/null + if [ -z ''${TERM+x} ]; then #check if we can print fzf in the shell + ${pkgs.rxvt_unicode}/bin/urxvtc \ + -name fzfmenu -title fzfmenu \ + -e ${pkgs.dash}/bin/dash -c \ + "echo \"$INPUT\" | ${pkgs.fzf}/bin/fzf \ + --history=/dev/null \ + --print-query \ + --prompt=\"$PROMPT\" \ + --reverse \ + > \"$OUTPUT\"" 2>/dev/null + else + echo "$INPUT" | ${pkgs.fzf}/bin/fzf \ + --history=/dev/null \ + --print-query \ + --prompt="$PROMPT" \ + --reverse \ + > "$OUTPUT" + fi ${pkgs.coreutils}/bin/tail -1 "$OUTPUT" ${pkgs.coreutils}/bin/rm "$OUTPUT" '' -- cgit v1.2.3 From 4d9d0dcd98239237c2fecb37817832ed31e17d48 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 14 Apr 2020 20:50:48 +0200 Subject: l fzfmenu: use urxvt because of arg bug --- lass/5pkgs/fzfmenu/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/fzfmenu/default.nix b/lass/5pkgs/fzfmenu/default.nix index a158eeaac..64e95d233 100644 --- a/lass/5pkgs/fzfmenu/default.nix +++ b/lass/5pkgs/fzfmenu/default.nix @@ -33,7 +33,7 @@ pkgs.writeDashBin "fzfmenu" '' INPUT=$(${pkgs.coreutils}/bin/cat) OUTPUT="$(${pkgs.coreutils}/bin/mktemp)" if [ -z ''${TERM+x} ]; then #check if we can print fzf in the shell - ${pkgs.rxvt_unicode}/bin/urxvtc \ + ${pkgs.rxvt_unicode}/bin/urxvt \ -name fzfmenu -title fzfmenu \ -e ${pkgs.dash}/bin/dash -c \ "echo \"$INPUT\" | ${pkgs.fzf}/bin/fzf \ -- cgit v1.2.3 From eeeff5f7d4c22053af549378150dcfc7af399dd1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 18 Apr 2020 14:57:21 +0200 Subject: l: init review-mail-queue --- lass/5pkgs/review-mail-queue/default.nix | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lass/5pkgs/review-mail-queue/default.nix (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/review-mail-queue/default.nix b/lass/5pkgs/review-mail-queue/default.nix new file mode 100644 index 000000000..c8c66706c --- /dev/null +++ b/lass/5pkgs/review-mail-queue/default.nix @@ -0,0 +1,39 @@ +{ pkgs }: let + + review = pkgs.writers.writeBash "review-mail" '' + mail="$1" + ${pkgs.exim}/bin/exim -Mvc "$mail" | grep -E 'Subject:|To:' + ${pkgs.exim}/bin/exim -Mvl "$mail" + while :; do + read -p 'delete?' key + case "$key" in + v*) + ${pkgs.exim}/bin/exim -Mvc "$mail" + ;; + d*) + ${pkgs.exim}/bin/exim -Mrm "$mail" + break + ;; + r*) + ${pkgs.exim}/bin/exim -Mt "$mail" + break + ;; + n*) + break + ;; + esac + done + echo '-------------------' + echo '-------------------' + echo '-------------------' + echo '-------------------' + echo '-------------------' + ''; + +in pkgs.writers.writeBashBin "review-mail" '' + for mail in $(${pkgs.exim}/bin/exim -bp \ + | ${pkgs.gnugrep}/bin/grep frozen \ + | ${pkgs.gawk}/bin/awk '{print $3}'); do + ${review} "$mail" + done +'' -- cgit v1.2.3 From 018efa847f1ae3ef1890ab11a0e4dc247aa603df Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 18 Apr 2020 14:59:17 +0200 Subject: l: init nm-dmenu --- lass/5pkgs/custom/xmonad-lass/default.nix | 5 +---- lass/5pkgs/nm-dmenu/default.nix | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 lass/5pkgs/nm-dmenu/default.nix (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index c0aef513f..5d8653721 100644 --- a/lass/5pkgs/custom/xmonad-lass/default.nix +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -150,10 +150,7 @@ myKeyMap = , ("M4-", windows copyToAll) - , ("M4-", spawn "${pkgs.writeDash "nm-dmenu" '' - export PATH=$PATH:${pkgs.dmenu}/bin:${pkgs.networkmanagerapplet}/bin - exec ${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu "$@" - ''}") + , ("M4-", spawn "${pkgs.nm-dmenu}/bin/nm-dmenu") , ("M4-", spawn "${pkgs.writeDash "paste" '' ${pkgs.coreutils}/bin/sleep 0.1 ${pkgs.xclip}/bin/xclip -o | ${pkgs.xdotool}/bin/xdotool type -f - diff --git a/lass/5pkgs/nm-dmenu/default.nix b/lass/5pkgs/nm-dmenu/default.nix new file mode 100644 index 000000000..cb47bded3 --- /dev/null +++ b/lass/5pkgs/nm-dmenu/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: + +pkgs.writeDashBin "nm-dmenu" '' + export PATH=$PATH:${pkgs.dmenu}/bin:${pkgs.networkmanagerapplet}/bin + exec ${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu "$@" +'' -- cgit v1.2.3 From eb15765624036550a9b1d9186bbadea5d937ffd8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 18 Apr 2020 14:59:35 +0200 Subject: l xmonad: use upstream writers --- lass/5pkgs/custom/xmonad-lass/default.nix | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index 5d8653721..f9d73c139 100644 --- a/lass/5pkgs/custom/xmonad-lass/default.nix +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -1,16 +1,10 @@ { config, pkgs, ... }: -pkgs.writeHaskellPackage "xmonad-lass" { - executables.xmonad = { - extra-depends = [ - "containers" - "extra" - "unix" - "X11" - "xmonad" - "xmonad-contrib" - "xmonad-stockholm" - ]; - text = /* haskell */ '' +pkgs.writers.writeHaskellBin "xmonad" { + libraries = with pkgs.haskellPackages; [ + extra + xmonad-stockholm + ]; +} /* haskell */ '' {-# LANGUAGE LambdaCase #-} @@ -220,6 +214,4 @@ gridConfig = def allWorkspaceNames :: W.StackSet i l a sid sd -> X [i] allWorkspaceNames ws = return $ map W.tag (W.hidden ws ++ (map W.workspace $ W.visible ws)) ++ [W.tag $ W.workspace $ W.current ws] - ''; - }; -} +'' -- cgit v1.2.3 From a50494cc5a192161151cce84716666d205873fd5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 21 Apr 2020 14:24:14 +0200 Subject: l emot-menu: add more --- lass/5pkgs/emot-menu/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/emot-menu/default.nix b/lass/5pkgs/emot-menu/default.nix index d5d84e456..440e160d0 100644 --- a/lass/5pkgs/emot-menu/default.nix +++ b/lass/5pkgs/emot-menu/default.nix @@ -18,6 +18,9 @@ ζ | zeta (╯°□°)╯ ┻━┻ | table flip (」゜ロ゜)」 | why woot +(_゜_゜_) | gloom I see you +༼ ༎ຶ ෴ ༎ຶ༽ | sad +(\/) (°,,,,°) (\/) | krebs ''; in -- cgit v1.2.3 From 935552166a558002501494ab3eb358c86875b85b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 21 Apr 2020 17:17:42 +0200 Subject: l xmonad: follow rename of urxvt pkg --- lass/5pkgs/custom/xmonad-lass/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index f9d73c139..e1c45598f 100644 --- a/lass/5pkgs/custom/xmonad-lass/default.nix +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -56,7 +56,7 @@ instance UrgencyHook LibNotifyUrgencyHook where safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx] myTerm :: FilePath -myTerm = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc" +myTerm = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc" myFont :: String myFont = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1" -- cgit v1.2.3