This repository has no description
0

Configure Feed

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

superconfig / tools / menu.nix
1.0 kB 40 lines
1{ ... }: 2{ 3 perSystem = 4 { pkgs, ... }: 5 { 6 packages.menu = 7 if pkgs.stdenv.hostPlatform.isDarwin then 8 (pkgs.writeShellApplication { 9 name = "menu"; 10 runtimeInputs = [ 11 pkgs.choose-gui 12 ]; 13 text = '' 14 set -efu 15 # TODO check if a terminal is available and use fzf in that case 16 exec choose "$@" 17 ''; 18 }) 19 else if pkgs.stdenv.hostPlatform.isLinux then 20 (pkgs.writeShellApplication { 21 name = "menu"; 22 runtimeInputs = [ 23 pkgs.rofi 24 pkgs.wofi 25 ]; 26 text = '' 27 set -efu 28 # TODO check if a terminal is available and use fzf in that case 29 if [[ -n $WAYLAND_DISPLAY ]]; then 30 exec wofi "$@" 31 elif [[ -n $DISPLAY ]]; then 32 exec rofi "$@" 33 fi 34 ''; 35 36 }) 37 else 38 throw "unsupported system"; 39 }; 40}