default.nix (2002B)
1 { 2 user, 3 4 imsh-clients, 5 ... 6 }: 7 { 8 home-manager.users.${user} = { 9 imports = [ 10 imsh-clients.homeManagerModules.imsh-clients 11 ]; 12 13 programs.imsh-clients = { 14 enable = true; 15 imsh-cast-monitor.waybar.enable = true; 16 }; 17 18 wayland.windowManager.hyprland.settings.bind = 19 let 20 cat = builtins.concatStringsSep " "; 21 in 22 [ 23 (cat [ 24 "$mod, A, exec, uwsm app --" 25 "imsh-shot screen --cursor --utc --copy" 26 "--output ~/pic/scr/%Y-%m-%dT%H-%M-%S.%3NZ.png" 27 ]) 28 (cat [ 29 "$mod SHIFT, A, exec, uwsm app --" 30 "imsh-shot screen --cursor --utc --copy" 31 "--output ~/pic/scr/%Y-%m-%dT%H-%M-%S.%3NZ.png" 32 "--api-key '%rbw get scrn.is/api-key' --upload" 33 ]) 34 (cat [ 35 "$mod, S, exec, uwsm app --" 36 "imsh-shot area --freeze --utc --copy" 37 "--output ~/pic/scr/%Y-%m-%dT%H-%M-%S.%3NZ.png" 38 ]) 39 (cat [ 40 "$mod SHIFT, S, exec, uwsm app --" 41 "imsh-shot area --freeze --utc --copy" 42 "--output ~/pic/scr/%Y-%m-%dT%H-%M-%S.%3NZ.png" 43 "--api-key '%rbw get scrn.is/api-key' --upload" 44 ]) 45 (cat [ 46 "$mod, D, exec, uwsm app --" 47 "imsh-shot active --cursor --utc --copy" 48 "--output ~/pic/scr/%Y-%m-%dT%H-%M-%S.%3NZ.png" 49 ]) 50 (cat [ 51 "$mod SHIFT, D, exec, uwsm app --" 52 "imsh-shot active --cursor --utc --copy" 53 "--output ~/pic/scr/%Y-%m-%dT%H-%M-%S.%3NZ.png" 54 "--api-key '%rbw get scrn.is/api-key' --upload" 55 ]) 56 (cat [ 57 "$mod, R, exec, uwsm app --" 58 "imsh-cast --utc --copy" 59 "--output ~/vid/rec/%Y-%m-%dT%H-%M-%S.%3NZ.mp4" 60 ]) 61 (cat [ 62 "$mod SHIFT, R, exec, uwsm app --" 63 "imsh-cast --utc --copy" 64 "--output ~/vic/rec/%Y-%m-%dT%H-%M-%S.%3NZ.mp4" 65 "--api-key '%rbw get scrn.is/api-key' --upload" 66 ]) 67 ]; 68 }; 69 }