This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

configs: remove klem

+1 -133
-1
modules/default.nix
··· 1 1 _: { 2 2 imports = [ 3 - ./klem.nix 4 3 ./screenlock.nix 5 4 ./fetchWallpaper.nix 6 5 ./sync-containers3.nix
-95
modules/klem.nix
··· 1 - { 2 - self, 3 - config, 4 - lib, 5 - pkgs, 6 - ... 7 - }: 8 - with lib; 9 - let 10 - cfg = config.lass.klem; 11 - slib = self.inputs.stockholm.lib; 12 - in 13 - { 14 - options.lass.klem = mkOption { 15 - default = { }; 16 - type = types.attrsOf ( 17 - types.submodule ( 18 - { config, ... }: 19 - { 20 - options = { 21 - target = mkOption { 22 - default = ".*"; 23 - description = '' 24 - regex of valid targets 25 - can be shown with xclip -selection clipboard -t TARGETS 26 - the first hit is taken as target argument 27 - ''; 28 - type = types.str; 29 - }; 30 - script = mkOption { 31 - description = '' 32 - file to run if entry is selected 33 - ''; 34 - type = types.path; 35 - }; 36 - label = mkOption { 37 - default = config._module.args.name; 38 - description = '' 39 - label to show in dmenu for this script 40 - ''; 41 - type = types.str; 42 - }; 43 - }; 44 - } 45 - ) 46 - ); 47 - }; 48 - config = 49 - let 50 - klem = pkgs.writers.writeDashBin "klem" '' 51 - set -x 52 - 53 - labels="" 54 - # match filetype against patterns 55 - ${concatMapStringsSep "\n" (script: '' 56 - ${pkgs.xclip}/bin/xclip -selection clipboard -target TARGETS -out \ 57 - | ${pkgs.gnugrep}/bin/grep -q '${script.target}' 58 - if [ $? -eq 0 ]; then 59 - labels="$labels:${script.label}" 60 - fi 61 - '') (attrValues cfg)} 62 - 63 - #remove empty line, feed into dmenu 64 - script=$(echo "$labels" \ 65 - | ${pkgs.gnused}/bin/sed 's/^://;s/:/\n/g' \ 66 - | ${pkgs.dmenu}/bin/dmenu) 67 - 68 - #run the chosen script 69 - case $script in 70 - ${concatMapStringsSep "\n" ( 71 - script: 72 - slib.indent '' 73 - ${script.label}) 74 - target=$(${pkgs.xclip}/bin/xclip -selection clipboard -target TARGETS -out \ 75 - | ${pkgs.gnugrep}/bin/grep '${script.target}' \ 76 - | ${pkgs.gnugrep}/bin/grep -v TARGETS \ 77 - | ${pkgs.coreutils}/bin/head -1) 78 - ${pkgs.xclip}/bin/xclip -selection clipboard -target "$target" -out \ 79 - | ${script.script} \ 80 - | ${pkgs.xclip}/bin/xclip -selection clipboard -in 81 - ;; 82 - '' 83 - ) (attrValues cfg)} 84 - esac 85 - ''; 86 - in 87 - mkIf (cfg != { }) { 88 - environment.systemPackages = [ klem ]; 89 - nixpkgs.overlays = [ 90 - (_self: _super: { 91 - klem = klem; 92 - }) 93 - ]; 94 - }; 95 - }
+1 -36
configs/desktops/lib/x11.nix
··· 91 91 zathura 92 92 flameshot 93 93 (pkgs.writers.writeDashBin "screenshot" '' 94 - set -efu 95 - 96 - ${pkgs.flameshot}/bin/flameshot gui && 97 - ${pkgs.klem}/bin/klem 94 + ${pkgs.flameshot}/bin/flameshot gui 98 95 '') 99 96 (pkgs.writers.writeDashBin "IM" '' 100 97 ${pkgs.mosh}/bin/mosh green.r -- tmux new-session -A -s IM -- weechat ··· 137 134 dmenu = pkgs.writers.writeDashBin "dmenu" '' 138 135 ${stockholmPkgs.fzfmenu}/bin/fzfmenu "$@" 139 136 ''; 140 - }; 141 - 142 - lass.klem = { 143 - kpaste.script = pkgs.writers.writeDash "kpaste-wrapper" '' 144 - ${stockholmPkgs.kpaste}/bin/kpaste \ 145 - | ${pkgs.coreutils}/bin/tail -1 \ 146 - | ${pkgs.coreutils}/bin/tr -d '\r\n' 147 - ''; 148 - go = { 149 - target = "STRING"; 150 - script = "${stockholmPkgs.goify}/bin/goify"; 151 - }; 152 - "go.lassul.us" = { 153 - target = "STRING"; 154 - script = pkgs.writers.writeDash "go.lassul.us" '' 155 - export GO_HOST='go.lassul.us' 156 - ${stockholmPkgs.goify}/bin/goify 157 - ''; 158 - }; 159 - qrcode = { 160 - target = "image"; 161 - script = pkgs.writers.writeDash "zbar" '' 162 - ${pkgs.zbar}/bin/zbarimg -q --raw - 163 - ''; 164 - }; 165 - ocr = { 166 - target = "image"; 167 - script = pkgs.writers.writeDash "gocr" '' 168 - ${pkgs.netpbm}/bin/pngtopnm - \ 169 - | ${pkgs.gocr}/bin/gocr - 170 - ''; 171 - }; 172 137 }; 173 138 174 139 services.clipmenu.enable = true;
-1
configs/desktops/xmonad/default.nix
··· 157 157 , ("M4-c", spawn "/run/current-system/sw/bin/emacsclient -c") 158 158 -- , ("M4-c", unGrab) 159 159 , ("M4-f", floatNext True) 160 - , ("M4-b", spawn "/run/current-system/sw/bin/klem") 161 160 162 161 , ("M4-c", defaultCommands >>= runCommand) 163 162 , ("M4-v", withWorkspace autoXPConfig (windows . W.greedyView))