diff options
author | Jeschli <jeschli@gmail.com> | 2020-04-22 12:35:00 +0200 |
---|---|---|
committer | Jeschli <jeschli@gmail.com> | 2020-04-22 12:35:00 +0200 |
commit | 3c0496ec1a774c539cf10311bff821ff07ddbf01 (patch) | |
tree | 9fbafe92c3f26571bb562255d86ffcc2975216ea /lass/5pkgs | |
parent | 119a7cfe5a87323ec7231c263abc444229564a1c (diff) | |
parent | cabaf519b5970cbe5c1e57832d3bd12da4f47371 (diff) |
Merge branch 'master' of https://cgit.lassul.us/stockholm
Diffstat (limited to 'lass/5pkgs')
-rw-r--r-- | lass/5pkgs/custom/xmonad-lass/default.nix | 27 | ||||
-rw-r--r-- | lass/5pkgs/emot-menu/default.nix | 3 | ||||
-rw-r--r-- | lass/5pkgs/fzfmenu/default.nix | 2 | ||||
-rw-r--r-- | lass/5pkgs/nm-dmenu/default.nix | 6 | ||||
-rw-r--r-- | lass/5pkgs/review-mail-queue/default.nix | 39 |
5 files changed, 57 insertions, 20 deletions
diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index c0aef513f..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 #-} @@ -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 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 \ 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 +'' |