nixos-config/scripts/terminal.nix

24 lines
415 B
Nix
Raw Normal View History

2022-08-06 11:10:31 -03:00
{ config, pkgs, lib, ... }:
pkgs.writeScriptBin "terminal" ''
#!/bin/sh
CLASS="terminal"
while test $# -gt 0;do
case $1 in
-c|--class)
shift
CLASS=$1
shift
;;
*)
break
;;
esac
done
test $# -gt 0 &&
exec alacritty --class "$CLASS" -e $@ ||
exec alacritty --class "$CLASS"
''