diff --git a/nixos/modules/programs/default.nix b/nixos/modules/programs/default.nix index 29f5183..5f672a8 100644 --- a/nixos/modules/programs/default.nix +++ b/nixos/modules/programs/default.nix @@ -1,7 +1,6 @@ { imports = [ ./direnv - ./git ./home-manager ./sops ./spotify-adblock diff --git a/scripts/toggle-light-dark.sh b/scripts/toggle-light-dark.sh index 03525d5..c4667bf 100755 --- a/scripts/toggle-light-dark.sh +++ b/scripts/toggle-light-dark.sh @@ -6,8 +6,8 @@ ### Variables ### ################# -THEME_LIGHT='light' -THEME_DARK='dark' +THEME_LIGHT='tdpeuter-light' +THEME_DARK='tdpeuter-dark' THEME_DEFAULT="${THEME_LIGHT}" STATE_DIR="${HOME}/.local/state/sisyphus" @@ -18,10 +18,6 @@ declare -A theme_next theme_next[${THEME_LIGHT}]="${THEME_DARK}" theme_next[${THEME_DARK}]="${THEME_LIGHT}" -declare -A personal_theme -personal_theme[${THEME_LIGHT}]='tdpeuter-light' -personal_theme[${THEME_DARK}]='tdpeuter-dark' - declare -A gsettings_alt gsettings_alt[${THEME_LIGHT}]='default' gsettings_alt[${THEME_DARK}]='prefer-dark' @@ -42,13 +38,13 @@ wallpaper[${THEME_DARK}]="bg-dark" while getopts ":m:g" option; do case "${option}" in m) - if [ "${OPTARG}" == "${THEME_LIGHT}" ]; then + if [ "${OPTARG}" == 'light' ]; then theme="${THEME_LIGHT}" - elif [ "${OPTARG}" == "${THEME_DARK}" ]; then + elif [ "${OPTARG}" == 'dark' ]; then theme="${THEME_DARK}" else - >&2 printf "Error: Invalid mode: '%s'.\nShould be either 'light' or 'dark', falling back to default: '%s'\n" "${option}" "${THEME_DEFAULT}" - theme="${THEME_DEFAULT}" + >&2 printf "Error: Invalid mode: '%s'.\nShould be either 'light' or 'dark'\n" "${option}" + exit 1 fi ;; g) @@ -104,8 +100,8 @@ function update_terminal_colors() { # Foot if [ "$(command -v foot)" ] ; then # Make color theme switch 'permanent'. - echo "initial-color-theme=${theme}" > ~/.config/foot/theme.ini & - # We still have to change the terminal colors ourselves for existing sessions. + echo "include=~/.config/foot/themes/${theme}.ini" > ~/.config/foot/theme.ini & + # We will have to change the terminal colors ourselves. update_terminal_colors & fi @@ -117,7 +113,7 @@ fi # Kitty if [ "$(command -v kitty)" ]; then - kitten themes --reload-in all --config-file-name theme.conf "${personal_theme[${theme}]}" & + kitten themes --reload-in all --config-file-name theme.conf "${theme}" & fi # Sway @@ -133,19 +129,17 @@ fi # Vifm if [ "$(command -v vifm)" ]; then - vifm_theme="${personal_theme[${theme}]}" - echo "colorscheme ${vifm_theme} Default-256 Default" > ~/.config/vifm/theme.conf + echo "colorscheme ${theme} Default-256 Default" > ~/.config/vifm/theme.conf # Update all running instances - vifm --remote -c "colorscheme ${vifm_theme}" & + vifm --remote -c "colorscheme ${theme}" & fi # Vim if [ "$(command -v vim)" ]; then - vim_theme="${personal_theme[${theme}]}" - echo "colorscheme ${vim_theme}" > ~/.vim/theme.conf + echo "colorscheme ${theme}" > ~/.vim/theme.conf # Update all running instances for server in $(vim --serverlist); do - vim --servername "${server}" --remote-send ":colorscheme ${vim_theme}" + vim --servername "${server}" --remote-send ":colorscheme ${theme}" done fi diff --git a/stow/foot/.config/foot/foot.ini b/stow/foot/.config/foot/foot.ini index 3796dad..efcd8d9 100644 --- a/stow/foot/.config/foot/foot.ini +++ b/stow/foot/.config/foot/foot.ini @@ -1,11 +1,7 @@ # -*- conf -*- # ~/.config/foot/foot.ini -# Color scheme definitions -include=~/.config/foot/themes/tdpeuter-light.ini -include=~/.config/foot/themes/tdpeuter-dark.ini - -# Default color scheme selection +# Include the correct color scheme include=~/.config/foot/theme.ini # shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) @@ -27,20 +23,17 @@ font=letter extended:size=10 # vertical-letter-offset=0 # underline-offset= # underline-thickness= -# strikout-thickness= # box-drawings-uses-font-glyphs=no dpi-aware=yes -# gamma-correct-blending=no -# initial-color-theme=dark # initial-window-size-pixels=700x500 # Or, # initial-window-size-chars= # initial-window-mode=windowed -# pad=10x10 # optionally append 'center' -# resize-by-cells=yes -# resize-keep-grid=yes +#pad=10x10 # optionally append 'center' # resize-delay-ms=100 +# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} + # bold-text-in-bright=no # word-delimiters=,│`|:"'()[]{}<> # selection-target=primary @@ -48,28 +41,16 @@ dpi-aware=yes # utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) # utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) -# uppercase-regex-insert=yes - [environment] # name=value -[security] -# osc52=enabled # disabled|copy-enabled|paste-enabled|enabled - [bell] -# system=yes urgent=yes notify=yes visual=yes # command= # command-focused=no -[desktop-notifications] -# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body} -# command-action-argument=--action ${action-name}=${action-label} -# close="" -# inhibit-when-focused=yes - [scrollback] # lines=1000 # multiplier=3.0 @@ -79,26 +60,14 @@ visual=yes [url] # launch=xdg-open ${url} # label-letters=sadfjklewcmpgh -# style=dotted (none|single|double|curly|doted|dashed) # osc8-underline=url-mode -# regex=(((https?://|mailto:|ftp://|file:|ssh:|ssh://|git://|tel:|magnet:|ipfs://|ipns://|gemini://|gopher://|news:)|www\.)([0-9a-zA-Z:/?#@!$&*+,;=.~_%^\-]+|\([]\["0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\-]*\)|\[[\(\)"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\-]*\]|"[]\[\(\)0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\-]*"|'[]\[\(\)0-9a-zA-Z:/?#@!$&*+,;=.~_%^\-]*')+([0-9a-zA-Z/#@$&*+=~_%^\-]|\([]\["0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\-]*\)|\[[\(\)"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\-]*\]|"[]\[\(\)0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\-]*"|'[]\[\(\)0-9a-zA-Z:/?#@!$&*+,;=.~_%^\-]*')) - -# You can define your own regex's, by adding a section called -# 'regex:' with a 'regex' and 'launch' key. These can then be tied -# to a key-binding. See foot.ini(5) for details - -# [regex:your-fancy-name] -# regex= -# launch= ${match} -# -# [key-bindings] -# regex-launch=[your-fancy-name] Control+Shift+q -# regex-copy=[your-fancy-name] Control+Alt+Shift+q +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] [cursor] # style=block +# color= # blink=no -# blink-rate=500 # beam-thickness=1.5 # underline-thickness= @@ -109,10 +78,54 @@ visual=yes [touch] # long-press-delay=400 -# colors set by themes +[colors] +alpha=0.8 +# background=242424 +# foreground=ffffff +flash=b00020 +# flash-alpha=0.5 + +## Normal/regular colors (color palette 0-7) +# regular0=242424 # black +# regular1=f62b5a # red +# regular2=47b413 # green +# regular3=e3c401 # yellow +# regular4=24acd4 # blue +# regular5=f2affd # magenta +# regular6=13c299 # cyan +# regular7=e6e6e6 # white + +## Bright colors (color palette 8-15) +# bright0=616161 # bright black +# bright1=ff4d51 # bright red +# bright2=35d450 # bright green +# bright3=e9e836 # bright yellow +# bright4=5dc5f8 # bright blue +# bright5=feabf2 # bright magenta +# bright6=24dfc4 # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= [csd] -# preferred=server +preferred=none # size=26 # font= # color= @@ -127,10 +140,10 @@ visual=yes # button-close-color= [key-bindings] -# scrollback-up-page=Shift+Page_Up Shift+KP_Page_Up +# scrollback-up-page=Shift+Page_Up # scrollback-up-half-page=none # scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down Shift+KP_Page_Down +# scrollback-down-page=Shift+Page_Down # scrollback-down-half-page=none # scrollback-down-line=none # scrollback-home=none @@ -149,22 +162,17 @@ visual=yes # pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none # pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none # pipe-selected=[xargs -r firefox] none -# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard # show-urls-launch=Control+Shift+o # show-urls-copy=none # show-urls-persistent=none # prompt-prev=Control+Shift+z # prompt-next=Control+Shift+x # unicode-input=Control+Shift+u -# color-theme-switch-1=none -# color-theme-switch-2=none -# color-theme-toggle=none # noop=none -# quit=none [search-bindings] # cancel=Control+g Control+c Escape -# commit=Return KP_Enter +# commit=Return # find-prev=Control+r # find-next=Control+s # cursor-left=Left Control+b @@ -177,8 +185,6 @@ visual=yes # delete-prev-word=Mod1+BackSpace Control+BackSpace # delete-next=Delete # delete-next-word=Mod1+d Control+Delete -# delete-to-start=Control+u -# delete-to-end=Control+k # extend-char=Shift+Right # extend-to-word-boundary=Control+w Control+Shift+Right # extend-to-next-whitespace=Control+Shift+w @@ -190,10 +196,10 @@ visual=yes # clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste # primary-paste=Shift+Insert # unicode-input=none -# scrollback-up-page=Shift+Page_Up Shift+KP_Page_Up +# scrollback-up-page=Shift+Page_Up # scrollback-up-half-page=none # scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down Shift+KP_Page_Down +# scrollback-down-page=Shift+Page_Down # scrollback-down-half-page=none # scrollback-down-line=none # scrollback-home=none @@ -207,10 +213,8 @@ visual=yes # \x03=Mod4+c # Map Super+c -> Ctrl+c [mouse-bindings] -# scrollback-up-mouse=BTN_WHEEL_BACK -# scrollback-down-mouse=BTN_WHEEL_FORWARD -# font-increase=Control+BTN_WHEEL_BACK -# font-decrease=Control+BTN_WHEEL_FORWARD +# scrollback-up-mouse=BTN_BACK +# scrollback-down-mouse=BTN_FORWARD # selection-override-modifiers=Shift # primary-paste=BTN_MIDDLE # select-begin=BTN_LEFT diff --git a/stow/foot/.config/foot/themes/tdpeuter-dark.ini b/stow/foot/.config/foot/themes/tdpeuter-dark.ini index 89be385..4ee35d8 100644 --- a/stow/foot/.config/foot/themes/tdpeuter-dark.ini +++ b/stow/foot/.config/foot/themes/tdpeuter-dark.ini @@ -1,8 +1,8 @@ -[colors-dark] -alpha=0.8 +[colors] +# alpha=0.8 background=171717 foreground=dcdfe4 -flash=b00020 +# flash=b00020 # flash-alpha=0.5 ## Normal/regular colors (color palette 0-7) diff --git a/stow/foot/.config/foot/themes/tdpeuter-light.ini b/stow/foot/.config/foot/themes/tdpeuter-light.ini index 0cb8dbc..daeebb9 100644 --- a/stow/foot/.config/foot/themes/tdpeuter-light.ini +++ b/stow/foot/.config/foot/themes/tdpeuter-light.ini @@ -1,8 +1,8 @@ -[colors-light] -alpha=0.8 +[colors] +# alpha=0.8 background=fafafa foreground=000000 -flash=b00020 +# flash=b00020 # flash-alpha=0.5 ## Normal/regular colors (color palette 0-7)