summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'lass/5pkgs')
-rw-r--r--lass/5pkgs/bruellwuerfel/default.nix26
-rw-r--r--lass/5pkgs/custom/xmonad-lass/default.nix29
-rw-r--r--lass/5pkgs/emot-menu/default.nix3
-rw-r--r--lass/5pkgs/fzfmenu/default.nix26
-rw-r--r--lass/5pkgs/nm-dmenu/default.nix6
-rw-r--r--lass/5pkgs/review-mail-queue/default.nix39
6 files changed, 101 insertions, 28 deletions
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
+ '';
+}
diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix
index c0aef513f..e1c45598f 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 #-}
@@ -62,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"
@@ -150,10 +144,7 @@ myKeyMap =
, ("M4-<F2>", windows copyToAll)
- , ("M4-<F4>", spawn "${pkgs.writeDash "nm-dmenu" ''
- export PATH=$PATH:${pkgs.dmenu}/bin:${pkgs.networkmanagerapplet}/bin
- exec ${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu "$@"
- ''}")
+ , ("M4-<F4>", spawn "${pkgs.nm-dmenu}/bin/nm-dmenu")
, ("M4-<Insert>", spawn "${pkgs.writeDash "paste" ''
${pkgs.coreutils}/bin/sleep 0.1
${pkgs.xclip}/bin/xclip -o | ${pkgs.xdotool}/bin/xdotool type -f -
@@ -223,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]
- '';
- };
-}
+''
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
diff --git a/lass/5pkgs/fzfmenu/default.nix b/lass/5pkgs/fzfmenu/default.nix
index bdae8ceed..64e95d233 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/urxvt \
+ -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"
''
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 "$@"
+''
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
+''