From eba7f91576ff26d51e693b916b4fc9b8109a1e88 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 24 Aug 2025 14:55:59 +0200 Subject: [PATCH 01/23] cleaner bar --- home-modules/bar.nix | 373 ++++++++++++++++++++++--------------------- 1 file changed, 187 insertions(+), 186 deletions(-) diff --git a/home-modules/bar.nix b/home-modules/bar.nix index f8632bd..fd70074 100644 --- a/home-modules/bar.nix +++ b/home-modules/bar.nix @@ -5,39 +5,39 @@ in { "nx2site/radicale/password" = { }; }; home.packages = [ - (pkgs.writeShellApplication { name = "submap_indicator"; text = /*bash*/ '' - print_help() { - echo "Usage: submap_indicator {set |unset}" - } - if [ $# -lt 1 ]; then - print_help; exit 1; - fi - case "$1" in - set) - # Check if there is a second argument for the 'set' operation - if [ $# -eq 2 ]; then - echo "$2" > /tmp/submap-indictor - pkill -RTMIN+8 waybar - pkill -RTMIN+8 hyprpanel - else - echo "Error: 'set' operation requires exactly one string argument." - print_help - exit 1 - fi - ;; - unset) - echo "" > /tmp/submap-indictor - pkill -RTMIN+8 waybar - pkill -RTMIN+8 hyprpanel - ;; - *) - echo "Error: Unknown command '$1'" - print_help - exit 1 - ;; - esac - exit 0 - '';}) +# (pkgs.writeShellApplication { name = "submap_indicator"; text = /*bash*/ '' +# print_help() { +# echo "Usage: submap_indicator {set |unset}" +# } +# if [ $# -lt 1 ]; then +# print_help; exit 1; +# fi +# case "$1" in +# set) +# # Check if there is a second argument for the 'set' operation +# if [ $# -eq 2 ]; then +# echo "$2" > /tmp/submap-indictor +# pkill -RTMIN+8 waybar +# pkill -RTMIN+8 hyprpanel +# else +# echo "Error: 'set' operation requires exactly one string argument." +# print_help +# exit 1 +# fi +# ;; +# unset) +# echo "" > /tmp/submap-indictor +# pkill -RTMIN+8 waybar +# pkill -RTMIN+8 hyprpanel +# ;; +# *) +# echo "Error: Unknown command '$1'" +# print_help +# exit 1 +# ;; +# esac +# exit 0 +# '';}) (pkgs.writeShellApplication { name = "cclock"; text = /*bash*/ '' ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}') if [ $# -eq 0 ]; then @@ -168,167 +168,167 @@ if __name__ == "__main__": '') ]; programs = { - waybar = { - enable = false; - package = pkgs.waybar; - settings = { - bar = { - # height = 20; - layer = "top"; - position = "bottom"; - margin-top = 0; - # margin-left = rice.gap-size; - # margin-bottom = rice.gap-size; - # margin-right = rice.gap-size; - margin-left = 0; - margin-bottom = 0; - margin-right = 0; - spacing = 10; - fixed-center = true; - modules-left = [ - # "cpu" - # "memory" - "wireplumber" - "backlight" - "battery" - "network" - "hyprland/window" - ]; - modules-center = [ - "hyprland/workspaces" - ]; - modules-right = [ - "custom/mode" - "custom/caldav_event" - "custom/cclock" - "tray" - ]; - "hyprland/workspaces" = { - on-click = "activate"; - format = "{name}"; - all-outputs = false; - active-only = false; - }; - "hyprland/window" = { - # format = "${sep}{}"; - format = "{}"; - separate-outputs = true; - }; - "custom/cclock" = { - exec = "cclock"; - restart-interval = 60; - }; - "custom/caldav_event" = { - format = "󰃰${sep}{}"; - exec = "caldav_event"; - restart-interval = 60; - max-width = 60; - }; - "custom/mode" = { - exec = "cat /tmp/submap-indictor"; - interval = "once"; - signal = 8; - }; +# waybar = { +# enable = false; +# package = pkgs.waybar; +# settings = { +# bar = { +# # height = 20; +# layer = "top"; +# position = "bottom"; +# margin-top = 0; +# # margin-left = rice.gap-size; +# # margin-bottom = rice.gap-size; +# # margin-right = rice.gap-size; +# margin-left = 0; +# margin-bottom = 0; +# margin-right = 0; +# spacing = 10; +# fixed-center = true; +# modules-left = [ +# # "cpu" +# # "memory" +# "wireplumber" +# "backlight" +# "battery" +# "network" +# "hyprland/window" +# ]; +# modules-center = [ +# "hyprland/workspaces" +# ]; +# modules-right = [ +# "custom/mode" +# "custom/caldav_event" +# "custom/cclock" +# "tray" +# ]; +# "hyprland/workspaces" = { +# on-click = "activate"; +# format = "{name}"; +# all-outputs = false; +# active-only = false; +# }; +# "hyprland/window" = { +# # format = "${sep}{}"; +# format = "{}"; +# separate-outputs = true; +# }; +# "custom/cclock" = { +# exec = "cclock"; +# restart-interval = 60; +# }; +# "custom/caldav_event" = { +# format = "󰃰${sep}{}"; +# exec = "caldav_event"; +# restart-interval = 60; +# max-width = 60; +# }; +# "custom/mode" = { +# exec = "cat /tmp/submap-indictor"; +# interval = "once"; +# signal = 8; +# }; - cpu = { - interval = 1; - format = "󰍛${sep}{}%"; - max-length = 10; - }; - memory = { - interval = 5; - format = "${sep}{avail:.0f}G free"; - }; - battery = { - interval = 60; - tooltip = false; - format = "{icon}${sep}{capacity}%"; - states = { - warning = 15; - critical = 5; - }; - format-icons = [ " " " " " " " " " " ]; - format-charging = "{icon}${sep}+{capacity}%"; - format-plugged = "{icon}${sep}P{capacity}%"; - format-full = "{icon}${sep}F{capacity}%"; - }; - backlight = { - device = "eDP-1"; - format = "{icon}${sep}{percent}%"; - format-icons = [ "" "" "" "" "" "" "" "" "" ]; - }; - network = { - format-wifi = "${sep}{essid}"; - format-ethernet = "󰈀${sep}Wired"; - format-disconnected = "󰌙${sep}Disconnected"; - }; - wireplumber = { - format = "󰕾${sep}{volume}%"; - format-muted = "󰝟${sep}--%"; - }; - }; - }; - style = with rice.color; let f = rice.lib.hex-to-rgb-comma-string; in /* css */ '' - * { - font-family: ${rice.font.code.name}; - font-size: 1em; - min-height: 0px; - margin: 0px; - padding: 0px; - } +# cpu = { +# interval = 1; +# format = "󰍛${sep}{}%"; +# max-length = 10; +# }; +# memory = { +# interval = 5; +# format = "${sep}{avail:.0f}G free"; +# }; +# battery = { +# interval = 60; +# tooltip = false; +# format = "{icon}${sep}{capacity}%"; +# states = { +# warning = 15; +# critical = 5; +# }; +# format-icons = [ " " " " " " " " " " ]; +# format-charging = "{icon}${sep}+{capacity}%"; +# format-plugged = "{icon}${sep}P{capacity}%"; +# format-full = "{icon}${sep}F{capacity}%"; +# }; +# backlight = { +# device = "eDP-1"; +# format = "{icon}${sep}{percent}%"; +# format-icons = [ "" "" "" "" "" "" "" "" "" ]; +# }; +# network = { +# format-wifi = "${sep}{essid}"; +# format-ethernet = "󰈀${sep}Wired"; +# format-disconnected = "󰌙${sep}Disconnected"; +# }; +# wireplumber = { +# format = "󰕾${sep}{volume}%"; +# format-muted = "󰝟${sep}--%"; +# }; +# }; +# }; +# style = with rice.color; let f = rice.lib.hex-to-rgb-comma-string; in /* css */ '' +# * { +# font-family: ${rice.font.code.name}; +# font-size: 1em; +# min-height: 0px; +# margin: 0px; +# padding: 0px; +# } - window#waybar { - background: rgba(${f background},${builtins.toString rice.transparency}); - } +# window#waybar { +# background: rgba(${f background},${builtins.toString rice.transparency}); +# } - #clock, - #custom-cclock, - #custom-mode, - #custom-caldav-event, - #battery, - #cpu, - #tray, - #disk, - #backlight, - #network, - #wireplumber, - #memory, - #window, - #workspaces { - padding: 0px 3px; - margin-top: 0.3em; - border-radius: ${builtins.toString rice.rounding}px; - color: rgb(${f accent.bright}); - } +# #clock, +# #custom-cclock, +# #custom-mode, +# #custom-caldav-event, +# #battery, +# #cpu, +# #tray, +# #disk, +# #backlight, +# #network, +# #wireplumber, +# #memory, +# #window, +# #workspaces { +# padding: 0px 3px; +# margin-top: 0.3em; +# border-radius: ${builtins.toString rice.rounding}px; +# color: rgb(${f accent.bright}); +# } - #workspaces button { - color: rgb(${f accent.base}); - padding-left: 15px; - padding-right: 15px; - border-radius: ${builtins.toString rice.rounding}px; - } - #workspaces button.active { color: rgb(${f background}); background-color: rgb(${f accent.base}); } - #workspaces button:hover { color: rgb(${f tertiary.bright}); } - #workspaces button.urgent { background-color: rgba(${f magenta.base},${builtins.toString rice.transparency}); } +# #workspaces button { +# color: rgb(${f accent.base}); +# padding-left: 15px; +# padding-right: 15px; +# border-radius: ${builtins.toString rice.rounding}px; +# } +# #workspaces button.active { color: rgb(${f background}); background-color: rgb(${f accent.base}); } +# #workspaces button:hover { color: rgb(${f tertiary.bright}); } +# #workspaces button.urgent { background-color: rgba(${f magenta.base},${builtins.toString rice.transparency}); } - #window, #custom-caldav_event { - font-family: ${rice.font.base.name}, ${rice.font.code.name}; - color: rgb(${f tertiary.bright}); - } +# #window, #custom-caldav_event { +# font-family: ${rice.font.base.name}, ${rice.font.code.name}; +# color: rgb(${f tertiary.bright}); +# } - #wireplumber.muted { color: rgb(${f tertiary.bright}); } - #wireplumber { padding-left: 10px; } +# #wireplumber.muted { color: rgb(${f tertiary.bright}); } +# #wireplumber { padding-left: 10px; } - #battery.warning:not(.charging) { color: rgb(${f green.base});; } - #battery.charging { color: rgb(${f green.base}); } - #battery.critical { - background: rgb(${f negative.base}); - color: rgb(${f foreground}); - } +# #battery.warning:not(.charging) { color: rgb(${f green.base});; } +# #battery.charging { color: rgb(${f green.base}); } +# #battery.critical { +# background: rgb(${f negative.base}); +# color: rgb(${f foreground}); +# } - #custom-mode { color: rgb(${f red.base}); } - ''; - }; +# #custom-mode { color: rgb(${f red.base}); } +# ''; +# }; hyprpanel = { enable = true; package = pkgs.unstable.hyprpanel; @@ -368,6 +368,7 @@ if __name__ == "__main__": "bar.customModules.submap.icon" = true; "bar.customModules.submap.disabledIcon" = ""; + "bar.workspaces.applicationIconEmptyWorkspace" = ""; "bar.workspaces.applicationIconOncePerWorkspace" = false; "bar.workspaces.numbered_active_indicator" = "underline"; "bar.workspaces.scroll_speed" = 1; From 151f61d31e56937bbcf6f28751aa4c00496c461c Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 24 Aug 2025 14:56:10 +0200 Subject: [PATCH 02/23] rclone --- home-modules/rclone.nix | 31 +++++++++++++++++++++++++++++++ home.nix | 1 + 2 files changed, 32 insertions(+) create mode 100644 home-modules/rclone.nix diff --git a/home-modules/rclone.nix b/home-modules/rclone.nix new file mode 100644 index 0000000..04dd205 --- /dev/null +++ b/home-modules/rclone.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }@all: with all; { + home.packages = with pkgs; [ rclone ]; + sops.secrets."copyparty/user-password/${hyper.user}".path = "%r/secrets/copyparty/user-password/${hyper.user}"; + programs.rclone = { + enable = true; + package = pkgs.rclone; + remotes = { + "file.${hyper.domain}" = { + config = { + type = "webdav"; + vendor = "owncloud"; # copyparty + url = "https://file.${hyper.domain}/"; + user = hyper.user; + }; + mounts = { + "" = { + enable = true; + mountPoints = "${hyper.home}/file.nx2.site/"; + options = { + vfs-cache-mode = "full"; + }; + }; + }; + secrets = { + pass = "/run/usr/1000/secrets/copyparty/user-password/${hyper.user}"; + }; + }; + }; + }; +} + diff --git a/home.nix b/home.nix index 708878c..68f96c1 100644 --- a/home.nix +++ b/home.nix @@ -48,6 +48,7 @@ ./home-modules/programming/js.nix ./home-modules/programming/python.nix ./home-modules/qt.nix + ./home-modules/rclone.nix ./home-modules/rofi.nix ./home-modules/scanning.nix ./home-modules/sent.nix From 880b3abd60d0ade25572b87084e3d0c19aef5c39 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 25 Aug 2025 13:34:32 +0200 Subject: [PATCH 03/23] bar --- home-modules/bar.nix | 813 +------------------------- home-modules/bar/caldav-event.nix | 126 ++++ home-modules/bar/cclock.nix | 14 + home-modules/bar/hyprpanel.nix | 512 ++++++++++++++++ home-modules/bar/submap-indicator.nix | 37 ++ home-modules/bar/waybar.nix | 165 ++++++ 6 files changed, 861 insertions(+), 806 deletions(-) create mode 100644 home-modules/bar/caldav-event.nix create mode 100644 home-modules/bar/cclock.nix create mode 100644 home-modules/bar/hyprpanel.nix create mode 100644 home-modules/bar/submap-indicator.nix create mode 100644 home-modules/bar/waybar.nix diff --git a/home-modules/bar.nix b/home-modules/bar.nix index fd70074..06cd61e 100644 --- a/home-modules/bar.nix +++ b/home-modules/bar.nix @@ -1,808 +1,9 @@ -{ pkgs, hyper, ... }@all: with all; let - sep = " "; -in { - sops.secrets = { - "nx2site/radicale/password" = { }; - }; - home.packages = [ -# (pkgs.writeShellApplication { name = "submap_indicator"; text = /*bash*/ '' -# print_help() { -# echo "Usage: submap_indicator {set |unset}" -# } -# if [ $# -lt 1 ]; then -# print_help; exit 1; -# fi -# case "$1" in -# set) -# # Check if there is a second argument for the 'set' operation -# if [ $# -eq 2 ]; then -# echo "$2" > /tmp/submap-indictor -# pkill -RTMIN+8 waybar -# pkill -RTMIN+8 hyprpanel -# else -# echo "Error: 'set' operation requires exactly one string argument." -# print_help -# exit 1 -# fi -# ;; -# unset) -# echo "" > /tmp/submap-indictor -# pkill -RTMIN+8 waybar -# pkill -RTMIN+8 hyprpanel -# ;; -# *) -# echo "Error: Unknown command '$1'" -# print_help -# exit 1 -# ;; -# esac -# exit 0 -# '';}) - (pkgs.writeShellApplication { name = "cclock"; text = /*bash*/ '' - ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}') - if [ $# -eq 0 ]; then - echo "󰃮${sep}$(date +'%A the')" "$ord" "of" "$(date +'%B')" " ${sep}$(date +'%R')" - elif [ "$1" = "--no-icons" ]; then - echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')" - fi - '';}) - - (pkgs.writers.writePython3Bin "caldav_event" { - libraries = with pkgs.python3Packages; [ caldav ics pytz ]; - flakeIgnore = [ "E302" "E305" "E501" "E261" ]; - } /* python */ '' -import os -import json -from caldav import DAVClient -from datetime import datetime, timezone -from ics import Calendar -from pytz import UTC - -def get_password(password_file): - with open(password_file, "r") as file: - return file.read().strip() - -def datetime_converter(obj): - if isinstance(obj, datetime): - return obj.isoformat() - return obj - -def datetime_parser(dct): - for key, value in dct.items(): - if isinstance(value, str): - try: - dct[key] = datetime.fromisoformat(value) - except ValueError: - pass - return dct - -def load_cache(cache_file): - if os.path.exists(cache_file): - with open(cache_file, "r") as file: - return json.load(file, object_hook=datetime_parser) - return None - -def save_cache(cache_file, data): - with open(cache_file, "w") as file: - json.dump(data, file, default=datetime_converter, indent=4) - - -def get_ongoing_or_next_event(url, username, password): - now = datetime.now(timezone.utc) - - try: - client = DAVClient(url, username=username, password=password) - principal = client.principal() - calendars = principal.calendars() - - next_event_dict = { - 'event_name': "fake", - 'event_begin': datetime(9000, 1, 1, tzinfo=UTC), # in the year 9000 - 'event_end': datetime(9000, 1, 1, 8, tzinfo=UTC), - } - - for calendar in calendars: - for event in calendar.search(start=now): - calendar_parsed = Calendar(event.data) - for ics_event in calendar_parsed.events: - event_dict = {} - event_dict['event_name'] = ics_event.name or "(No Title)" - event_dict['event_begin'] = ics_event.begin.astimezone(timezone.utc) - event_dict['event_end'] = ics_event.end.astimezone(timezone.utc) - - if event_dict['event_begin'] <= now and now <= event_dict['event_end']: - return event_dict - elif event_dict['event_begin'] >= now and next_event_dict['event_begin'] > event_dict['event_begin']: - next_event_dict = event_dict - return next_event_dict - - except Exception as e: - print(f"Error accessing {url}: {e}") - return None - -def is_expired(event_dict: dict): - now = datetime.now(timezone.utc).timestamp() - event_end = event_dict['event_end'].timestamp() - return not (now <= event_end) - -if __name__ == "__main__": - password_file = "${config.sops.secrets."nx2site/radicale/password".path}" # Path to password file - cache_file = "/tmp/caldav_event_cache.json" # Path to cache file - url = "https://dav.${hyper.domain}/" - username = "nx2" - password = get_password(password_file) - now = datetime.now(timezone.utc).timestamp() - - event_dict = load_cache(cache_file) - - if (event_dict is None) or (is_expired(event_dict)): - event_dict = get_ongoing_or_next_event(url, username, password) - save_cache(cache_file, event_dict) - - if event_dict is None: # none were found - print("* zen *") - exit(0) - - event_start = event_dict['event_begin'].timestamp() - event_end = event_dict['event_end'].timestamp() - - if event_start <= now <= event_end: # is currently ongoing - action_string = "ends" - t = event_end - now # time_remaining - else: # is in the future - action_string = "starts" - t = event_start - now # time_remaining - - hours, rem = divmod(int(t), 3600) - minutes, _ = divmod(rem, 60) - hour_string = f"{hours} hour{'s ' if hours != 1 else ' '}" if hours > 0 else "" - minu_string = f"{minutes} minute{'s ' if minutes != 1 else ' '}" if minutes > 0 else "" - if hour_string == "" and minu_string == "": - time_string = "now" - elif hour_string == "" or minu_string == "": - time_string = "in " + hour_string + minu_string - else: - time_string = "in " + hour_string + "and " + minu_string - - print(f"{event_dict['event_name']} {action_string} {time_string}") -'') +{ ... }: { + imports = [ + # ./bar/submap-indicator.nix + ./bar/cclock.nix + ./bar/caldav-event.nix + # ./bar/waybar.nix + ./bar/hyprpanel.nix ]; - programs = { -# waybar = { -# enable = false; -# package = pkgs.waybar; -# settings = { -# bar = { -# # height = 20; -# layer = "top"; -# position = "bottom"; -# margin-top = 0; -# # margin-left = rice.gap-size; -# # margin-bottom = rice.gap-size; -# # margin-right = rice.gap-size; -# margin-left = 0; -# margin-bottom = 0; -# margin-right = 0; -# spacing = 10; -# fixed-center = true; -# modules-left = [ -# # "cpu" -# # "memory" -# "wireplumber" -# "backlight" -# "battery" -# "network" -# "hyprland/window" -# ]; -# modules-center = [ -# "hyprland/workspaces" -# ]; -# modules-right = [ -# "custom/mode" -# "custom/caldav_event" -# "custom/cclock" -# "tray" -# ]; -# "hyprland/workspaces" = { -# on-click = "activate"; -# format = "{name}"; -# all-outputs = false; -# active-only = false; -# }; -# "hyprland/window" = { -# # format = "${sep}{}"; -# format = "{}"; -# separate-outputs = true; -# }; -# "custom/cclock" = { -# exec = "cclock"; -# restart-interval = 60; -# }; -# "custom/caldav_event" = { -# format = "󰃰${sep}{}"; -# exec = "caldav_event"; -# restart-interval = 60; -# max-width = 60; -# }; -# "custom/mode" = { -# exec = "cat /tmp/submap-indictor"; -# interval = "once"; -# signal = 8; -# }; - -# cpu = { -# interval = 1; -# format = "󰍛${sep}{}%"; -# max-length = 10; -# }; -# memory = { -# interval = 5; -# format = "${sep}{avail:.0f}G free"; -# }; -# battery = { -# interval = 60; -# tooltip = false; -# format = "{icon}${sep}{capacity}%"; -# states = { -# warning = 15; -# critical = 5; -# }; -# format-icons = [ " " " " " " " " " " ]; -# format-charging = "{icon}${sep}+{capacity}%"; -# format-plugged = "{icon}${sep}P{capacity}%"; -# format-full = "{icon}${sep}F{capacity}%"; -# }; -# backlight = { -# device = "eDP-1"; -# format = "{icon}${sep}{percent}%"; -# format-icons = [ "" "" "" "" "" "" "" "" "" ]; -# }; -# network = { -# format-wifi = "${sep}{essid}"; -# format-ethernet = "󰈀${sep}Wired"; -# format-disconnected = "󰌙${sep}Disconnected"; -# }; -# wireplumber = { -# format = "󰕾${sep}{volume}%"; -# format-muted = "󰝟${sep}--%"; -# }; -# }; -# }; -# style = with rice.color; let f = rice.lib.hex-to-rgb-comma-string; in /* css */ '' -# * { -# font-family: ${rice.font.code.name}; -# font-size: 1em; -# min-height: 0px; -# margin: 0px; -# padding: 0px; -# } - -# window#waybar { -# background: rgba(${f background},${builtins.toString rice.transparency}); -# } - -# #clock, -# #custom-cclock, -# #custom-mode, -# #custom-caldav-event, -# #battery, -# #cpu, -# #tray, -# #disk, -# #backlight, -# #network, -# #wireplumber, -# #memory, -# #window, -# #workspaces { -# padding: 0px 3px; -# margin-top: 0.3em; -# border-radius: ${builtins.toString rice.rounding}px; -# color: rgb(${f accent.bright}); -# } - -# #workspaces button { -# color: rgb(${f accent.base}); -# padding-left: 15px; -# padding-right: 15px; -# border-radius: ${builtins.toString rice.rounding}px; -# } -# #workspaces button.active { color: rgb(${f background}); background-color: rgb(${f accent.base}); } -# #workspaces button:hover { color: rgb(${f tertiary.bright}); } -# #workspaces button.urgent { background-color: rgba(${f magenta.base},${builtins.toString rice.transparency}); } - -# #window, #custom-caldav_event { -# font-family: ${rice.font.base.name}, ${rice.font.code.name}; -# color: rgb(${f tertiary.bright}); -# } - -# #wireplumber.muted { color: rgb(${f tertiary.bright}); } -# #wireplumber { padding-left: 10px; } - -# #battery.warning:not(.charging) { color: rgb(${f green.base});; } -# #battery.charging { color: rgb(${f green.base}); } -# #battery.critical { -# background: rgb(${f negative.base}); -# color: rgb(${f foreground}); -# } - -# #custom-mode { color: rgb(${f red.base}); } -# ''; -# }; - hyprpanel = { - enable = true; - package = pkgs.unstable.hyprpanel; - settings = with rice.color; let - t = builtins.toString (builtins.ceil (rice.transparency * 100)); - in { - "bar.layouts" = { - "*" = { - "left" = [ - "volume" - # "microphone" - # "cpu" - # "cputemp" - # "ram" - "battery" - # "bluetooth" - "network" - "windowtitle" - ]; - "middle" = [ "workspaces" ]; - "right" = [ - "submap" - "custom/caldav_event" - "media" - "custom/cclock" - "notifications" - "systray" - ]; - }; - }; - - "bar.bluetooth.label" = true; - - "bar.customModules.submap.enabledIcon" = "[󰧹]"; - "bar.customModules.submap.showSubmapName" = false; - "bar.customModules.submap.label" = false; - "bar.customModules.submap.icon" = true; - "bar.customModules.submap.disabledIcon" = ""; - - "bar.workspaces.applicationIconEmptyWorkspace" = ""; - "bar.workspaces.applicationIconOncePerWorkspace" = false; - "bar.workspaces.numbered_active_indicator" = "underline"; - "bar.workspaces.scroll_speed" = 1; - "bar.workspaces.showAllActive" = false; - "bar.workspaces.showApplicationIcons" = true; - "bar.workspaces.show_icons" = false; - "bar.workspaces.show_numbered" = false; - "bar.workspaces.showWsIcons" = true; - "bar.workspaces.spacing" = 1; - "bar.workspaces.workspaceMask" = true; - "bar.workspaces.workspaces" = 5; - - "theme.bar.background" = background; - "theme.bar.border.color" = accent.base; - "theme.bar.border_radius" = "0.2em"; - - "theme.bar.buttons.background" = background; - "theme.bar.buttons.background_opacity" = 0; - "theme.bar.buttons.spacing" = "0em"; - "theme.bar.buttons.padding_x" = "0.5rem"; - - "theme.bar.buttons.battery.background" = background; - "theme.bar.buttons.battery.border" = accent.base; - "theme.bar.buttons.battery.icon_background" = background; - "theme.bar.buttons.battery.icon" = accent.base; - "theme.bar.buttons.battery.text" = accent.base; - - "theme.bar.buttons.bluetooth.background" = background; - "theme.bar.buttons.bluetooth.border" = accent.base; - "theme.bar.buttons.bluetooth.icon_background" = background; - "theme.bar.buttons.bluetooth.icon" = accent.base; - "theme.bar.buttons.bluetooth.text" = accent.base; - - "theme.bar.buttons.borderColor" = accent.base; - - "theme.bar.buttons.clock.background" = background; - "theme.bar.buttons.clock.border" = accent.base; - "theme.bar.buttons.clock.icon_background" = background; - "theme.bar.buttons.clock.icon" = accent.base; - "theme.bar.buttons.clock.text" = accent.base; - - "theme.bar.buttons.dashboard.background" = background; - "theme.bar.buttons.dashboard.border" = accent.base; - "theme.bar.buttons.dashboard.icon" = accent.base; - "theme.bar.buttons.icon_background" = background; - - "theme.bar.buttons.icon" = accent.base; - - "theme.bar.buttons.media.background" = background; - "theme.bar.buttons.media.border" = accent.base; - "theme.bar.buttons.media.icon_background" = background; - "theme.bar.buttons.media.icon" = accent.base; - "theme.bar.buttons.media.text" = accent.base; - - "theme.bar.buttons.modules.cava.background" = background; - "theme.bar.buttons.modules.cava.border" = accent.base; - "theme.bar.buttons.modules.cava.icon_background" = background; - "theme.bar.buttons.modules.cava.icon" = accent.base; - "theme.bar.buttons.modules.cava.text" = accent.base; - - "theme.bar.buttons.modules.cpu.background" = background; - "theme.bar.buttons.modules.cpu.border" = accent.base; - "theme.bar.buttons.modules.cpu.icon_background" = background; - "theme.bar.buttons.modules.cpu.icon" = accent.base; - "theme.bar.buttons.modules.cpu.text" = accent.base; - - "theme.bar.buttons.modules.cpuTemp.background" = background; - "theme.bar.buttons.modules.cpuTemp.border" = accent.base; - "theme.bar.buttons.modules.cpuTemp.icon_background" = background; - "theme.bar.buttons.modules.cpuTemp.icon" = accent.base; - "theme.bar.buttons.modules.cpuTemp.text" = accent.base; - - "theme.bar.buttons.modules.hypridle.background" = background; - "theme.bar.buttons.modules.hypridle.border" = accent.base; - "theme.bar.buttons.modules.hypridle.icon_background" = background; - "theme.bar.buttons.modules.hypridle.icon" = accent.base; - "theme.bar.buttons.modules.hypridle.text" = accent.base; - - "theme.bar.buttons.modules.hyprsunset.background" = background; - "theme.bar.buttons.modules.hyprsunset.border" = accent.base; - "theme.bar.buttons.modules.hyprsunset.icon_background" = background; - "theme.bar.buttons.modules.hyprsunset.icon" = accent.base; - "theme.bar.buttons.modules.hyprsunset.text" = accent.base; - - "theme.bar.buttons.modules.kbLayout.background" = background; - "theme.bar.buttons.modules.kbLayout.border" = accent.base; - "theme.bar.buttons.modules.kbLayout.icon_background" = background; - "theme.bar.buttons.modules.kbLayout.icon" = accent.base; - "theme.bar.buttons.modules.kbLayout.text" = accent.base; - - "theme.bar.buttons.modules.microphone.background" = background; - "theme.bar.buttons.modules.microphone.border" = accent.base; - "theme.bar.buttons.modules.microphone.icon_background" = background; - "theme.bar.buttons.modules.microphone.icon" = accent.base; - "theme.bar.buttons.modules.microphone.text" = accent.base; - - "theme.bar.buttons.modules.netstat.background" = background; - "theme.bar.buttons.modules.netstat.border" = accent.base; - "theme.bar.buttons.modules.netstat.icon_background" = background; - "theme.bar.buttons.modules.netstat.icon" = accent.base; - "theme.bar.buttons.modules.netstat.text" = accent.base; - - "theme.bar.buttons.modules.power.background" = background; - "theme.bar.buttons.modules.power.border" = accent.base; - "theme.bar.buttons.modules.power.icon_background" = background; - "theme.bar.buttons.modules.power.icon" = accent.base; - - "theme.bar.buttons.modules.ram.background" = background; - "theme.bar.buttons.modules.ram.border" = accent.base; - "theme.bar.buttons.modules.ram.icon_background" = background; - "theme.bar.buttons.modules.ram.icon" = accent.base; - "theme.bar.buttons.modules.ram.text" = accent.base; - - "theme.bar.buttons.modules.storage.background" = background; - "theme.bar.buttons.modules.storage.border" = accent.base; - "theme.bar.buttons.modules.storage.icon_background" = background; - "theme.bar.buttons.modules.storage.icon" = accent.base; - "theme.bar.buttons.modules.storage.text" = accent.base; - - "theme.bar.buttons.modules.submap.background" = background; - "theme.bar.buttons.modules.submap.border" = accent.base; - "theme.bar.buttons.modules.submap.icon_background" = background; - "theme.bar.buttons.modules.submap.icon" = accent.base; - "theme.bar.buttons.modules.submap.text" = special.base; - - "theme.bar.buttons.modules.updates.background" = background; - "theme.bar.buttons.modules.updates.border" = accent.base; - "theme.bar.buttons.modules.updates.icon_background" = background; - "theme.bar.buttons.modules.updates.icon" = accent.base; - "theme.bar.buttons.modules.updates.text" = accent.base; - - "theme.bar.buttons.modules.weather.background" = background; - "theme.bar.buttons.modules.weather.border" = accent.base; - "theme.bar.buttons.modules.weather.icon_background" = background; - "theme.bar.buttons.modules.weather.icon" = accent.base; - "theme.bar.buttons.modules.weather.text" = accent.base; - - "theme.bar.buttons.modules.worldclock.background" = background; - "theme.bar.buttons.modules.worldclock.border" = accent.base; - "theme.bar.buttons.modules.worldclock.icon_background" = background; - "theme.bar.buttons.modules.worldclock.icon" = accent.base; - "theme.bar.buttons.modules.worldclock.text" = accent.base; - "theme.bar.buttons.monochrome" = false; - - "theme.bar.buttons.network.background" = background; - "theme.bar.buttons.network.border" = accent.base; - "theme.bar.buttons.network.icon_background" = background; - "theme.bar.buttons.network.icon" = accent.base; - "theme.bar.buttons.network.text" = accent.base; - - "theme.bar.buttons.notifications.background" = background; - "theme.bar.buttons.notifications.border" = accent.base; - "theme.bar.buttons.notifications.icon_background" = background; - "theme.bar.buttons.notifications.icon" = accent.base; - "theme.bar.buttons.notifications.total" = accent.base; - - "theme.bar.buttons.opacity" = t; - - "theme.bar.buttons.separator.color" = accent.base; - - "theme.bar.buttons.style" = "default"; - - "theme.bar.buttons.systray.background" = background; - "theme.bar.buttons.systray.border" = accent.base; - "theme.bar.buttons.systray.customIcon" = accent.base; - - "theme.bar.buttons.text" = accent.base; - - "theme.bar.buttons.volume.background" = background; - "theme.bar.buttons.volume.border" = accent.base; - "theme.bar.buttons.volume.icon_background" = background; - "theme.bar.buttons.volume.icon" = accent.base; - "theme.bar.buttons.volume.text" = accent.base; - - "theme.bar.buttons.windowtitle.background" = background; - "theme.bar.buttons.windowtitle.border" = secondary.base; - "theme.bar.buttons.windowtitle.icon_background" = background; - "theme.bar.buttons.windowtitle.icon" = secondary.base; - "theme.bar.buttons.windowtitle.text" = secondary.base; - - "theme.bar.buttons.workspaces.active" = accent.bright; - "theme.bar.buttons.workspaces.available" = accent.base; - "theme.bar.buttons.workspaces.background" = background; - "theme.bar.buttons.workspaces.border" = accent.base; - "theme.bar.buttons.workspaces.hover" = foreground; - "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; - "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.2em"; - "theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright; - "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.2em"; - "theme.bar.buttons.workspaces.occupied" = secondary.base; - "theme.bar.buttons.workspaces.pill.width" = "4em"; - "theme.bar.buttons.workspaces.smartHighlight" = true; - "theme.bar.buttons.y_margins" = "0em"; - - "theme.bar.location" = "bottom"; - - "theme.bar.menus.menu.battery.background.color" = background; - "theme.bar.menus.menu.battery.border.color" = accent.base; - "theme.bar.menus.menu.battery.card.color" = accent.dark; - "theme.bar.menus.menu.battery.icons.active" = accent.base; - "theme.bar.menus.menu.battery.icons.passive" = accent.base; - "theme.bar.menus.menu.battery.label.color" = accent.base; - "theme.bar.menus.menu.battery.listitems.active" = accent.base; - "theme.bar.menus.menu.battery.listitems.passive" = accent.base; - "theme.bar.menus.menu.battery.slider.background" = background; - "theme.bar.menus.menu.battery.slider.backgroundhover" = background; - "theme.bar.menus.menu.battery.slider.primary" = accent.base; - "theme.bar.menus.menu.battery.slider.puck" = accent.base; - "theme.bar.menus.menu.battery.text" = foreground; - - "theme.bar.menus.menu.bluetooth.background.color" = background; - "theme.bar.menus.menu.bluetooth.border.color" = accent.base; - "theme.bar.menus.menu.bluetooth.card.color" = accent.dark; - "theme.bar.menus.menu.bluetooth.iconbutton.active" = accent.base; - "theme.bar.menus.menu.bluetooth.iconbutton.passive" = accent.base; - "theme.bar.menus.menu.bluetooth.icons.active" = accent.base; - "theme.bar.menus.menu.bluetooth.icons.passive" = accent.base; - "theme.bar.menus.menu.bluetooth.label.color" = accent.base; - "theme.bar.menus.menu.bluetooth.listitems.active" = accent.base; - "theme.bar.menus.menu.bluetooth.listitems.passive" = accent.base; - "theme.bar.menus.menu.bluetooth.scroller.color" = accent.base; - "theme.bar.menus.menu.bluetooth.status" = accent.base; - "theme.bar.menus.menu.bluetooth.switch.disabled" = accent.base; - "theme.bar.menus.menu.bluetooth.switch_divider" = accent.base; - "theme.bar.menus.menu.bluetooth.switch.enabled" = accent.base; - "theme.bar.menus.menu.bluetooth.switch.puck" = accent.base; - "theme.bar.menus.menu.bluetooth.text" = foreground; - - "theme.bar.menus.menu.clock.background.color" = background; - "theme.bar.menus.menu.clock.border.color" = accent.base; - "theme.bar.menus.menu.clock.calendar.contextdays" = foreground; - "theme.bar.menus.menu.clock.calendar.currentday" = accent.base; - "theme.bar.menus.menu.clock.calendar.days" = accent.base; - "theme.bar.menus.menu.clock.calendar.paginator" = accent.base; - "theme.bar.menus.menu.clock.calendar.weekdays" = accent.base; - "theme.bar.menus.menu.clock.calendar.yearmonth" = accent.base; - "theme.bar.menus.menu.clock.card.color" = accent.dark; - "theme.bar.menus.menu.clock.text" = foreground; - "theme.bar.menus.menu.clock.time.time" = accent.base; - "theme.bar.menus.menu.clock.time.timeperiod" = accent.base; - "theme.bar.menus.menu.clock.weather.hourly.icon" = accent.base; - "theme.bar.menus.menu.clock.weather.hourly.temperature" = accent.base; - "theme.bar.menus.menu.clock.weather.hourly.time" = accent.base; - "theme.bar.menus.menu.clock.weather.icon" = accent.base; - "theme.bar.menus.menu.clock.weather.stats" = accent.base; - "theme.bar.menus.menu.clock.weather.status" = accent.base; - "theme.bar.menus.menu.clock.weather.temperature" = accent.base; - "theme.bar.menus.menu.clock.weather.thermometer.cold" = accent.base; - "theme.bar.menus.menu.clock.weather.thermometer.extremelycold" = accent.base; - "theme.bar.menus.menu.clock.weather.thermometer.extremelyhot" = accent.base; - "theme.bar.menus.menu.clock.weather.thermometer.hot" = accent.base; - "theme.bar.menus.menu.clock.weather.thermometer.moderate" = accent.base; - - "theme.bar.menus.menu.dashboard.background.color" = background; - "theme.bar.menus.menu.dashboard.border.color" = accent.base; - "theme.bar.menus.menu.dashboard.card.color" = accent.dark; - - "theme.bar.menus.menu.dashboard.controls.bluetooth.background" = background; - "theme.bar.menus.menu.dashboard.controls.bluetooth.text" = foreground; - "theme.bar.menus.menu.dashboard.controls.disabled" = accent.base; - "theme.bar.menus.menu.dashboard.controls.input.background" = background; - "theme.bar.menus.menu.dashboard.controls.input.text" = foreground; - "theme.bar.menus.menu.dashboard.controls.notifications.background" = background; - "theme.bar.menus.menu.dashboard.controls.notifications.text" = foreground; - "theme.bar.menus.menu.dashboard.controls.volume.background" = background; - "theme.bar.menus.menu.dashboard.controls.volume.text" = foreground; - "theme.bar.menus.menu.dashboard.controls.wifi.background" = background; - "theme.bar.menus.menu.dashboard.controls.wifi.text" = foreground; - - "theme.bar.menus.menu.dashboard.directories.left.bottom.color" = accent.base; - "theme.bar.menus.menu.dashboard.directories.left.middle.color" = accent.base; - "theme.bar.menus.menu.dashboard.directories.left.top.color" = accent.base; - "theme.bar.menus.menu.dashboard.directories.right.bottom.color" = accent.base; - "theme.bar.menus.menu.dashboard.directories.right.middle.color" = accent.base; - "theme.bar.menus.menu.dashboard.directories.right.top.color" = accent.base; - - "theme.bar.menus.menu.dashboard.monitors.bar_background" = background; - "theme.bar.menus.menu.dashboard.monitors.cpu.bar" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.cpu.icon" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.cpu.label" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.disk.bar" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.disk.icon" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.disk.label" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.gpu.bar" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.gpu.icon" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.gpu.label" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.ram.bar" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.ram.icon" = accent.base; - "theme.bar.menus.menu.dashboard.monitors.ram.label" = accent.base; - - "theme.bar.menus.menu.dashboard.powermenu.confirmation.background" = background; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.body" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.border" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.button_text" = foreground; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.card" = accent.dark; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.confirm" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.deny" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.confirmation.label" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.logout" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.restart" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.shutdown" = accent.base; - "theme.bar.menus.menu.dashboard.powermenu.sleep" = accent.base; - "theme.bar.menus.menu.dashboard.profile.name" = accent.base; - "theme.bar.menus.menu.dashboard.shortcuts.background" = background; - "theme.bar.menus.menu.dashboard.shortcuts.recording" = accent.base; - "theme.bar.menus.menu.dashboard.shortcuts.text" = foreground; - - "theme.bar.menus.menu.media.album" = accent.base; - "theme.bar.menus.menu.media.artist" = accent.base; - "theme.bar.menus.menu.media.background.color" = "#000000"; - "theme.bar.menus.menu.media.border.color" = accent.base; - "theme.bar.menus.menu.media.buttons.background" = background; - "theme.bar.menus.menu.media.buttons.enabled" = accent.base; - "theme.bar.menus.menu.media.buttons.inactive" = accent.base; - "theme.bar.menus.menu.media.buttons.text" = foreground; - "theme.bar.menus.menu.media.card.color" = accent.dark; - "theme.bar.menus.menu.media.card.tint" = accent.dark; - "theme.bar.menus.menu.media.slider.background" = accent.dark; - "theme.bar.menus.menu.media.slider.backgroundhover" = secondary.dark; - "theme.bar.menus.menu.media.slider.primary" = accent.base; - "theme.bar.menus.menu.media.slider.puck" = accent.bright; - "theme.bar.menus.menu.media.song" = accent.base; - "theme.bar.menus.menu.media.timestamp" = accent.base; - - "theme.bar.menus.menu.network.background.color" = background; - "theme.bar.menus.menu.network.border.color" = accent.base; - "theme.bar.menus.menu.network.card.color" = accent.dark; - "theme.bar.menus.menu.network.iconbuttons.active" = accent.base; - "theme.bar.menus.menu.network.iconbuttons.passive" = accent.base; - "theme.bar.menus.menu.network.icons.active" = accent.base; - "theme.bar.menus.menu.network.icons.passive" = accent.base; - "theme.bar.menus.menu.network.label.color" = accent.base; - "theme.bar.menus.menu.network.listitems.active" = accent.base; - "theme.bar.menus.menu.network.listitems.passive" = accent.base; - "theme.bar.menus.menu.network.scroller.color" = accent.base; - "theme.bar.menus.menu.network.status.color" = accent.base; - "theme.bar.menus.menu.network.switch.disabled" = accent.base; - "theme.bar.menus.menu.network.switch.enabled" = accent.base; - "theme.bar.menus.menu.network.switch.puck" = accent.base; - "theme.bar.menus.menu.network.text" = foreground; - - "theme.bar.menus.menu.notifications.background" = background; - "theme.bar.menus.menu.notifications.border" = accent.base; - "theme.bar.menus.menu.notifications.card" = accent.dark; - "theme.bar.menus.menu.notifications.clear" = accent.base; - "theme.bar.menus.menu.notifications.label" = accent.base; - "theme.bar.menus.menu.notifications.no_notifications_label" = accent.base; - "theme.bar.menus.menu.notifications.pager.background" = background; - "theme.bar.menus.menu.notifications.pager.button" = accent.dark; - "theme.bar.menus.menu.notifications.pager.label" = accent.base; - "theme.bar.menus.menu.notifications.scrollbar.color" = accent.base; - "theme.bar.menus.menu.notifications.switch.disabled" = accent.base; - "theme.bar.menus.menu.notifications.switch_divider" = accent.base; - "theme.bar.menus.menu.notifications.switch.enabled" = accent.base; - "theme.bar.menus.menu.notifications.switch.puck" = accent.base; - - - "theme.bar.menus.menu.power.background.color" = background; - "theme.bar.menus.menu.power.border.color" = accent.base; - - "theme.bar.menus.menu.power.buttons.logout.background" = background; - "theme.bar.menus.menu.power.buttons.logout.icon_background" = background; - "theme.bar.menus.menu.power.buttons.logout.icon" = accent.base; - "theme.bar.menus.menu.power.buttons.logout.text" = foreground; - - "theme.bar.menus.menu.power.buttons.restart.background" = background; - "theme.bar.menus.menu.power.buttons.restart.icon_background" = background; - "theme.bar.menus.menu.power.buttons.restart.icon" = accent.base; - "theme.bar.menus.menu.power.buttons.restart.text" = foreground; - - "theme.bar.menus.menu.power.buttons.shutdown.background" = background; - "theme.bar.menus.menu.power.buttons.shutdown.icon_background" = background; - "theme.bar.menus.menu.power.buttons.shutdown.icon" = accent.base; - "theme.bar.menus.menu.power.buttons.shutdown.text" = foreground; - - "theme.bar.menus.menu.power.buttons.sleep.background" = background; - "theme.bar.menus.menu.power.buttons.sleep.icon_background" = background; - "theme.bar.menus.menu.power.buttons.sleep.icon" = accent.base; - "theme.bar.menus.menu.power.buttons.sleep.text" = foreground; - - - "theme.bar.menus.menu.systray.dropdownmenu.background" = background; - "theme.bar.menus.menu.systray.dropdownmenu.divider" = accent.base; - "theme.bar.menus.menu.systray.dropdownmenu.text" = foreground; - - "theme.bar.menus.menu.volume.audio_slider.background" = background; - "theme.bar.menus.menu.volume.audio_slider.backgroundhover" = background; - "theme.bar.menus.menu.volume.audio_slider.primary" = accent.base; - "theme.bar.menus.menu.volume.audio_slider.puck" = accent.base; - "theme.bar.menus.menu.volume.background.color" = background; - "theme.bar.menus.menu.volume.border.color" = accent.base; - "theme.bar.menus.menu.volume.card.color" = accent.dark; - "theme.bar.menus.menu.volume.iconbutton.active" = accent.base; - "theme.bar.menus.menu.volume.iconbutton.passive" = accent.base; - "theme.bar.menus.menu.volume.input_slider.background" = background; - "theme.bar.menus.menu.volume.input_slider.backgroundhover" = background; - "theme.bar.menus.menu.volume.input_slider.primary" = accent.base; - "theme.bar.menus.menu.volume.input_slider.puck" = accent.base; - "theme.bar.menus.menu.volume.label.color" = accent.base; - "theme.bar.menus.menu.volume.listitems.active" = accent.base; - "theme.bar.menus.menu.volume.listitems.passive" = accent.base; - "theme.bar.menus.menu.volume.text" = foreground; - - "theme.bar.menus.monochrome" = false; - - "theme.bar.opacity" = t; - "theme.bar.outer_spacing" = "0em"; - "theme.bar.transparent" = false; - - "theme.font.name" = rice.font.code.name; - "theme.font.size" = "12px"; - - "theme.notification.actions.background" = background; - "theme.notification.actions.text" = foreground; - "theme.notification.background" = background; - "theme.notification.border" = accent.base; - "theme.notification.close_button.background" = accent.dark; - "theme.notification.close_button.label" = accent.base; - "theme.notification.label" = accent.base; - "theme.notification.labelicon" = accent.base; - "theme.notification.opacity" = 1.0; - "theme.notification.text" = foreground; - "theme.notification.time" = accent.base; - - "theme.osd.bar_color" = accent.base; - "theme.osd.bar_container" = accent.dark; - "theme.osd.bar_empty_color" = accent.dark; - "theme.osd.bar_overflow_color" = accent.base; - "theme.osd.border.color" = border; - "theme.osd.icon_container" = secondary.dark; - "theme.osd.icon" = secondary.bright; - "theme.osd.label" = accent.bright; - "theme.osd.opacity" = t; - }; - }; - }; } diff --git a/home-modules/bar/caldav-event.nix b/home-modules/bar/caldav-event.nix new file mode 100644 index 0000000..f8cefbc --- /dev/null +++ b/home-modules/bar/caldav-event.nix @@ -0,0 +1,126 @@ +{ pkgs, ... }@all: with all; { + sops.secrets = { + "nx2site/radicale/password" = { }; + }; + home.packages = [ + (pkgs.writers.writePython3Bin "caldav_event" { + libraries = with pkgs.python3Packages; [ caldav ics pytz ]; + flakeIgnore = [ "E302" "E305" "E501" "E261" ]; + } /* python */ '' +import os +import json +from caldav import DAVClient +from datetime import datetime, timezone +from ics import Calendar +from pytz import UTC + +def get_password(password_file): + with open(password_file, "r") as file: + return file.read().strip() + +def datetime_converter(obj): + if isinstance(obj, datetime): + return obj.isoformat() + return obj + +def datetime_parser(dct): + for key, value in dct.items(): + if isinstance(value, str): + try: + dct[key] = datetime.fromisoformat(value) + except ValueError: + pass + return dct + +def load_cache(cache_file): + if os.path.exists(cache_file): + with open(cache_file, "r") as file: + return json.load(file, object_hook=datetime_parser) + return None + +def save_cache(cache_file, data): + with open(cache_file, "w") as file: + json.dump(data, file, default=datetime_converter, indent=4) + + +def get_ongoing_or_next_event(url, username, password): + now = datetime.now(timezone.utc) + + try: + client = DAVClient(url, username=username, password=password) + principal = client.principal() + calendars = principal.calendars() + + next_event_dict = { + 'event_name': "fake", + 'event_begin': datetime(9000, 1, 1, tzinfo=UTC), # in the year 9000 + 'event_end': datetime(9000, 1, 1, 8, tzinfo=UTC), + } + + for calendar in calendars: + for event in calendar.search(start=now): + calendar_parsed = Calendar(event.data) + for ics_event in calendar_parsed.events: + event_dict = {} + event_dict['event_name'] = ics_event.name or "(No Title)" + event_dict['event_begin'] = ics_event.begin.astimezone(timezone.utc) + event_dict['event_end'] = ics_event.end.astimezone(timezone.utc) + + if event_dict['event_begin'] <= now and now <= event_dict['event_end']: + return event_dict + elif event_dict['event_begin'] >= now and next_event_dict['event_begin'] > event_dict['event_begin']: + next_event_dict = event_dict + return next_event_dict + + except Exception as e: + print(f"Error accessing {url}: {e}") + return None + +def is_expired(event_dict: dict): + now = datetime.now(timezone.utc).timestamp() + event_end = event_dict['event_end'].timestamp() + return not (now <= event_end) + +if __name__ == "__main__": + password_file = "${config.sops.secrets."nx2site/radicale/password".path}" # Path to password file + cache_file = "/tmp/caldav_event_cache.json" # Path to cache file + url = "https://dav.${hyper.domain}/" + username = "nx2" + password = get_password(password_file) + now = datetime.now(timezone.utc).timestamp() + + event_dict = load_cache(cache_file) + + if (event_dict is None) or (is_expired(event_dict)): + event_dict = get_ongoing_or_next_event(url, username, password) + save_cache(cache_file, event_dict) + + if event_dict is None: # none were found + print("* zen *") + exit(0) + + event_start = event_dict['event_begin'].timestamp() + event_end = event_dict['event_end'].timestamp() + + if event_start <= now <= event_end: # is currently ongoing + action_string = "ends" + t = event_end - now # time_remaining + else: # is in the future + action_string = "starts" + t = event_start - now # time_remaining + + hours, rem = divmod(int(t), 3600) + minutes, _ = divmod(rem, 60) + hour_string = f"{hours} hour{'s ' if hours != 1 else ' '}" if hours > 0 else "" + minu_string = f"{minutes} minute{'s ' if minutes != 1 else ' '}" if minutes > 0 else "" + if hour_string == "" and minu_string == "": + time_string = "now" + elif hour_string == "" or minu_string == "": + time_string = "in " + hour_string + minu_string + else: + time_string = "in " + hour_string + "and " + minu_string + + print(f"{event_dict['event_name']} {action_string} {time_string}") +'') + ]; +} diff --git a/home-modules/bar/cclock.nix b/home-modules/bar/cclock.nix new file mode 100644 index 0000000..ce2ab53 --- /dev/null +++ b/home-modules/bar/cclock.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: let + sep = " "; +in { + home.packages = [ + (pkgs.writeShellApplication { name = "cclock"; text = /* bash */ '' + ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}') + if [ $# -eq 0 ]; then + echo "󰃮${sep}$(date +'%A the')" "$ord" "of" "$(date +'%B')" " ${sep}$(date +'%R')" + elif [ "$1" = "--no-icons" ]; then + echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')" + fi + '';}) + ]; +} diff --git a/home-modules/bar/hyprpanel.nix b/home-modules/bar/hyprpanel.nix new file mode 100644 index 0000000..809af55 --- /dev/null +++ b/home-modules/bar/hyprpanel.nix @@ -0,0 +1,512 @@ +{ pkgs, ... }@all: with all; { + xdg.configFile = { + "hyprpanel/modules.scss".text = with rice.color; /* scss */ '' + @include styleModule('cmodule-cclock', ( + 'text-color': ${accent.base}, + /* 'icon-color': , */ + /* 'icon-background': , */ + /* 'label-background': #242438, */ + /* 'inner-spacing': 0.5em, */ + /* 'border-enabled': false, */ + /* 'border-color': #cba6f7, */ + /* 'icon-size': 1.2em */ + )); + @include styleModule('cmodule-caldav_event', ( + 'text-color': ${accent.base}, + )); + ''; + "hyprpanel/modules.json".text = builtins.toJSON { + "custom/cclock" = { + execute = "cclock"; + executeOnAction = ""; + label = "{}"; + interval = 60000; + hideOnEmpty = true; + actions.onLeftClick = "menu:calendar"; + }; + "custom/caldav_evnet" = { + execute = "caldav_event"; + executeOnAction = ""; + label = "{}"; + interval = 60000; + hideOnEmpty = true; + actions = {}; + }; + }; + }; + programs.hyprpanel = { + enable = true; + package = pkgs.unstable.hyprpanel; + settings = with rice.color; let + t = builtins.toString (builtins.ceil (rice.transparency * 100)); + in { + "bar.layouts" = { + "*" = { + "left" = [ + "volume" + # "microphone" + # "cpu" + # "cputemp" + # "ram" + "battery" + # "bluetooth" + "network" + "windowtitle" + ]; + "middle" = [ "workspaces" ]; + "right" = [ + "submap" + "custom/caldav_event" + "media" + "custom/cclock" + "notifications" + "systray" + ]; + }; + }; + + "bar.bluetooth.label" = true; + + "bar.customModules.submap.enabledIcon" = "[󰧹]"; + "bar.customModules.submap.showSubmapName" = false; + "bar.customModules.submap.label" = false; + "bar.customModules.submap.icon" = true; + "bar.customModules.submap.disabledIcon" = ""; + + "bar.workspaces.applicationIconEmptyWorkspace" = ""; + "bar.workspaces.applicationIconOncePerWorkspace" = false; + "bar.workspaces.numbered_active_indicator" = "underline"; + "bar.workspaces.scroll_speed" = 1; + "bar.workspaces.showAllActive" = false; + "bar.workspaces.showApplicationIcons" = true; + "bar.workspaces.show_icons" = false; + "bar.workspaces.show_numbered" = false; + "bar.workspaces.showWsIcons" = true; + "bar.workspaces.spacing" = 1; + "bar.workspaces.workspaceMask" = true; + "bar.workspaces.workspaces" = 5; + + "theme.bar.background" = background; + "theme.bar.border.color" = accent.base; + "theme.bar.border_radius" = "0.2em"; + + "theme.bar.buttons.background" = background; + "theme.bar.buttons.background_opacity" = 0; + "theme.bar.buttons.spacing" = "0em"; + "theme.bar.buttons.padding_x" = "0.5rem"; + + "theme.bar.buttons.battery.background" = background; + "theme.bar.buttons.battery.border" = accent.base; + "theme.bar.buttons.battery.icon_background" = background; + "theme.bar.buttons.battery.icon" = accent.base; + "theme.bar.buttons.battery.text" = accent.base; + + "theme.bar.buttons.bluetooth.background" = background; + "theme.bar.buttons.bluetooth.border" = accent.base; + "theme.bar.buttons.bluetooth.icon_background" = background; + "theme.bar.buttons.bluetooth.icon" = accent.base; + "theme.bar.buttons.bluetooth.text" = accent.base; + + "theme.bar.buttons.borderColor" = accent.base; + + "theme.bar.buttons.clock.background" = background; + "theme.bar.buttons.clock.border" = accent.base; + "theme.bar.buttons.clock.icon_background" = background; + "theme.bar.buttons.clock.icon" = accent.base; + "theme.bar.buttons.clock.text" = accent.base; + + "theme.bar.buttons.dashboard.background" = background; + "theme.bar.buttons.dashboard.border" = accent.base; + "theme.bar.buttons.dashboard.icon" = accent.base; + "theme.bar.buttons.icon_background" = background; + + "theme.bar.buttons.icon" = accent.base; + + "theme.bar.buttons.media.background" = background; + "theme.bar.buttons.media.border" = accent.base; + "theme.bar.buttons.media.icon_background" = background; + "theme.bar.buttons.media.icon" = accent.base; + "theme.bar.buttons.media.text" = accent.base; + + "theme.bar.buttons.modules.cava.background" = background; + "theme.bar.buttons.modules.cava.border" = accent.base; + "theme.bar.buttons.modules.cava.icon_background" = background; + "theme.bar.buttons.modules.cava.icon" = accent.base; + "theme.bar.buttons.modules.cava.text" = accent.base; + + "theme.bar.buttons.modules.cpu.background" = background; + "theme.bar.buttons.modules.cpu.border" = accent.base; + "theme.bar.buttons.modules.cpu.icon_background" = background; + "theme.bar.buttons.modules.cpu.icon" = accent.base; + "theme.bar.buttons.modules.cpu.text" = accent.base; + + "theme.bar.buttons.modules.cpuTemp.background" = background; + "theme.bar.buttons.modules.cpuTemp.border" = accent.base; + "theme.bar.buttons.modules.cpuTemp.icon_background" = background; + "theme.bar.buttons.modules.cpuTemp.icon" = accent.base; + "theme.bar.buttons.modules.cpuTemp.text" = accent.base; + + "theme.bar.buttons.modules.hypridle.background" = background; + "theme.bar.buttons.modules.hypridle.border" = accent.base; + "theme.bar.buttons.modules.hypridle.icon_background" = background; + "theme.bar.buttons.modules.hypridle.icon" = accent.base; + "theme.bar.buttons.modules.hypridle.text" = accent.base; + + "theme.bar.buttons.modules.hyprsunset.background" = background; + "theme.bar.buttons.modules.hyprsunset.border" = accent.base; + "theme.bar.buttons.modules.hyprsunset.icon_background" = background; + "theme.bar.buttons.modules.hyprsunset.icon" = accent.base; + "theme.bar.buttons.modules.hyprsunset.text" = accent.base; + + "theme.bar.buttons.modules.kbLayout.background" = background; + "theme.bar.buttons.modules.kbLayout.border" = accent.base; + "theme.bar.buttons.modules.kbLayout.icon_background" = background; + "theme.bar.buttons.modules.kbLayout.icon" = accent.base; + "theme.bar.buttons.modules.kbLayout.text" = accent.base; + + "theme.bar.buttons.modules.microphone.background" = background; + "theme.bar.buttons.modules.microphone.border" = accent.base; + "theme.bar.buttons.modules.microphone.icon_background" = background; + "theme.bar.buttons.modules.microphone.icon" = accent.base; + "theme.bar.buttons.modules.microphone.text" = accent.base; + + "theme.bar.buttons.modules.netstat.background" = background; + "theme.bar.buttons.modules.netstat.border" = accent.base; + "theme.bar.buttons.modules.netstat.icon_background" = background; + "theme.bar.buttons.modules.netstat.icon" = accent.base; + "theme.bar.buttons.modules.netstat.text" = accent.base; + + "theme.bar.buttons.modules.power.background" = background; + "theme.bar.buttons.modules.power.border" = accent.base; + "theme.bar.buttons.modules.power.icon_background" = background; + "theme.bar.buttons.modules.power.icon" = accent.base; + + "theme.bar.buttons.modules.ram.background" = background; + "theme.bar.buttons.modules.ram.border" = accent.base; + "theme.bar.buttons.modules.ram.icon_background" = background; + "theme.bar.buttons.modules.ram.icon" = accent.base; + "theme.bar.buttons.modules.ram.text" = accent.base; + + "theme.bar.buttons.modules.storage.background" = background; + "theme.bar.buttons.modules.storage.border" = accent.base; + "theme.bar.buttons.modules.storage.icon_background" = background; + "theme.bar.buttons.modules.storage.icon" = accent.base; + "theme.bar.buttons.modules.storage.text" = accent.base; + + "theme.bar.buttons.modules.submap.background" = background; + "theme.bar.buttons.modules.submap.border" = accent.base; + "theme.bar.buttons.modules.submap.icon_background" = background; + "theme.bar.buttons.modules.submap.icon" = accent.base; + "theme.bar.buttons.modules.submap.text" = special.base; + + "theme.bar.buttons.modules.updates.background" = background; + "theme.bar.buttons.modules.updates.border" = accent.base; + "theme.bar.buttons.modules.updates.icon_background" = background; + "theme.bar.buttons.modules.updates.icon" = accent.base; + "theme.bar.buttons.modules.updates.text" = accent.base; + + "theme.bar.buttons.modules.weather.background" = background; + "theme.bar.buttons.modules.weather.border" = accent.base; + "theme.bar.buttons.modules.weather.icon_background" = background; + "theme.bar.buttons.modules.weather.icon" = accent.base; + "theme.bar.buttons.modules.weather.text" = accent.base; + + "theme.bar.buttons.modules.worldclock.background" = background; + "theme.bar.buttons.modules.worldclock.border" = accent.base; + "theme.bar.buttons.modules.worldclock.icon_background" = background; + "theme.bar.buttons.modules.worldclock.icon" = accent.base; + "theme.bar.buttons.modules.worldclock.text" = accent.base; + "theme.bar.buttons.monochrome" = false; + + "theme.bar.buttons.network.background" = background; + "theme.bar.buttons.network.border" = accent.base; + "theme.bar.buttons.network.icon_background" = background; + "theme.bar.buttons.network.icon" = accent.base; + "theme.bar.buttons.network.text" = accent.base; + + "theme.bar.buttons.notifications.background" = background; + "theme.bar.buttons.notifications.border" = accent.base; + "theme.bar.buttons.notifications.icon_background" = background; + "theme.bar.buttons.notifications.icon" = accent.base; + "theme.bar.buttons.notifications.total" = accent.base; + + "theme.bar.buttons.opacity" = t; + + "theme.bar.buttons.separator.color" = accent.base; + + "theme.bar.buttons.style" = "default"; + + "theme.bar.buttons.systray.background" = background; + "theme.bar.buttons.systray.border" = accent.base; + "theme.bar.buttons.systray.customIcon" = accent.base; + + "theme.bar.buttons.text" = accent.base; + + "theme.bar.buttons.volume.background" = background; + "theme.bar.buttons.volume.border" = accent.base; + "theme.bar.buttons.volume.icon_background" = background; + "theme.bar.buttons.volume.icon" = accent.base; + "theme.bar.buttons.volume.text" = accent.base; + + "theme.bar.buttons.windowtitle.background" = background; + "theme.bar.buttons.windowtitle.border" = secondary.base; + "theme.bar.buttons.windowtitle.icon_background" = background; + "theme.bar.buttons.windowtitle.icon" = secondary.base; + "theme.bar.buttons.windowtitle.text" = secondary.base; + + "theme.bar.buttons.workspaces.active" = accent.bright; + "theme.bar.buttons.workspaces.available" = accent.base; + "theme.bar.buttons.workspaces.background" = background; + "theme.bar.buttons.workspaces.border" = accent.base; + "theme.bar.buttons.workspaces.hover" = foreground; + "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; + "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.2em"; + "theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright; + "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.2em"; + "theme.bar.buttons.workspaces.occupied" = secondary.base; + "theme.bar.buttons.workspaces.pill.width" = "4em"; + "theme.bar.buttons.workspaces.smartHighlight" = true; + "theme.bar.buttons.y_margins" = "0em"; + + "theme.bar.location" = "bottom"; + + "theme.bar.menus.menu.battery.background.color" = background; + "theme.bar.menus.menu.battery.border.color" = accent.base; + "theme.bar.menus.menu.battery.card.color" = accent.dark; + "theme.bar.menus.menu.battery.icons.active" = accent.base; + "theme.bar.menus.menu.battery.icons.passive" = accent.base; + "theme.bar.menus.menu.battery.label.color" = accent.base; + "theme.bar.menus.menu.battery.listitems.active" = accent.base; + "theme.bar.menus.menu.battery.listitems.passive" = accent.base; + "theme.bar.menus.menu.battery.slider.background" = background; + "theme.bar.menus.menu.battery.slider.backgroundhover" = background; + "theme.bar.menus.menu.battery.slider.primary" = accent.base; + "theme.bar.menus.menu.battery.slider.puck" = accent.base; + "theme.bar.menus.menu.battery.text" = foreground; + + "theme.bar.menus.menu.bluetooth.background.color" = background; + "theme.bar.menus.menu.bluetooth.border.color" = accent.base; + "theme.bar.menus.menu.bluetooth.card.color" = accent.dark; + "theme.bar.menus.menu.bluetooth.iconbutton.active" = accent.base; + "theme.bar.menus.menu.bluetooth.iconbutton.passive" = accent.base; + "theme.bar.menus.menu.bluetooth.icons.active" = accent.base; + "theme.bar.menus.menu.bluetooth.icons.passive" = accent.base; + "theme.bar.menus.menu.bluetooth.label.color" = accent.base; + "theme.bar.menus.menu.bluetooth.listitems.active" = accent.base; + "theme.bar.menus.menu.bluetooth.listitems.passive" = accent.base; + "theme.bar.menus.menu.bluetooth.scroller.color" = accent.base; + "theme.bar.menus.menu.bluetooth.status" = accent.base; + "theme.bar.menus.menu.bluetooth.switch.disabled" = accent.base; + "theme.bar.menus.menu.bluetooth.switch_divider" = accent.base; + "theme.bar.menus.menu.bluetooth.switch.enabled" = accent.base; + "theme.bar.menus.menu.bluetooth.switch.puck" = accent.base; + "theme.bar.menus.menu.bluetooth.text" = foreground; + + "theme.bar.menus.menu.clock.background.color" = background; + "theme.bar.menus.menu.clock.border.color" = accent.base; + "theme.bar.menus.menu.clock.calendar.contextdays" = foreground; + "theme.bar.menus.menu.clock.calendar.currentday" = accent.base; + "theme.bar.menus.menu.clock.calendar.days" = accent.base; + "theme.bar.menus.menu.clock.calendar.paginator" = accent.base; + "theme.bar.menus.menu.clock.calendar.weekdays" = accent.base; + "theme.bar.menus.menu.clock.calendar.yearmonth" = accent.base; + "theme.bar.menus.menu.clock.card.color" = accent.dark; + "theme.bar.menus.menu.clock.text" = foreground; + "theme.bar.menus.menu.clock.time.time" = accent.base; + "theme.bar.menus.menu.clock.time.timeperiod" = accent.base; + "theme.bar.menus.menu.clock.weather.hourly.icon" = accent.base; + "theme.bar.menus.menu.clock.weather.hourly.temperature" = accent.base; + "theme.bar.menus.menu.clock.weather.hourly.time" = accent.base; + "theme.bar.menus.menu.clock.weather.icon" = accent.base; + "theme.bar.menus.menu.clock.weather.stats" = accent.base; + "theme.bar.menus.menu.clock.weather.status" = accent.base; + "theme.bar.menus.menu.clock.weather.temperature" = accent.base; + "theme.bar.menus.menu.clock.weather.thermometer.cold" = accent.base; + "theme.bar.menus.menu.clock.weather.thermometer.extremelycold" = accent.base; + "theme.bar.menus.menu.clock.weather.thermometer.extremelyhot" = accent.base; + "theme.bar.menus.menu.clock.weather.thermometer.hot" = accent.base; + "theme.bar.menus.menu.clock.weather.thermometer.moderate" = accent.base; + + "theme.bar.menus.menu.dashboard.background.color" = background; + "theme.bar.menus.menu.dashboard.border.color" = accent.base; + "theme.bar.menus.menu.dashboard.card.color" = accent.dark; + + "theme.bar.menus.menu.dashboard.controls.bluetooth.background" = background; + "theme.bar.menus.menu.dashboard.controls.bluetooth.text" = foreground; + "theme.bar.menus.menu.dashboard.controls.disabled" = accent.base; + "theme.bar.menus.menu.dashboard.controls.input.background" = background; + "theme.bar.menus.menu.dashboard.controls.input.text" = foreground; + "theme.bar.menus.menu.dashboard.controls.notifications.background" = background; + "theme.bar.menus.menu.dashboard.controls.notifications.text" = foreground; + "theme.bar.menus.menu.dashboard.controls.volume.background" = background; + "theme.bar.menus.menu.dashboard.controls.volume.text" = foreground; + "theme.bar.menus.menu.dashboard.controls.wifi.background" = background; + "theme.bar.menus.menu.dashboard.controls.wifi.text" = foreground; + + "theme.bar.menus.menu.dashboard.directories.left.bottom.color" = accent.base; + "theme.bar.menus.menu.dashboard.directories.left.middle.color" = accent.base; + "theme.bar.menus.menu.dashboard.directories.left.top.color" = accent.base; + "theme.bar.menus.menu.dashboard.directories.right.bottom.color" = accent.base; + "theme.bar.menus.menu.dashboard.directories.right.middle.color" = accent.base; + "theme.bar.menus.menu.dashboard.directories.right.top.color" = accent.base; + + "theme.bar.menus.menu.dashboard.monitors.bar_background" = background; + "theme.bar.menus.menu.dashboard.monitors.cpu.bar" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.cpu.icon" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.cpu.label" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.disk.bar" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.disk.icon" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.disk.label" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.gpu.bar" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.gpu.icon" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.gpu.label" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.ram.bar" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.ram.icon" = accent.base; + "theme.bar.menus.menu.dashboard.monitors.ram.label" = accent.base; + + "theme.bar.menus.menu.dashboard.powermenu.confirmation.background" = background; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.body" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.border" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.button_text" = foreground; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.card" = accent.dark; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.confirm" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.deny" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.confirmation.label" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.logout" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.restart" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.shutdown" = accent.base; + "theme.bar.menus.menu.dashboard.powermenu.sleep" = accent.base; + "theme.bar.menus.menu.dashboard.profile.name" = accent.base; + "theme.bar.menus.menu.dashboard.shortcuts.background" = background; + "theme.bar.menus.menu.dashboard.shortcuts.recording" = accent.base; + "theme.bar.menus.menu.dashboard.shortcuts.text" = foreground; + + "theme.bar.menus.menu.media.album" = accent.base; + "theme.bar.menus.menu.media.artist" = accent.base; + "theme.bar.menus.menu.media.background.color" = "#000000"; + "theme.bar.menus.menu.media.border.color" = accent.base; + "theme.bar.menus.menu.media.buttons.background" = background; + "theme.bar.menus.menu.media.buttons.enabled" = accent.base; + "theme.bar.menus.menu.media.buttons.inactive" = accent.base; + "theme.bar.menus.menu.media.buttons.text" = foreground; + "theme.bar.menus.menu.media.card.color" = accent.dark; + "theme.bar.menus.menu.media.card.tint" = accent.dark; + "theme.bar.menus.menu.media.slider.background" = accent.dark; + "theme.bar.menus.menu.media.slider.backgroundhover" = secondary.dark; + "theme.bar.menus.menu.media.slider.primary" = accent.base; + "theme.bar.menus.menu.media.slider.puck" = accent.bright; + "theme.bar.menus.menu.media.song" = accent.base; + "theme.bar.menus.menu.media.timestamp" = accent.base; + + "theme.bar.menus.menu.network.background.color" = background; + "theme.bar.menus.menu.network.border.color" = accent.base; + "theme.bar.menus.menu.network.card.color" = accent.dark; + "theme.bar.menus.menu.network.iconbuttons.active" = accent.base; + "theme.bar.menus.menu.network.iconbuttons.passive" = accent.base; + "theme.bar.menus.menu.network.icons.active" = accent.base; + "theme.bar.menus.menu.network.icons.passive" = accent.base; + "theme.bar.menus.menu.network.label.color" = accent.base; + "theme.bar.menus.menu.network.listitems.active" = accent.base; + "theme.bar.menus.menu.network.listitems.passive" = accent.base; + "theme.bar.menus.menu.network.scroller.color" = accent.base; + "theme.bar.menus.menu.network.status.color" = accent.base; + "theme.bar.menus.menu.network.switch.disabled" = accent.base; + "theme.bar.menus.menu.network.switch.enabled" = accent.base; + "theme.bar.menus.menu.network.switch.puck" = accent.base; + "theme.bar.menus.menu.network.text" = foreground; + + "theme.bar.menus.menu.notifications.background" = background; + "theme.bar.menus.menu.notifications.border" = accent.base; + "theme.bar.menus.menu.notifications.card" = accent.dark; + "theme.bar.menus.menu.notifications.clear" = accent.base; + "theme.bar.menus.menu.notifications.label" = accent.base; + "theme.bar.menus.menu.notifications.no_notifications_label" = accent.base; + "theme.bar.menus.menu.notifications.pager.background" = background; + "theme.bar.menus.menu.notifications.pager.button" = accent.dark; + "theme.bar.menus.menu.notifications.pager.label" = accent.base; + "theme.bar.menus.menu.notifications.scrollbar.color" = accent.base; + "theme.bar.menus.menu.notifications.switch.disabled" = accent.base; + "theme.bar.menus.menu.notifications.switch_divider" = accent.base; + "theme.bar.menus.menu.notifications.switch.enabled" = accent.base; + "theme.bar.menus.menu.notifications.switch.puck" = accent.base; + + + "theme.bar.menus.menu.power.background.color" = background; + "theme.bar.menus.menu.power.border.color" = accent.base; + + "theme.bar.menus.menu.power.buttons.logout.background" = background; + "theme.bar.menus.menu.power.buttons.logout.icon_background" = background; + "theme.bar.menus.menu.power.buttons.logout.icon" = accent.base; + "theme.bar.menus.menu.power.buttons.logout.text" = foreground; + + "theme.bar.menus.menu.power.buttons.restart.background" = background; + "theme.bar.menus.menu.power.buttons.restart.icon_background" = background; + "theme.bar.menus.menu.power.buttons.restart.icon" = accent.base; + "theme.bar.menus.menu.power.buttons.restart.text" = foreground; + + "theme.bar.menus.menu.power.buttons.shutdown.background" = background; + "theme.bar.menus.menu.power.buttons.shutdown.icon_background" = background; + "theme.bar.menus.menu.power.buttons.shutdown.icon" = accent.base; + "theme.bar.menus.menu.power.buttons.shutdown.text" = foreground; + + "theme.bar.menus.menu.power.buttons.sleep.background" = background; + "theme.bar.menus.menu.power.buttons.sleep.icon_background" = background; + "theme.bar.menus.menu.power.buttons.sleep.icon" = accent.base; + "theme.bar.menus.menu.power.buttons.sleep.text" = foreground; + + + "theme.bar.menus.menu.systray.dropdownmenu.background" = background; + "theme.bar.menus.menu.systray.dropdownmenu.divider" = accent.base; + "theme.bar.menus.menu.systray.dropdownmenu.text" = foreground; + + "theme.bar.menus.menu.volume.audio_slider.background" = background; + "theme.bar.menus.menu.volume.audio_slider.backgroundhover" = background; + "theme.bar.menus.menu.volume.audio_slider.primary" = accent.base; + "theme.bar.menus.menu.volume.audio_slider.puck" = accent.base; + "theme.bar.menus.menu.volume.background.color" = background; + "theme.bar.menus.menu.volume.border.color" = accent.base; + "theme.bar.menus.menu.volume.card.color" = accent.dark; + "theme.bar.menus.menu.volume.iconbutton.active" = accent.base; + "theme.bar.menus.menu.volume.iconbutton.passive" = accent.base; + "theme.bar.menus.menu.volume.input_slider.background" = background; + "theme.bar.menus.menu.volume.input_slider.backgroundhover" = background; + "theme.bar.menus.menu.volume.input_slider.primary" = accent.base; + "theme.bar.menus.menu.volume.input_slider.puck" = accent.base; + "theme.bar.menus.menu.volume.label.color" = accent.base; + "theme.bar.menus.menu.volume.listitems.active" = accent.base; + "theme.bar.menus.menu.volume.listitems.passive" = accent.base; + "theme.bar.menus.menu.volume.text" = foreground; + + "theme.bar.menus.monochrome" = false; + + "theme.bar.opacity" = t; + "theme.bar.outer_spacing" = "0em"; + "theme.bar.transparent" = false; + + "theme.font.name" = rice.font.code.name; + "theme.font.size" = "12px"; + + "theme.notification.actions.background" = background; + "theme.notification.actions.text" = foreground; + "theme.notification.background" = background; + "theme.notification.border" = accent.base; + "theme.notification.close_button.background" = accent.dark; + "theme.notification.close_button.label" = accent.base; + "theme.notification.label" = accent.base; + "theme.notification.labelicon" = accent.base; + "theme.notification.opacity" = 1.0; + "theme.notification.text" = foreground; + "theme.notification.time" = accent.base; + + "theme.osd.bar_color" = accent.base; + "theme.osd.bar_container" = accent.dark; + "theme.osd.bar_empty_color" = accent.dark; + "theme.osd.bar_overflow_color" = accent.base; + "theme.osd.border.color" = border; + "theme.osd.icon_container" = secondary.dark; + "theme.osd.icon" = secondary.bright; + "theme.osd.label" = accent.bright; + "theme.osd.opacity" = t; + }; + }; +} diff --git a/home-modules/bar/submap-indicator.nix b/home-modules/bar/submap-indicator.nix new file mode 100644 index 0000000..d79b2b3 --- /dev/null +++ b/home-modules/bar/submap-indicator.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: { + home.packages = [ + (pkgs.writeShellApplication { name = "submap_indicator"; text = /*bash*/ '' + print_help() { + echo "Usage: submap_indicator {set |unset}" + } + if [ $# -lt 1 ]; then + print_help; exit 1; + fi + case "$1" in + set) + # Check if there is a second argument for the 'set' operation + if [ $# -eq 2 ]; then + echo "$2" > /tmp/submap-indictor + pkill -RTMIN+8 waybar + pkill -RTMIN+8 hyprpanel + else + echo "Error: 'set' operation requires exactly one string argument." + print_help + exit 1 + fi + ;; + unset) + echo "" > /tmp/submap-indictor + pkill -RTMIN+8 waybar + pkill -RTMIN+8 hyprpanel + ;; + *) + echo "Error: Unknown command '$1'" + print_help + exit 1 + ;; + esac + exit 0 + '';}) + ]; +} diff --git a/home-modules/bar/waybar.nix b/home-modules/bar/waybar.nix new file mode 100644 index 0000000..52b91c9 --- /dev/null +++ b/home-modules/bar/waybar.nix @@ -0,0 +1,165 @@ +{ pkgs, ... }@all: with all; let + sep = " "; +in { + programs.waybar = { + enable = false; + package = pkgs.waybar; + settings = { + bar = { + # height = 20; + layer = "top"; + position = "bottom"; + margin-top = 0; + # margin-left = rice.gap-size; + # margin-bottom = rice.gap-size; + # margin-right = rice.gap-size; + margin-left = 0; + margin-bottom = 0; + margin-right = 0; + spacing = 10; + fixed-center = true; + modules-left = [ + # "cpu" + # "memory" + "wireplumber" + "backlight" + "battery" + "network" + "hyprland/window" + ]; + modules-center = [ + "hyprland/workspaces" + ]; + modules-right = [ + "custom/mode" + "custom/caldav_event" + "custom/cclock" + "tray" + ]; + "hyprland/workspaces" = { + on-click = "activate"; + format = "{name}"; + all-outputs = false; + active-only = false; + }; + "hyprland/window" = { + # format = "${sep}{}"; + format = "{}"; + separate-outputs = true; + }; + "custom/cclock" = { + exec = "cclock"; + restart-interval = 60; + }; + "custom/caldav_event" = { + format = "󰃰${sep}{}"; + exec = "caldav_event"; + restart-interval = 60; + max-width = 60; + }; + "custom/mode" = { + exec = "cat /tmp/submap-indictor"; + interval = "once"; + signal = 8; + }; + + cpu = { + interval = 1; + format = "󰍛${sep}{}%"; + max-length = 10; + }; + memory = { + interval = 5; + format = "${sep}{avail:.0f}G free"; + }; + battery = { + interval = 60; + tooltip = false; + format = "{icon}${sep}{capacity}%"; + states = { + warning = 15; + critical = 5; + }; + format-icons = [ " " " " " " " " " " ]; + format-charging = "{icon}${sep}+{capacity}%"; + format-plugged = "{icon}${sep}P{capacity}%"; + format-full = "{icon}${sep}F{capacity}%"; + }; + backlight = { + device = "eDP-1"; + format = "{icon}${sep}{percent}%"; + format-icons = [ "" "" "" "" "" "" "" "" "" ]; + }; + network = { + format-wifi = "${sep}{essid}"; + format-ethernet = "󰈀${sep}Wired"; + format-disconnected = "󰌙${sep}Disconnected"; + }; + wireplumber = { + format = "󰕾${sep}{volume}%"; + format-muted = "󰝟${sep}--%"; + }; + }; + }; + style = with rice.color; let f = rice.lib.hex-to-rgb-comma-string; in /* css */ '' + * { + font-family: ${rice.font.code.name}; + font-size: 1em; + min-height: 0px; + margin: 0px; + padding: 0px; + } + + window#waybar { + background: rgba(${f background},${builtins.toString rice.transparency}); + } + + #clock, + #custom-cclock, + #custom-mode, + #custom-caldav-event, + #battery, + #cpu, + #tray, + #disk, + #backlight, + #network, + #wireplumber, + #memory, + #window, + #workspaces { + padding: 0px 3px; + margin-top: 0.3em; + border-radius: ${builtins.toString rice.rounding}px; + color: rgb(${f accent.bright}); + } + + #workspaces button { + color: rgb(${f accent.base}); + padding-left: 15px; + padding-right: 15px; + border-radius: ${builtins.toString rice.rounding}px; + } + #workspaces button.active { color: rgb(${f background}); background-color: rgb(${f accent.base}); } + #workspaces button:hover { color: rgb(${f tertiary.bright}); } + #workspaces button.urgent { background-color: rgba(${f magenta.base},${builtins.toString rice.transparency}); } + + #window, #custom-caldav_event { + font-family: ${rice.font.base.name}, ${rice.font.code.name}; + color: rgb(${f tertiary.bright}); + } + + #wireplumber.muted { color: rgb(${f tertiary.bright}); } + #wireplumber { padding-left: 10px; } + + #battery.warning:not(.charging) { color: rgb(${f green.base});; } + #battery.charging { color: rgb(${f green.base}); } + #battery.critical { + background: rgb(${f negative.base}); + color: rgb(${f foreground}); + } + + #custom-mode { color: rgb(${f red.base}); } + ''; + }; +} From 1191019cf813675b4b28b20a72d3e0159ba21f85 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 25 Aug 2025 13:34:38 +0200 Subject: [PATCH 04/23] rclone --- home-modules/rclone.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/home-modules/rclone.nix b/home-modules/rclone.nix index 04dd205..fee8dfc 100644 --- a/home-modules/rclone.nix +++ b/home-modules/rclone.nix @@ -1,6 +1,6 @@ { pkgs, ... }@all: with all; { home.packages = with pkgs; [ rclone ]; - sops.secrets."copyparty/user-password/${hyper.user}".path = "%r/secrets/copyparty/user-password/${hyper.user}"; + sops.secrets."nx2site/copyparty/user-password/${hyper.user}".path = "%r/secrets/copyparty/user-password/${hyper.user}"; programs.rclone = { enable = true; package = pkgs.rclone; @@ -11,18 +11,20 @@ vendor = "owncloud"; # copyparty url = "https://file.${hyper.domain}/"; user = hyper.user; + pacer_min_sleep = "0.01ms"; }; mounts = { "" = { enable = true; - mountPoints = "${hyper.home}/file.nx2.site/"; + mountPoint = "${hyper.home}/file.nx2.site/"; options = { - vfs-cache-mode = "full"; + vfs-cache-mode = "writes"; + dir-cache-time = "5s"; }; }; }; secrets = { - pass = "/run/usr/1000/secrets/copyparty/user-password/${hyper.user}"; + pass = "/run/user/1000/secrets/copyparty/user-password/${hyper.user}"; }; }; }; From 0162b27d7992b5cecac3657390fbde1a3562c447 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 25 Aug 2025 13:34:43 +0200 Subject: [PATCH 05/23] flake bump --- flake.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index 0ca57bb..e8ed36a 100644 --- a/flake.lock +++ b/flake.lock @@ -39,11 +39,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1755732626, - "narHash": "sha256-qLAElW0E2QmcrKAbLPjFdueAOpjp3HmlxaOQf4R4jas=", + "lastModified": 1755988415, + "narHash": "sha256-QveKdwB5ACKS1+qNqYsaZrai3nasidjsiKslnk0F6os=", "owner": "9001", "repo": "copyparty", - "rev": "cd8771fa522d1cf645c3c7e0193f07b53d81559c", + "rev": "68503444c7d6f6f7fc6f5a41258cabf50568a9ab", "type": "github" }, "original": { @@ -220,11 +220,11 @@ ] }, "locked": { - "lastModified": 1755776884, - "narHash": "sha256-CPM7zm6csUx7vSfKvzMDIjepEJv1u/usmaT7zydzbuI=", + "lastModified": 1755928099, + "narHash": "sha256-OILVkfhRCm8u18IZ2DKR8gz8CVZM2ZcJmQBXmjFLIfk=", "owner": "nix-community", "repo": "home-manager", - "rev": "4fb695d10890e9fc6a19deadf85ff79ffb78da86", + "rev": "4a44fb9f7555da362af9d499817084f4288a957f", "type": "github" }, "original": { @@ -308,11 +308,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1755781160, - "narHash": "sha256-8pOPsz8kMppCZa9HdvjxH/kB6DIdlpXXBcuNGLMZfSM=", + "lastModified": 1756022257, + "narHash": "sha256-2ABxsC0wvS6aYQz97CBvrmxUOEXWFvKQfs4e05Rvt5o=", "ref": "refs/heads/main", - "rev": "50a242f16abfc49efc6f89ea9cd14a3544888a25", - "revCount": 6384, + "rev": "ced38b1b0f46f9fbdf9d37644d27bdbd2a29af1d", + "revCount": 6391, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -607,11 +607,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1755792360, - "narHash": "sha256-Bp9mBVrO0c6EDGBXH4jWE+IlEf+FW+jJDSoFuf+ncg8=", + "lastModified": 1756040103, + "narHash": "sha256-tyRpc3rv2YEWfDrE/Pq3ujpGERfs7JCwcwuAWH50gXk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dac37fbcd385fbb0ea1e6d153673f62b5f4e0079", + "rev": "09340442016bf3b9688e659d598ac8077a08eb42", "type": "github" }, "original": { @@ -702,11 +702,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1755704039, - "narHash": "sha256-gKlP0LbyJ3qX0KObfIWcp5nbuHSb5EHwIvU6UcNBg2A=", + "lastModified": 1755922037, + "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9cb344e96d5b6918e94e1bca2d9f3ea1e9615545", + "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c", "type": "github" }, "original": { @@ -952,11 +952,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1755740452, - "narHash": "sha256-4C6tuLUdt2ohMPthPMT2Ma+vbn/y7Qz5qfZXVXcb+08=", + "lastModified": 1755961571, + "narHash": "sha256-PZ/5FT98cHeUBt7k3nnNmiYbuO6kf7vB1DA8ieAmYpw=", "owner": "sxyazi", "repo": "yazi", - "rev": "0054cf0b878bae84d1bf0c063801dc9c42aa6978", + "rev": "c27ef58116794de7f559bca74e60e6e13ae92051", "type": "github" }, "original": { From 208d1ed7b4ebda4502536fec5d0a9982a2d7ae05 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:02:03 +0200 Subject: [PATCH 06/23] no true black --- flake-modules/rice.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake-modules/rice.nix b/flake-modules/rice.nix index 0503d59..12cfc31 100644 --- a/flake-modules/rice.nix +++ b/flake-modules/rice.nix @@ -26,7 +26,7 @@ pkgs: rec { fbcolor = (builtins.fromJSON (builtins.readFile ./colors.json)).base; fcolor = facolor // fbcolor; xcolor = with ccolor; with fcolor; { - background = "#000000"; + # background = "#000000"; # foreground = "#dddddd"; # accent = blue; # secondary = cyan; From 482b96d0ae6aef17a33600a12ab65c7184b2aafb Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:02:20 +0200 Subject: [PATCH 07/23] glsl --- home-modules/programming/glsl.nix | 8 ++++++++ home.nix | 1 + 2 files changed, 9 insertions(+) create mode 100644 home-modules/programming/glsl.nix diff --git a/home-modules/programming/glsl.nix b/home-modules/programming/glsl.nix new file mode 100644 index 0000000..7f77d81 --- /dev/null +++ b/home-modules/programming/glsl.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }@all: with all; +{ + home = { + packages = with pkgs; [ + glsl_analyzer + ]; + }; +} diff --git a/home.nix b/home.nix index f602ee6..724b593 100644 --- a/home.nix +++ b/home.nix @@ -42,6 +42,7 @@ ./home-modules/pnx.nix ./home-modules/programming/c.nix ./home-modules/programming/gleam.nix + ./home-modules/programming/glsl.nix ./home-modules/programming/go.nix ./home-modules/programming/java.nix ./home-modules/programming/js.nix From 432c1e18f86752dca3d2f2c10cde1923a4094195 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:03:11 +0200 Subject: [PATCH 08/23] colorful firefox --- home-modules/firefox.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-modules/firefox.nix b/home-modules/firefox.nix index 4b89bd2..ca0dd51 100644 --- a/home-modules/firefox.nix +++ b/home-modules/firefox.nix @@ -67,13 +67,13 @@ /* New tab page */ --newtab-background-color : ${background} !important; - --newtab-background-color-secondary : ${background} !important; + --newtab-background-color-secondary : ${secondary.dark} !important; --newtab-text-primary-color : ${foreground} !important; --newtab-text-secondary-color : ${secondary.base} !important; --newtab-search-icon-color : ${accent.base} !important; --tabpanel-background-color : transparent !important; - background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + background : linear-gradient(180deg,rgba(${rice.lib.hex-to-rgb-comma-string secondary.dark}, ${builtins.toString rice.transparency}) 0%, rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) 100%) !important; } .tabbrowser-tab[selected="true"] { color: ${background} !important; From 2c6e0f0b7367139946cb20059b984aea975e6041 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:03:28 +0200 Subject: [PATCH 09/23] colorful zathura --- home-modules/zathura.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-modules/zathura.nix b/home-modules/zathura.nix index 447f635..9cc780d 100644 --- a/home-modules/zathura.nix +++ b/home-modules/zathura.nix @@ -10,7 +10,7 @@ completion-fg = foreground; completion-highlight-bg = background; completion-highlight-fg = accent.base; - default-bg = "rgba(${f background},${t})"; + default-bg = "rgba(${f accent.dark},${t})"; default-fg = foreground; highlight-active-color = "rgba(${f accent.base},0.5)"; highlight-color = "rgba(${f secondary.base},0.5)"; From e81d82ad6ea877da9d5362901a9bb77d16ed8127 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:03:57 +0200 Subject: [PATCH 10/23] yazi colorful tabs --- home-modules/yazi.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index 74af1fa..66cf0d1 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -328,6 +328,12 @@ border_symbol = "│"; border_style = { fg = border; }; }; + tabs = { + active = { fg = accent.dark; bg = accent.base; }; + inactive = { fg = secondary.base; bg = secondary.dark; }; + # sep_inner = + # sep_outer = + }; status = { separator_open = " "; #""; separator_close = " "; #""; From fb17f376620e19a16322991064c9c88291e40907 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:04:24 +0200 Subject: [PATCH 11/23] opencode model --- home-modules/opencode.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home-modules/opencode.nix b/home-modules/opencode.nix index 3a57c32..7865a61 100644 --- a/home-modules/opencode.nix +++ b/home-modules/opencode.nix @@ -11,8 +11,7 @@ theme = "matrix"; provider = { ollama = { - apiKey = "KEY"; - disabled = false; + name = "Ollama (local)"; npm = "@ai-sdk/openai-compatible"; options = { baseURL = "http://localhost:11434/v1"; From 35c5760f50dc8e3b5464f3ff7d3cc96b7d88e2d1 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:04:41 +0200 Subject: [PATCH 12/23] NxNORTH Monitor adjustment --- home-modules/hyprland.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 2d3e3a8..90863d8 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -10,7 +10,7 @@ let second = { name = "desc:Sony SONY TV 0x01010101"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; }; }; north = { - main = { name = "desc:Iiyama North America PL3270Q na"; resolution = "2560x1440"; position = "1920x150"; scale = "1.0"; }; + main = { name = "desc:Iiyama North America PL3270Q na"; resolution = "2560x1440"; position = "1920x0"; scale = "1.0"; }; left = { name = "desc:Philips Consumer Electronics Company 273PLPH AU11423002132"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; }; # right = { name = "HDMI-A-2"; resolution = "1920x1080"; position = "4480x360"; scale = "1.0"; }; }; From efe96374de13a3e99c8d8ee0359d2498501eef8a Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 21:05:26 +0200 Subject: [PATCH 13/23] ollama accessable from everywhere --- system-modules/ollama.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-modules/ollama.nix b/system-modules/ollama.nix index 9fe38d3..446446a 100644 --- a/system-modules/ollama.nix +++ b/system-modules/ollama.nix @@ -4,7 +4,7 @@ package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama; enable = true; acceleration = lib.mkIf hyper.nvidia.enable "cuda"; - host = if hyper.host == "NxACE" then "0.0.0.0" else "127.0.0.1"; + host = "0.0.0.0"; port = 11434; environmentVariables = { OLLAMA_ORIGINS = "*"; From 01deb843e4a6740219d27fabed0de3b8bf332aeb Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 22:21:58 +0200 Subject: [PATCH 14/23] term file choose works again --- flake.lock | 134 +++++++++++++++++++++--------------------- home-modules/yazi.nix | 76 +++++------------------- 2 files changed, 81 insertions(+), 129 deletions(-) diff --git a/flake.lock b/flake.lock index 2ab3b71..a14e36f 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1752743471, - "narHash": "sha256-4izhj1j7J4mE8LgljCXSIUDculqOsxxhdoC81VhqizM=", + "lastModified": 1755632680, + "narHash": "sha256-EjaD8+d7AiAV2fGRN4NTMboWDwk8szDfwbzZ8DL1PhQ=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "e31b575d19e7cf8a8f4398e2f9cffe27a1332506", + "rev": "50637ed23e962f0db294d6b0ef534f37b144644b", "type": "github" }, "original": { @@ -51,11 +51,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -186,11 +186,11 @@ ] }, "locked": { - "lastModified": 1753592768, - "narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=", + "lastModified": 1756245065, + "narHash": "sha256-aAZNbGcWrVRZgWgkQbkabSGcDVRDMgON4BipMy69gvI=", "owner": "nix-community", "repo": "home-manager", - "rev": "fc3add429f21450359369af74c2375cb34a2d204", + "rev": "54b2879ce622d44415e727905925e21b8f833a98", "type": "github" }, "original": { @@ -216,11 +216,11 @@ ] }, "locked": { - "lastModified": 1749155331, - "narHash": "sha256-XR9fsI0zwLiFWfqi/pdS/VD+YNorKb3XIykgTg4l1nA=", + "lastModified": 1753964049, + "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "45fcc10b4c282746d93ec406a740c43b48b4ef80", + "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", "type": "github" }, "original": { @@ -245,11 +245,11 @@ ] }, "locked": { - "lastModified": 1752149140, - "narHash": "sha256-gbh1HL98Fdqu0jJIWN4OJQN7Kkth7+rbkFpSZLm/62A=", + "lastModified": 1754305013, + "narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "340494a38b5ec453dfc542c6226481f736cc8a9a", + "rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d", "type": "github" }, "original": { @@ -274,11 +274,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1753634783, - "narHash": "sha256-Rl/voNjvcQH6E1vi4wNt5AY6CWaYkqfnkpm9GxrqKGg=", + "lastModified": 1756069181, + "narHash": "sha256-FPur4yuDwzM9uHhPFJW6KD3Xys5fz0xmRmZqFfWQD3Y=", "ref": "refs/heads/main", - "rev": "c63d0003a1e5155248695f19778f815a8ad34c67", - "revCount": 6317, + "rev": "0ed880f3f7dc2c746bf3590eee266c010d737558", + "revCount": 6393, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -306,11 +306,11 @@ ] }, "locked": { - "lastModified": 1753028264, - "narHash": "sha256-GbfsRZWW5uBAOeddLkmrYV2XmAbI0etVUTBXFH5thcw=", + "lastModified": 1756311938, + "narHash": "sha256-XiNmc8kdOd4adzif9PABKOH3u4Nv+zadIRfH3XrJFy0=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "14f9a444793d6dd78c29033acf9c3c974ded708d", + "rev": "ee66b49fda3423df8bfd6206d9101a81de9c1832", "type": "github" }, "original": { @@ -399,11 +399,11 @@ ] }, "locked": { - "lastModified": 1750371812, - "narHash": "sha256-D868K1dVEACw17elVxRgXC6hOxY+54wIEjURztDWLk8=", + "lastModified": 1753819801, + "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "b13c7481e37856f322177010bdf75fccacd1adc8", + "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", "type": "github" }, "original": { @@ -428,11 +428,11 @@ ] }, "locked": { - "lastModified": 1750371198, - "narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=", + "lastModified": 1753622892, + "narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b", + "rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809", "type": "github" }, "original": { @@ -449,11 +449,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1753590784, - "narHash": "sha256-Q30DFlPwD1ZK52TD4wSnqDO5gk9Kvifr923siI8AdVQ=", + "lastModified": 1754887838, + "narHash": "sha256-npC+H+Wl60EdrV75sjqm+bbbLbKgCCGn4ALSM0B2OWA=", "owner": "KZDKM", "repo": "Hyprspace", - "rev": "a847f1d6a7326395d17fe9b6b4ab63a10eb152eb", + "rev": "2b61fd2115262243b03aa9afe8dfd8a78e71636c", "type": "github" }, "original": { @@ -474,11 +474,11 @@ ] }, "locked": { - "lastModified": 1752252310, - "narHash": "sha256-06i1pIh6wb+sDeDmWlzuPwIdaFMxLlj1J9I5B9XqSeo=", + "lastModified": 1755416120, + "narHash": "sha256-PosTxeL39YrLvCX5MqqPA6NNWQ4T5ea5K55nmN7ju9Q=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "bcabcbada90ed2aacb435dc09b91001819a6dc82", + "rev": "e631ea36ddba721eceda69bfee6dd01068416489", "type": "github" }, "original": { @@ -499,11 +499,11 @@ ] }, "locked": { - "lastModified": 1751897909, - "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", + "lastModified": 1755184602, + "narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", + "rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", "type": "github" }, "original": { @@ -542,11 +542,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1753642709, - "narHash": "sha256-J/xPmOfKRX/4UtBIVa5qkKuwN6FrHQBmo5bIPmcPeck=", + "lastModified": 1755261305, + "narHash": "sha256-EOqCupB5X5WoGVHVcfOZcqy0SbKWNuY3kq+lj1wHdu8=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "e1e0999d45ba66d2d66ac061c27ce680814d14b1", + "rev": "203a7b463f307c60026136dd1191d9001c43457f", "type": "github" }, "original": { @@ -558,11 +558,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1752687322, - "narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=", + "lastModified": 1755186698, + "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251", + "rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", "type": "github" }, "original": { @@ -574,11 +574,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1753644334, - "narHash": "sha256-b7OuvvF9XEe5ms/7Uaq3g4fkmbLhQeP2b+weAjnciXE=", + "lastModified": 1756321630, + "narHash": "sha256-Lrqzu9plqzo3Zp64X11qL1wWHrMYMGML9XKzuiv6QJE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6a56b14976d469a9f943400698244a4c1a4c1608", + "rev": "ebbc7fb3d213c5c7c9dcef705fa272073812f4c4", "type": "github" }, "original": { @@ -606,11 +606,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1753429684, - "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=", + "lastModified": 1756125398, + "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d", + "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", "type": "github" }, "original": { @@ -637,11 +637,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1751792365, - "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", "type": "github" }, "original": { @@ -653,11 +653,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1753345091, - "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", + "lastModified": 1756217674, + "narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", + "rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620", "type": "github" }, "original": { @@ -692,11 +692,11 @@ ] }, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1755446520, + "narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e", "type": "github" }, "original": { @@ -796,11 +796,11 @@ ] }, "locked": { - "lastModified": 1752544651, - "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", + "lastModified": 1754988908, + "narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "2c8def626f54708a9c38a5861866660395bb3461", + "rev": "3223c7a92724b5d804e9988c6b447a0d09017d48", "type": "github" }, "original": { @@ -882,11 +882,11 @@ ] }, "locked": { - "lastModified": 1751300244, - "narHash": "sha256-PFuv1TZVYvQhha0ac53E3YgdtmLShrN0t4T6xqHl0jE=", + "lastModified": 1755354946, + "narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "6115f3fdcb2c1a57b4a80a69f3c797e47607b90a", + "rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0", "type": "github" }, "original": { @@ -902,11 +902,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1753610773, - "narHash": "sha256-M5SPkMK1ySSXEXEMJEcSgrHZlaBhIJeYMbFdO6q5IFc=", + "lastModified": 1756309929, + "narHash": "sha256-udly1zNvxR6UKFZSkbutSEZ9EihUd+pPCDBaseppB5s=", "owner": "sxyazi", "repo": "yazi", - "rev": "0e3cd8545c07e79d7cf1f58632c87cc14faa16d6", + "rev": "dd7afaa64aa54fac5bd30404eb44ccd9d68f31c5", "type": "github" }, "original": { diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index 66cf0d1..848f4b8 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -1,7 +1,9 @@ -{ pkgs, ... }@all: with all; -{ - home.packages = with pkgs; [ - unar +{ pkgs, ... }@all: with all; let + tfc = pkgs.latest.xdg-desktop-portal-termfilechooser; +in { + home.packages = [ + pkgs.unar + tfc ]; programs.yazi = { @@ -403,73 +405,23 @@ }; }; xdg = { - # # https://github.com/hunkyburrito/xdg-desktop-portal-termfilechooser/pull/44 - configFile = let - wrapper = pkgs.writeShellApplication { name = "yazi-wrapper.sh"; text = /*bash*/ '' - set -ex - - multiple="$1" - directory="$2" - save="$3" - path="$4" - out="$5" - - cmd="yazi" - termcmd="''${TERMCMD:-kitty --title 'termfilechooser'}" - - if [ "$save" = "1" ]; then - # save a file - set -- --chooser-file="$out" "$path" - elif [ "$directory" = "1" ]; then - # upload files from a directory - set -- --chooser-file="$out" --cwd-file="$out" "$path" - elif [ "$multiple" = "1" ]; then - # upload multiple files - set -- --chooser-file="$out" "$path" - else - # upload only 1 file - set -- --chooser-file="$out" "$path" - fi - - command="$termcmd $cmd" - for arg in "$@"; do - # escape double quotes - escaped=$(printf "%s" "$arg" | sed -E 's/[\"\(\)\{\}\|]//g') - # escape spaces - command="$command \"$escaped\"" - done - - sh -c "$command" - '';}; - in { - "xdg-desktop-portal-termfilechooser/config".text = '' + configFile."xdg-desktop-portal-termfilechooser/config" = { + force = true; + text = '' [filechooser] - cmd=${wrapper}/bin/yazi-wrapper.sh + cmd=${tfc}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh env=TERMCMD=ghostty --title="terminal-file-picker -e" default_dir=$HOME open_mode=suggested save_mode=last ''; - # "xdg-desktop-portal-termfilechooser/config".text = '' - # [filechooser] - # cmd=${pkgs.latest.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh - # env=TERMCMD=ghostty --title="terminal-file-picker -e" - # default_dir=$HOME - # open_mode=suggested - # save_mode=last - # ''; }; portal = { enable = true; - extraPortals = [ pkgs.latest.xdg-desktop-portal-termfilechooser ]; - config = { - common = { - "org.freedesktop.impl.portal.FileChooser" = "termfilechooser"; - }; - }; + xdgOpenUsePortal = true; + config.common."org.freedesktop.impl.portal.FileChooser" = "termfilechooser"; + extraPortals = [ tfc ]; }; }; - home.sessionVariables = { - GTK_USE_PORTAL = "1"; - }; + home.sessionVariables."GTK_USE_PORTAL" = "1"; } From d009d109a991811b04a4f05db0e3c29708787d86 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 23:59:11 +0200 Subject: [PATCH 15/23] battery only on NxXPS --- home-modules/bar/hyprpanel.nix | 2 +- home-modules/mpv.nix | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 home-modules/mpv.nix diff --git a/home-modules/bar/hyprpanel.nix b/home-modules/bar/hyprpanel.nix index 809af55..c2de86c 100644 --- a/home-modules/bar/hyprpanel.nix +++ b/home-modules/bar/hyprpanel.nix @@ -48,7 +48,7 @@ # "cpu" # "cputemp" # "ram" - "battery" + (pkgs.lib.mkIf (hyper.host == "NxXPS") "battery") # "bluetooth" "network" "windowtitle" diff --git a/home-modules/mpv.nix b/home-modules/mpv.nix new file mode 100644 index 0000000..feeb5eb --- /dev/null +++ b/home-modules/mpv.nix @@ -0,0 +1,41 @@ +{ pkgs, ... }@all: with all; { + programs.mpv = { + enable = true; + package = pkgs.mpv; + scrips = with pkgs.mpvScripts; [ + mpris # use media keys + thumbfast # thumbnails on timeline hover + uosc # custom ui + sponsorblock + ]; + bindings = { + O = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"''; + }; + scriptOpts = { + thumbfast = { + spawn_first = true; + network = true; + hwdec = true; + }; + uosc = { + timeline_size = 25; + timeline_persistency = "paused,audio"; + progress = "always"; + progress_size = 4; + progress_line_width = 4; + controls = "subtitles,audio,video,editions,stream-quality"; + top_bar = "never"; + refine = "text_width"; + }; + }; + }; + xdg.configfile."mpv/shaders/invert.glsl".text = /* glsl */ '' + //!HOOK LUMA + //!BIND HOOKED + vec4 hook() + { + float luma = LUMA_texOff(0).x; + return vec4(1.0 - luma); + } + ''; +} From cd25a1a569a47fabab05b521c513456103e496ce Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 23:59:29 +0200 Subject: [PATCH 16/23] mpv --- flake.lock | 132 +++++++++++++++++++--------- home-modules/chatterino.nix | 2 +- home-modules/mpv.nix | 47 +++++++++- home-modules/pkgs-list/programs.nix | 1 - home-modules/pkgs-list/shell.nix | 1 - home.nix | 1 + 6 files changed, 136 insertions(+), 48 deletions(-) diff --git a/flake.lock b/flake.lock index a14e36f..2ad837b 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1755632680, - "narHash": "sha256-EjaD8+d7AiAV2fGRN4NTMboWDwk8szDfwbzZ8DL1PhQ=", + "lastModified": 1755946532, + "narHash": "sha256-POePremlUY5GyA1zfbtic6XLxDaQcqHN6l+bIxdT5gc=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "50637ed23e962f0db294d6b0ef534f37b144644b", + "rev": "81584dae2df6ac79f6b6dae0ecb7705e95129ada", "type": "github" }, "original": { @@ -33,6 +33,25 @@ "type": "github" } }, + "copyparty": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1756320983, + "narHash": "sha256-huaJ1CvBsylibf55pjiFEpiKxYU235iAzwMhJ+iDSjw=", + "owner": "9001", + "repo": "copyparty", + "rev": "f4f702c39dd2365f6ca43ed6b72a84c708fded8d", + "type": "github" + }, + "original": { + "owner": "9001", + "repo": "copyparty", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1731098351, @@ -118,6 +137,21 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "inputs": { "systems": "systems_3" }, @@ -245,11 +279,11 @@ ] }, "locked": { - "lastModified": 1754305013, - "narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=", + "lastModified": 1755678602, + "narHash": "sha256-uEC5O/NIUNs1zmc1aH1+G3GRACbODjk2iS0ET5hXtuk=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d", + "rev": "157cc52065a104fc3b8fa542ae648b992421d1c7", "type": "github" }, "original": { @@ -268,17 +302,17 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1756069181, - "narHash": "sha256-FPur4yuDwzM9uHhPFJW6KD3Xys5fz0xmRmZqFfWQD3Y=", + "lastModified": 1756325904, + "narHash": "sha256-PRz3GE4ZBScWrHTVegpM4B2YLZplp1iPwmZ9AeYBbsg=", "ref": "refs/heads/main", - "rev": "0ed880f3f7dc2c746bf3590eee266c010d737558", - "revCount": 6393, + "rev": "378e130f1426648d8d734049800128f9882805bf", + "revCount": 6395, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -306,11 +340,11 @@ ] }, "locked": { - "lastModified": 1756311938, - "narHash": "sha256-XiNmc8kdOd4adzif9PABKOH3u4Nv+zadIRfH3XrJFy0=", + "lastModified": 1756325158, + "narHash": "sha256-aJ9jAYtZ64MWBpWPfH1q+t6U9b6kJWc2yK9Vrlj6fZY=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "ee66b49fda3423df8bfd6206d9101a81de9c1832", + "rev": "bf843fc6adf90d43a5dd7742e9df61d395ba780d", "type": "github" }, "original": { @@ -474,11 +508,11 @@ ] }, "locked": { - "lastModified": 1755416120, - "narHash": "sha256-PosTxeL39YrLvCX5MqqPA6NNWQ4T5ea5K55nmN7ju9Q=", + "lastModified": 1756117388, + "narHash": "sha256-oRDel6pNl/T2tI+nc/USU9ZP9w08dxtl7hiZxa0C/Wc=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "e631ea36ddba721eceda69bfee6dd01068416489", + "rev": "b2ae3204845f5f2f79b4703b441252d8ad2ecfd0", "type": "github" }, "original": { @@ -517,7 +551,7 @@ "crane": "crane", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" }, @@ -539,7 +573,7 @@ "nixos-wsl": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1755261305, @@ -558,27 +592,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755186698, - "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", + "lastModified": 1748162331, + "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "ref": "nixos-25.05", + "type": "indirect" } }, "nixpkgs-latest": { "locked": { - "lastModified": 1756321630, - "narHash": "sha256-Lrqzu9plqzo3Zp64X11qL1wWHrMYMGML9XKzuiv6QJE=", + "lastModified": 1756326156, + "narHash": "sha256-EvRCnKAE5oL9wOIT/LrA5+pJVpTvhH71OReJDTOZDyk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ebbc7fb3d213c5c7c9dcef705fa272073812f4c4", + "rev": "636dea4f2cd65b8c558149a957423da47c1cbc95", "type": "github" }, "original": { @@ -606,11 +639,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1756125398, - "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", + "lastModified": 1756266583, + "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", + "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", "type": "github" }, "original": { @@ -620,6 +653,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1756266583, + "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1731919951, "narHash": "sha256-vOM6ETpl1yu9KLi/icTmLJIPbbdJCdAVYUXZceO/Ce4=", @@ -635,7 +684,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1754725699, "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", @@ -651,7 +700,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1756217674, "narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=", @@ -666,7 +715,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1752596105, "narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=", @@ -692,11 +741,11 @@ ] }, "locked": { - "lastModified": 1755446520, - "narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=", + "lastModified": 1755960406, + "narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e", + "rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2", "type": "github" }, "original": { @@ -734,13 +783,14 @@ }, "root": { "inputs": { + "copyparty": "copyparty", "home-manager": "home-manager", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "hyprspace": "hyprspace", "lanzaboote": "lanzaboote", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-latest": "nixpkgs-latest", "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix", @@ -897,8 +947,8 @@ }, "yazi": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_5", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2" }, "locked": { diff --git a/home-modules/chatterino.nix b/home-modules/chatterino.nix index e0a8915..2faa000 100644 --- a/home-modules/chatterino.nix +++ b/home-modules/chatterino.nix @@ -52,7 +52,7 @@ in { packages = with pkgs; [ chatterino2 streamlink - mpv + # mpv ]; file = { ".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; /* json */ '' diff --git a/home-modules/mpv.nix b/home-modules/mpv.nix index feeb5eb..9e1b7e8 100644 --- a/home-modules/mpv.nix +++ b/home-modules/mpv.nix @@ -2,14 +2,53 @@ programs.mpv = { enable = true; package = pkgs.mpv; - scrips = with pkgs.mpvScripts; [ + config = { + # osc = false; # Disables the on-screen controller (seekbar, volume, etc.) + # osd-bar = false; # Disables the on-screen display progress bar + demuxer-max-back-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking backwards + demuxer-max-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking forwards + interpolation = true; # Enables frame interpolation for smoother playback + video-sync = "display-resample"; # Synchronizes video playback to the display's refresh rate + sub-visibility = true; # Hides subtitles by default + sub-auto = "fuzzy"; # Automatically loads subtitles if their filename is similar to the video file + sub-font = rice.font.base.name; + # sub-blur = 10; # this blurs the whole thing, text aswell + sub-color = rice.color.accent.bright; + sub-back-color = "${rice.color.background}${rice.lib.float-to-drune 0.8}"; # does not seem to work + # sub-border-size = 0; + sub-border-style = "opaque-box"; + background-color = "${rice.color.background}"; # transparency breaks blur on hyprland sometimes, so just rgb + alang = "en,eng,de,ger"; # Sets preferred audio languages in order + slang = "en,eng,de,ger"; # Sets preferred subtitle languages in order + vlang = "en,eng,de,ger"; # Sets preferred video languages in order + save-position-on-quit = true; # Saves the playback position when quitting + ignore-path-in-watch-later-config = true; # Ignores the path in the watch-later configuration + ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; # Sets the format for downloading YouTube videos + vo = pkgs.lib.mkIf hyper.nvidia.enable "gpu"; + hwdec = if hyper.nvidia.enable then "no" else "no"; # bugged + }; + scripts = with pkgs.mpvScripts; [ mpris # use media keys thumbfast # thumbnails on timeline hover - uosc # custom ui + # uosc # custom ui sponsorblock ]; bindings = { - O = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"''; + "O" = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"''; + # "tab" = ''script-binding uosc/toggle-ui''; + # "space" = ''cycle pause; script-binding uosc/flash-pause-indicator''; + # "right" = ''seek 5''; + # "left" = ''seek -5''; + # "shift+right" = ''seek 30; script-binding uosc/flash-timeline''; + # "shift+left" = ''seek -30; script-binding uosc/flash-timeline''; + # "m" = ''no-osd cycle mute; script-binding uosc/flash-volume''; + # "up" = ''no-osd add volume 10; script-binding uosc/flash-volume''; + # "down" = ''no-osd add volume -10; script-binding uosc/flash-volume''; + # "[" = ''no-osd add speed -0.25; script-binding uosc/flash-speed''; + # "]" = ''no-osd add speed 0.25; script-binding uosc/flash-speed''; + # "\\" = ''no-osd set speed 1; script-binding uosc/flash-speed''; + # ">" = ''script-binding uosc/next; script-message-to uosc flash-elements top_bar,timeline''; + # "<" = ''script-binding uosc/prev; script-message-to uosc flash-elements top_bar,timeline>''; }; scriptOpts = { thumbfast = { @@ -29,7 +68,7 @@ }; }; }; - xdg.configfile."mpv/shaders/invert.glsl".text = /* glsl */ '' + xdg.configFile."mpv/shaders/invert.glsl".text = /* glsl */ '' //!HOOK LUMA //!BIND HOOKED vec4 hook() diff --git a/home-modules/pkgs-list/programs.nix b/home-modules/pkgs-list/programs.nix index 4ac2595..c936a71 100644 --- a/home-modules/pkgs-list/programs.nix +++ b/home-modules/pkgs-list/programs.nix @@ -2,7 +2,6 @@ home.packages = with pkgs; [ chromium element-desktop - mpv qbittorrent unstable.spotify wl-clipboard diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix index 90a8f6b..9c35172 100644 --- a/home-modules/pkgs-list/shell.nix +++ b/home-modules/pkgs-list/shell.nix @@ -20,7 +20,6 @@ lolcat lynx mediainfo - mpv neofetch pastel pdfgrep diff --git a/home.nix b/home.nix index cc672d4..194c3dc 100644 --- a/home.nix +++ b/home.nix @@ -28,6 +28,7 @@ ./home-modules/latex.nix ./home-modules/mako.nix # ./home-modules/matrix.nix + ./home-modules/mpv.nix ./home-modules/nh.nix ./home-modules/nixd.nix ./home-modules/nvidia.nix From 1085acc0f5474d4f7894b251602ca4f925fadb45 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Thu, 28 Aug 2025 00:11:02 +0200 Subject: [PATCH 17/23] hyprpanel++ --- home-modules/bar/hyprpanel.nix | 45 +++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/home-modules/bar/hyprpanel.nix b/home-modules/bar/hyprpanel.nix index 809af55..5bd527f 100644 --- a/home-modules/bar/hyprpanel.nix +++ b/home-modules/bar/hyprpanel.nix @@ -12,7 +12,7 @@ /* 'icon-size': 1.2em */ )); @include styleModule('cmodule-caldav_event', ( - 'text-color': ${accent.base}, + 'text-color': ${secondary.base}, )); ''; "hyprpanel/modules.json".text = builtins.toJSON { @@ -24,7 +24,7 @@ hideOnEmpty = true; actions.onLeftClick = "menu:calendar"; }; - "custom/caldav_evnet" = { + "custom/caldav_event" = { execute = "caldav_event"; executeOnAction = ""; label = "{}"; @@ -37,20 +37,21 @@ programs.hyprpanel = { enable = true; package = pkgs.unstable.hyprpanel; - settings = with rice.color; let + settings = with rice.color; let t = builtins.toString (builtins.ceil (rice.transparency * 100)); in { "bar.layouts" = { "*" = { "left" = [ "volume" - # "microphone" - # "cpu" - # "cputemp" - # "ram" "battery" + # "microphone" + "cpu" + "cputemp" + "ram" # "bluetooth" "network" + "netstat" "windowtitle" ]; "middle" = [ "workspaces" ]; @@ -67,11 +68,21 @@ "bar.bluetooth.label" = true; - "bar.customModules.submap.enabledIcon" = "[󰧹]"; + "bar.customModules.submap.enabledIcon" = ""; "bar.customModules.submap.showSubmapName" = false; - "bar.customModules.submap.label" = false; + "bar.customModules.submap.label" = true; "bar.customModules.submap.icon" = true; "bar.customModules.submap.disabledIcon" = ""; + "bar.customModules.submap.enabledText" = "[SUBMAP]"; + "bar.customModules.submap.disabledText" = ""; + + "bar.media.show_active_only" = true; + "bar.media.truncation_size" = 20; + + "bar.windowtitle.class_name" = false; + "bar.windowtitle.label" = true; + "bar.windowtitle.custom_title" = false; + "bar.windowtitle.truncation_size" = 40; "bar.workspaces.applicationIconEmptyWorkspace" = ""; "bar.workspaces.applicationIconOncePerWorkspace" = false; @@ -96,10 +107,10 @@ "theme.bar.buttons.padding_x" = "0.5rem"; "theme.bar.buttons.battery.background" = background; - "theme.bar.buttons.battery.border" = accent.base; + "theme.bar.buttons.battery.border" = accent.base; # not seen "theme.bar.buttons.battery.icon_background" = background; - "theme.bar.buttons.battery.icon" = accent.base; - "theme.bar.buttons.battery.text" = accent.base; + "theme.bar.buttons.battery.icon" = secondary.base; + "theme.bar.buttons.battery.text" = secondary.base; "theme.bar.buttons.bluetooth.background" = background; "theme.bar.buttons.bluetooth.border" = accent.base; @@ -255,15 +266,15 @@ "theme.bar.buttons.windowtitle.text" = secondary.base; "theme.bar.buttons.workspaces.active" = accent.bright; - "theme.bar.buttons.workspaces.available" = accent.base; + "theme.bar.buttons.workspaces.available" = weird.dark; # not seen "theme.bar.buttons.workspaces.background" = background; - "theme.bar.buttons.workspaces.border" = accent.base; + "theme.bar.buttons.workspaces.border" = accent.base; # not seen "theme.bar.buttons.workspaces.hover" = foreground; - "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; + "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; # not seen "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.2em"; "theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright; "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.2em"; - "theme.bar.buttons.workspaces.occupied" = secondary.base; + "theme.bar.buttons.workspaces.occupied" = accent.base; "theme.bar.buttons.workspaces.pill.width" = "4em"; "theme.bar.buttons.workspaces.smartHighlight" = true; "theme.bar.buttons.y_margins" = "0em"; @@ -494,7 +505,7 @@ "theme.notification.close_button.label" = accent.base; "theme.notification.label" = accent.base; "theme.notification.labelicon" = accent.base; - "theme.notification.opacity" = 1.0; + "theme.notification.opacity" = 1; "theme.notification.text" = foreground; "theme.notification.time" = accent.base; From 960e786ee5a386ef0f537cd0dccf566a8cdab8c1 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Thu, 28 Aug 2025 00:15:11 +0200 Subject: [PATCH 18/23] hyprpanel++ --- home-modules/bar/hyprpanel.nix | 45 +++++++++++++--------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/home-modules/bar/hyprpanel.nix b/home-modules/bar/hyprpanel.nix index 0b1c241..c2de86c 100644 --- a/home-modules/bar/hyprpanel.nix +++ b/home-modules/bar/hyprpanel.nix @@ -12,7 +12,7 @@ /* 'icon-size': 1.2em */ )); @include styleModule('cmodule-caldav_event', ( - 'text-color': ${secondary.base}, + 'text-color': ${accent.base}, )); ''; "hyprpanel/modules.json".text = builtins.toJSON { @@ -24,7 +24,7 @@ hideOnEmpty = true; actions.onLeftClick = "menu:calendar"; }; - "custom/caldav_event" = { + "custom/caldav_evnet" = { execute = "caldav_event"; executeOnAction = ""; label = "{}"; @@ -37,21 +37,20 @@ programs.hyprpanel = { enable = true; package = pkgs.unstable.hyprpanel; - settings = with rice.color; let + settings = with rice.color; let t = builtins.toString (builtins.ceil (rice.transparency * 100)); in { "bar.layouts" = { "*" = { "left" = [ "volume" - (pkgs.lib.mkIf (hyper.host == "NxXPS") "battery") # "microphone" - "cpu" - "cputemp" - "ram" + # "cpu" + # "cputemp" + # "ram" + (pkgs.lib.mkIf (hyper.host == "NxXPS") "battery") # "bluetooth" "network" - "netstat" "windowtitle" ]; "middle" = [ "workspaces" ]; @@ -68,21 +67,11 @@ "bar.bluetooth.label" = true; - "bar.customModules.submap.enabledIcon" = ""; + "bar.customModules.submap.enabledIcon" = "[󰧹]"; "bar.customModules.submap.showSubmapName" = false; - "bar.customModules.submap.label" = true; + "bar.customModules.submap.label" = false; "bar.customModules.submap.icon" = true; "bar.customModules.submap.disabledIcon" = ""; - "bar.customModules.submap.enabledText" = "[SUBMAP]"; - "bar.customModules.submap.disabledText" = ""; - - "bar.media.show_active_only" = true; - "bar.media.truncation_size" = 20; - - "bar.windowtitle.class_name" = false; - "bar.windowtitle.label" = true; - "bar.windowtitle.custom_title" = false; - "bar.windowtitle.truncation_size" = 40; "bar.workspaces.applicationIconEmptyWorkspace" = ""; "bar.workspaces.applicationIconOncePerWorkspace" = false; @@ -107,10 +96,10 @@ "theme.bar.buttons.padding_x" = "0.5rem"; "theme.bar.buttons.battery.background" = background; - "theme.bar.buttons.battery.border" = accent.base; # not seen + "theme.bar.buttons.battery.border" = accent.base; "theme.bar.buttons.battery.icon_background" = background; - "theme.bar.buttons.battery.icon" = secondary.base; - "theme.bar.buttons.battery.text" = secondary.base; + "theme.bar.buttons.battery.icon" = accent.base; + "theme.bar.buttons.battery.text" = accent.base; "theme.bar.buttons.bluetooth.background" = background; "theme.bar.buttons.bluetooth.border" = accent.base; @@ -266,15 +255,15 @@ "theme.bar.buttons.windowtitle.text" = secondary.base; "theme.bar.buttons.workspaces.active" = accent.bright; - "theme.bar.buttons.workspaces.available" = weird.dark; # not seen + "theme.bar.buttons.workspaces.available" = accent.base; "theme.bar.buttons.workspaces.background" = background; - "theme.bar.buttons.workspaces.border" = accent.base; # not seen + "theme.bar.buttons.workspaces.border" = accent.base; "theme.bar.buttons.workspaces.hover" = foreground; - "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; # not seen + "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.2em"; "theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright; "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.2em"; - "theme.bar.buttons.workspaces.occupied" = accent.base; + "theme.bar.buttons.workspaces.occupied" = secondary.base; "theme.bar.buttons.workspaces.pill.width" = "4em"; "theme.bar.buttons.workspaces.smartHighlight" = true; "theme.bar.buttons.y_margins" = "0em"; @@ -505,7 +494,7 @@ "theme.notification.close_button.label" = accent.base; "theme.notification.label" = accent.base; "theme.notification.labelicon" = accent.base; - "theme.notification.opacity" = 1; + "theme.notification.opacity" = 1.0; "theme.notification.text" = foreground; "theme.notification.time" = accent.base; From 7565b3163a5824da0e40956c69696b517344f23b Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 31 Aug 2025 21:25:28 +0200 Subject: [PATCH 19/23] hyperpanel++ --- home-modules/bar/hyprpanel.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/home-modules/bar/hyprpanel.nix b/home-modules/bar/hyprpanel.nix index c2de86c..a21eb02 100644 --- a/home-modules/bar/hyprpanel.nix +++ b/home-modules/bar/hyprpanel.nix @@ -75,7 +75,7 @@ "bar.workspaces.applicationIconEmptyWorkspace" = ""; "bar.workspaces.applicationIconOncePerWorkspace" = false; - "bar.workspaces.numbered_active_indicator" = "underline"; + "bar.workspaces.numbered_active_indicator" = "color"; "bar.workspaces.scroll_speed" = 1; "bar.workspaces.showAllActive" = false; "bar.workspaces.showApplicationIcons" = true; @@ -259,10 +259,11 @@ "theme.bar.buttons.workspaces.background" = background; "theme.bar.buttons.workspaces.border" = accent.base; "theme.bar.buttons.workspaces.hover" = foreground; - "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base; - "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.2em"; + "theme.bar.buttons.workspaces.numbered_active_highlighted" = accent.base; + "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.dark; + "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.4em"; "theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright; - "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.2em"; + "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.4em"; "theme.bar.buttons.workspaces.occupied" = secondary.base; "theme.bar.buttons.workspaces.pill.width" = "4em"; "theme.bar.buttons.workspaces.smartHighlight" = true; From 03131c8a65cf32ec179cfce1f5f2a5b39a934ba4 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 31 Aug 2025 21:25:43 +0200 Subject: [PATCH 20/23] youtube rice --- home-modules/firefox.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/home-modules/firefox.nix b/home-modules/firefox.nix index ca0dd51..03caadd 100644 --- a/home-modules/firefox.nix +++ b/home-modules/firefox.nix @@ -194,6 +194,21 @@ background-color: transparent !important; } } + @-moz-document domain(youtube.com) { + body, html, div#content, ytd-app, #frosted-glass.with-chipbar.ytd-app, ytd-shorts[is-dark] #cinematic-shorts-scrim.ytd-shorts { + background-color: transparent !important; + } + #background.ytd-masthead, div#background { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(100px); + } + * { + --yt-spec-base-background: transparent; + --yt-spec-raised-background: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --yt-spec-menu-background: rgba(${rice.lib.hex-to-rgb-comma-string accent.dark}, ${builtins.toString rice.transparency}) !important; + --yt-spec-inverted-background: rgba(${rice.lib.hex-to-rgb-comma-string secondary.dark}, ${builtins.toString rice.transparency}) !important; + } + } @-moz-document domain(mynixos.com) { body, html { From 99b534a6a55d967e86b7d5c42f938e9bd7d3a7b3 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 31 Aug 2025 21:26:17 +0200 Subject: [PATCH 21/23] darker background in w2c --- home-modules/wallpaper-to-colors.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-modules/wallpaper-to-colors.nix b/home-modules/wallpaper-to-colors.nix index 9e84206..6f042b4 100644 --- a/home-modules/wallpaper-to-colors.nix +++ b/home-modules/wallpaper-to-colors.nix @@ -139,7 +139,7 @@ weird = alter_hue(ilist=accent, hue=80) special = alter_hue(ilist=accent, hue=180) foreground = alter_l(accent, 0.9) - background = alter_l(accent, 0.1) + background = alter_l(accent, 0.05) d = { "base": { From f4f9e36b1697a08293eff5050825eef48350a592 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 31 Aug 2025 21:27:07 +0200 Subject: [PATCH 22/23] open firewall for ollama --- system-modules/networking.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system-modules/networking.nix b/system-modules/networking.nix index 0092696..246a0f5 100644 --- a/system-modules/networking.nix +++ b/system-modules/networking.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }@all: with all; +{ config, pkgs, ... }@all: with all; { # sops.secrets = { # "wireless-networking.env" = {}; @@ -15,6 +15,7 @@ }; enableIPv6 = true; firewall.allowedTCPPorts = [ + (pkgs.lib.mkIf config.services.ollama.enable 11434) 80 443 8000 From 04b2b7da331b5a2e6aa1e153d25d3d07bf38a5bb Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 31 Aug 2025 21:27:26 +0200 Subject: [PATCH 23/23] nx_backup download function --- home-modules/fish.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home-modules/fish.nix b/home-modules/fish.nix index afbf122..e6a721e 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -110,6 +110,12 @@ mkdir $argv cd $argv ''; + nx_backup = let + destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/"; + in pkgs.lib.mkIf (hyper.host != "NxACE") '' + set RPATH (curl -s https://${hyper.domain}/latest-backup) + rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination} + ''; # gpg = ''; # set bold \e[1m # set green \e[32m