diff options
author | Martin Fischer <martin@push-f.com> | 2024-12-15 12:06:40 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-15 12:06:40 +0100 |
commit | a827eee040ef62c3939c0b6952cd4ddd1a28702c (patch) | |
tree | 1b320f307a1a4e3db60da606af39569ea404be17 /nixos/parts/graphical.nix | |
parent | d02fbcab9fc1f279be6ad12def3294016df3c6c3 (diff) |
refactor: define scripts in files
Diffstat (limited to 'nixos/parts/graphical.nix')
-rw-r--r-- | nixos/parts/graphical.nix | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/nixos/parts/graphical.nix b/nixos/parts/graphical.nix index 8c340fc..80a5a8a 100644 --- a/nixos/parts/graphical.nix +++ b/nixos/parts/graphical.nix @@ -20,15 +20,8 @@ # When I ssh into a server my terminal changes to a host-specific background color via # a LocalCommand configured in ~/.ssh/config and a ZSH function to reset the color on exit. - (writeShellScriptBin "set-bg" '' - #!/usr/bin/env bash - rgb_with_slashes=$(echo "$1" | sed -r 's,(..)(..),\1/\2/,') - echo -en "\033]11;rgb:$rgb_with_slashes\007" - '') - (writeShellScriptBin "reset-bg" '' - #!/usr/bin/env bash - echo -en "\033]111\007" - '') + (writeShellScriptBin "set-bg" (builtins.readFile ./scripts/set-bg)) + (writeShellScriptBin "reset-bg" (builtins.readFile ./scripts/reset-bg)) # graphical tools imv |