From 9b2faedb19153cc41ec3c15ef2cdd34b57605610 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Thu, 10 Oct 2024 08:50:41 +0300 Subject: [PATCH] adding colour wrap to doas so i remember when i'm in admin mode --- common/doas | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 common/doas diff --git a/common/doas b/common/doas new file mode 100755 index 0000000..94609ee --- /dev/null +++ b/common/doas @@ -0,0 +1,23 @@ +#!/bin/sh +admin_bg="#2d161d" +admin_fg="#e3ccd2" + +user_bg="#232627" +user_fg="#fcfcfc" + +set_colours () { + echo -en "\e]11;$admin_bg\e\\" + echo -en "\e]10;$admin_fg\e\\" +} + +reset_colours () { + echo -en "\e]11;$user_bg\e\\" + echo -en "\e]10;$user_fg\e\\" +} + +# Reset colour if ^C +trap "reset_colours" INT + +set_colours +/usr/bin/doas "$@" +reset_colours