From f130384cd8e7f894a29b6412ea36b31f72d4e771 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 6 Jan 2025 18:01:45 +0100 Subject: update --- .Xresources | 3 ++- .config/foot/foot.ini | 3 ++- .config/sway/config | 2 ++ bin/cursor | 30 ++++++++++++++++-------------- bin/tc | 11 +++++++---- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/.Xresources b/.Xresources index 5aa4167..4bdb205 100644 --- a/.Xresources +++ b/.Xresources @@ -53,7 +53,8 @@ xterm*disallowedWindowOps : 1,2,3,4,5,6,7,8,9,11,13,18,19,20,21,GetSelection,Set *color3: #eab93d *color11: #ffc123 ! DarkBlue + Blue -*color4: #204a87 +!*color4: #204a87 +*color4: #244da0 *color12: #3465a4 ! DarkMagenta + Magenta *color5: #ce5c00 diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini index e560271..d732b94 100644 --- a/.config/foot/foot.ini +++ b/.config/foot/foot.ini @@ -17,7 +17,8 @@ regular0=000000 regular1=ff6565 regular2=93b44f regular3=eab93d -regular4=204a87 +#regular4=204a87 +regular4=3465a4 regular5=ce5c00 regular6=10c090 regular7=cccccc diff --git a/.config/sway/config b/.config/sway/config index 76e0b49..5691848 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -13,6 +13,8 @@ exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec xset +fp /usr/share/fonts/misc +exec light + ### Variables # # Logo key. Use Mod1 for Alt. diff --git a/bin/cursor b/bin/cursor index 6fdbc12..537c164 100755 --- a/bin/cursor +++ b/bin/cursor @@ -1,22 +1,24 @@ -#!/bin/bash +#!/bin/sh # Set cursor in xterm and compatibles. +usage="Usage: $0 [black | blue | cyan | gray | green | magenta | orange | red | white | yellow]" + cursor() { case $1 in - (r|red) cc='#f00' ;; - (n|green) cc='#5f5' ;; - (b|blue) cc='#55f' ;; - (c|cyan) cc='#0ff' ;; - (y|yellow) cc='#ff0' ;; - (m|magenta) cc='#f0f' ;; - (o|orange) cc='#f80' ;; - (k|black) cc='#111' ;; - (g|gr[ae]y) cc='#888' ;; - (w|white) cc='#eee' ;; - (*) cc=$1 ;; + (0|r|red) set -- '#f00' ;; + (1|n|green) set -- '#5f5' ;; + (2|b|blue) set -- '#55f' ;; + (3|c|cyan) set -- '#0ff' ;; + (4|y|yellow) set -- '#ff0' ;; + (5|m|magenta) set -- '#f0f' ;; + (6|o|orange) set -- '#f80' ;; + (7|g|gr[ae]y) set -- '#888' ;; + (k|black) set -- '#111' ;; + (w|white) set -- '#eee' ;; esac + printf '\e[2 q\e]12;'$1'\e\' # set non blinking block, then color } -cursor "${1:-red}" -printf '\e]12;'$cc'\e\' # set cursor color +case $1 in -*) echo "$usage" >&2; exit 1;; esac +cursor "${1:-$((RANDOM % 8))}" diff --git a/bin/tc b/bin/tc index 12129af..e2e34a4 100755 --- a/bin/tc +++ b/bin/tc @@ -1,7 +1,9 @@ -#!/bin/bash +#!/bin/sh # Set terminal color in xterm and compatibles +usage="Usage: $0 [black | blue | cyan | gray | green | magenta | orange | red | white | yellow]" + color() { case $1 in (0|w|white) bg='#ffffff' ;; @@ -11,10 +13,11 @@ color() { (4|y|yellow) bg='#ffffe0' ;; (5|n|green) bg='#e0ffe0' ;; (6|o|orange) bg='#fff0f4' ;; - (7|k|black) bg='#111111' fg='#eeeeee' ;; + (7|k|black) bg='#000000' fg='#eeeeee' ;; esac + printf '\e]11;'${bg:-#ffffff}'\e\' # Set background color. + printf '\e]10;'${fg:-#000000}'\e\' # Set foreground color. } +case $1 in -*) echo "$usage" >&2; exit 1;; esac color ${1:-$((RANDOM % 7))} -printf '\E]11;'${bg:-#ffffff}'\E\' # Set background color. -printf '\E]10;'${fg:-#000000}'\E\' # Set foreground color. -- cgit v1.2.3