From 495d90b0def78c8c75283cf5386064bb46b3397c Mon Sep 17 00:00:00 2001 From: pagedmov Date: Thu, 31 Oct 2024 22:33:10 -0400 Subject: [PATCH] formatted nix files using alejandra --- flake.nix | 52 +- hosts/installer/default.nix | 28 +- hosts/server/settings.nix | 8 +- modules/home/environment/default.nix | 2 +- modules/home/environment/gtk.nix | 30 +- modules/home/environment/hyprland/config.nix | 109 +- modules/home/environment/hyprland/default.nix | 5 +- modules/home/environment/spicetify.nix | 36 +- modules/home/environment/stylix.nix | 20 +- modules/home/environment/swaync.nix | 1476 ++++++++--------- modules/home/environment/userpkgs.nix | 39 +- modules/home/environment/waybar/settings.nix | 130 +- modules/home/environment/waybar/style.nix | 54 +- modules/home/files.nix | 186 +-- modules/home/home-manager.nix | 10 +- modules/home/programs/default.nix | 6 +- modules/home/programs/kitty.nix | 73 +- modules/home/scripts/commands/splash.nix | 10 +- modules/home/scripts/commands/toolbelt.nix | 147 +- modules/home/scripts/commands/viconf.nix | 5 +- modules/home/scripts/default.nix | 14 +- modules/home/scripts/wm-controls/chpaper.nix | 27 +- modules/home/scripts/wm-controls/chscheme.nix | 72 +- .../home/scripts/wm-controls/moveonscreen.nix | 121 +- modules/server/default.nix | 11 +- modules/server/services.nix | 9 +- modules/sys/configuration.nix | 13 +- modules/sys/environment/default.nix | 8 +- modules/sys/environment/issue.nix | 50 +- modules/sys/environment/sddm.nix | 20 +- modules/sys/environment/stylix.nix | 28 +- modules/sys/hardware/default.nix | 12 +- modules/sys/hardware/network.nix | 8 +- modules/sys/software/default.nix | 25 +- modules/sys/software/gaming/default.nix | 10 +- modules/sys/software/gaming/gaming_pkgs.nix | 10 +- modules/sys/software/nixvim/default.nix | 12 +- modules/sys/software/nixvim/options.nix | 48 +- .../sys/software/nixvim/plugins/default.nix | 28 +- .../software/nixvim/plugins/extra_plugins.nix | 14 +- .../sys/software/nixvim/plugins/haskell.nix | 18 +- modules/sys/software/nixvim/plugins/lsp.nix | 8 +- .../sys/software/nixvim/plugins/plugins.nix | 40 +- modules/sys/software/packages.nix | 2 +- modules/sys/software/services.nix | 7 +- 45 files changed, 1537 insertions(+), 1504 deletions(-) diff --git a/flake.nix b/flake.nix index 63dcb24..2c8e161 100644 --- a/flake.nix +++ b/flake.nix @@ -8,10 +8,10 @@ hyprpicker.url = "github:hyprwm/hyprpicker"; stylix.url = "github:danth/stylix"; - nixvim = { - url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager"; @@ -41,29 +41,31 @@ } @ inputs: let system = "x86_64-linux"; username = "pagedmov"; - wallpaper = "${self}/assets/wallpapers/sleeping.png"; - base16scheme = "nord"; # can be easily changed with the chscheme script + wallpaper = "${self}/assets/wallpapers/sleeping.png"; + base16scheme = "nord"; # can be easily changed with the chscheme script # Map colors from yaml to attribute set - # Extracting colors into a set here allows them to be propagated across the entire config, with or without stylix - lib = nixpkgs.lib; - pkgs = import nixpkgs { system = "x86_64-linux"; }; + # Extracting colors into a set here allows them to be propagated across the entire config, with or without stylix + lib = nixpkgs.lib; + pkgs = import nixpkgs {system = "x86_64-linux";}; scheme_path = "${pkgs.base16-schemes}/share/themes/${base16scheme}.yaml"; - scheme_string = builtins.readFile scheme_path; + scheme_string = builtins.readFile scheme_path; scheme_list = lib.splitString "\n" "${scheme_string}"; colors = lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) scheme_list; - scheme = lib.lists.foldl' (acc: line: - let - splitLine = lib.splitString ": " line; - key = builtins.elemAt splitLine 0; - value = builtins.elemAt splitLine 1; - trimmedKey = lib.trim key; - cleanValue_step1 = lib.splitString " " value; - cleanValue_step2 = builtins.elemAt cleanValue_step1 0; - cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2; + scheme = + lib.lists.foldl' ( + acc: line: let + splitLine = lib.splitString ": " line; + key = builtins.elemAt splitLine 0; + value = builtins.elemAt splitLine 1; + trimmedKey = lib.trim key; + cleanValue_step1 = lib.splitString " " value; + cleanValue_step2 = builtins.elemAt cleanValue_step1 0; + cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2; in - acc // { "${trimmedKey}" = cleanValue_final; } - ) {} colors; + acc // {"${trimmedKey}" = cleanValue_final;} + ) {} + colors; in { nixosConfigurations = { oganesson = nixpkgs.lib.nixosSystem { @@ -75,7 +77,7 @@ modules = [ ./hosts/desktop stylix.nixosModules.stylix - nixvim.nixosModules.nixvim + nixvim.nixosModules.nixvim nur.nixosModules.nur ]; }; @@ -88,7 +90,7 @@ modules = [ ./hosts/laptop stylix.nixosModules.stylix - nixvim.nixosModules.nixvim + nixvim.nixosModules.nixvim nur.nixosModules.nur ]; }; @@ -101,7 +103,7 @@ modules = [ ./hosts/server stylix.nixosModules.stylix - nixvim.nixosModules.nixvim + nixvim.nixosModules.nixvim nur.nixosModules.nur ]; }; @@ -113,7 +115,7 @@ }; modules = [ ./hosts/installer - nixvim.nixosModules.nixvim + nixvim.nixosModules.nixvim ]; }; }; diff --git a/hosts/installer/default.nix b/hosts/installer/default.nix index d36d0c6..0015589 100644 --- a/hosts/installer/default.nix +++ b/hosts/installer/default.nix @@ -5,21 +5,21 @@ ... }: let install-script = pkgs.writeShellScriptBin "movcfg-install" (builtins.readFile ./movcfg-install.sh); - extraFigletFonts = pkgs.fetchFromGitHub { - owner = "xero"; - repo = "figlet-fonts"; - rev = "master"; - sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; - }; - toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { - buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; + extraFigletFonts = pkgs.fetchFromGitHub { + owner = "xero"; + repo = "figlet-fonts"; + rev = "master"; + sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; + }; + toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { + buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; - installPhase = '' - make install PREFIX=$out - mkdir -p $out/share/figlet - cp -r ${extraFigletFonts}/* $out/share/figlet - ''; - }); + installPhase = '' + make install PREFIX=$out + mkdir -p $out/share/figlet + cp -r ${extraFigletFonts}/* $out/share/figlet + ''; + }); in { imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" diff --git a/hosts/server/settings.nix b/hosts/server/settings.nix index 76410d4..ee90380 100644 --- a/hosts/server/settings.nix +++ b/hosts/server/settings.nix @@ -1,4 +1,8 @@ -{pkgs, username, ...}: { +{ + pkgs, + username, + ... +}: { system.stateVersion = "24.05"; nixpkgs.config.allowUnfree = true; nix = { @@ -22,7 +26,7 @@ users.users."${username}" = { shell = pkgs.zsh; isNormalUser = true; - extraGroup = [ "wheel" ]; + extraGroup = ["wheel"]; initialPassword = "1111"; }; diff --git a/modules/home/environment/default.nix b/modules/home/environment/default.nix index c410556..c32ff17 100644 --- a/modules/home/environment/default.nix +++ b/modules/home/environment/default.nix @@ -1,7 +1,7 @@ { host, nur, - nixvim, + nixvim, self, inputs, username, diff --git a/modules/home/environment/gtk.nix b/modules/home/environment/gtk.nix index 468bb43..332f080 100644 --- a/modules/home/environment/gtk.nix +++ b/modules/home/environment/gtk.nix @@ -5,11 +5,13 @@ }: { fonts.fontconfig.enable = true; home.packages = with pkgs; [ - (nerdfonts.override { fonts = [ - "JetBrainsMono" - "CascadiaCode" - "NerdFontsSymbolsOnly" - ]; }) + (nerdfonts.override { + fonts = [ + "JetBrainsMono" + "CascadiaCode" + "NerdFontsSymbolsOnly" + ]; + }) ]; gtk = { @@ -20,14 +22,14 @@ accent = "frostblue4"; }; }; - #cursorTheme = { - # name = "Bibata-Modern-Ice"; - # package = pkgs.bibata-cursors; - # size = 16; - #}; - #font = { - # name = "Iosevka Nerd Font"; - # package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; - #}; + #cursorTheme = { + # name = "Bibata-Modern-Ice"; + # package = pkgs.bibata-cursors; + # size = 16; + #}; + #font = { + # name = "Iosevka Nerd Font"; + # package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + #}; }; } diff --git a/modules/home/environment/hyprland/config.nix b/modules/home/environment/hyprland/config.nix index fbb4b25..777209b 100644 --- a/modules/home/environment/hyprland/config.nix +++ b/modules/home/environment/hyprland/config.nix @@ -2,17 +2,18 @@ username, host, ... -}: - -let - desktop = (host == "oganesson"); - screenshot_bind = if desktop then [ # My laptop does not have a printscreen button - "super, print, exec, grimblast copy area" - ] else [ - "super, insert, exec, grimblast copy area" - ]; -in -{ +}: let + desktop = host == "oganesson"; + screenshot_bind = + if desktop + then [ + # My laptop does not have a printscreen button + "super, print, exec, grimblast copy area" + ] + else [ + "super, insert, exec, grimblast copy area" + ]; +in { wayland.windowManager.hyprland = { settings = { monitor = @@ -81,8 +82,8 @@ in gaps_in = 4; gaps_out = 8; border_size = 2; - #"col.inactive_border" = "0xff${scheme.base01}"; - #"col.active_border" = "0xff${scheme.base0F}"; + #"col.inactive_border" = "0xff${scheme.base01}"; + #"col.active_border" = "0xff${scheme.base0F}"; border_part_of_window = false; no_border_on_floating = false; }; @@ -168,46 +169,48 @@ in "workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert ]; - bind = [ - "super, up, exec, pactl set-sink-volume @default_sink@ +10%" - "super, down, exec, pactl set-sink-volume @default_sink@ -10%" - "super, t, exec, swaync-client -t -sw" - "super, a, exec, firefox" - "super, q, exec, kitty --title Kitty" - "super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty --title Kitty" - "super, c, killactive," - "super, e, exec, nemo" - "super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt" - "super shift, m, exit," - "super, m, exec, fuzzel" - "super, r, exec, neovide" - "super, b, togglesplit, # dwindle" - "super, f, togglefloating" - "super, g, fullscreen" - "super, h, movefocus, l" - "super, l, movefocus, r" - "super, k, movefocus, u" - "super, j, movefocus, d" - "super shift, h, movewindow, l" - "super shift, l, movewindow, r" - "super shift, k, movewindow, u" - "super shift, j, movewindow, d" - "super, d, exec, switchmon" - "super, 1, exec, hyprctl 'dispatch workspace 1'" - "super, 2, exec, hyprctl 'dispatch workspace 2'" - "super, 3, exec, hyprctl 'dispatch workspace 3'" - "super, 4, exec, hyprctl 'dispatch workspace 4'" - "super, 5, exec, hyprctl 'dispatch workspace 5'" - "super, 6, exec, hyprctl 'dispatch workspace 6'" - "super shift, 1, movetoworkspace, 1" - "super shift, 2, movetoworkspace, 2" - "super shift, 3, movetoworkspace, 3" - "super shift, 4, movetoworkspace, 4" - "super shift, 5, movetoworkspace, 5" - "super shift, 6, movetoworkspace, 6" - "super, s, togglespecialworkspace, magic" - "super shift, s, movetoworkspace, special:magic" - ] ++ screenshot_bind; + bind = + [ + "super, up, exec, pactl set-sink-volume @default_sink@ +10%" + "super, down, exec, pactl set-sink-volume @default_sink@ -10%" + "super, t, exec, swaync-client -t -sw" + "super, a, exec, firefox" + "super, q, exec, kitty --title Kitty" + "super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty --title Kitty" + "super, c, killactive," + "super, e, exec, nemo" + "super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt" + "super shift, m, exit," + "super, m, exec, fuzzel" + "super, r, exec, neovide" + "super, b, togglesplit, # dwindle" + "super, f, togglefloating" + "super, g, fullscreen" + "super, h, movefocus, l" + "super, l, movefocus, r" + "super, k, movefocus, u" + "super, j, movefocus, d" + "super shift, h, movewindow, l" + "super shift, l, movewindow, r" + "super shift, k, movewindow, u" + "super shift, j, movewindow, d" + "super, d, exec, switchmon" + "super, 1, exec, hyprctl 'dispatch workspace 1'" + "super, 2, exec, hyprctl 'dispatch workspace 2'" + "super, 3, exec, hyprctl 'dispatch workspace 3'" + "super, 4, exec, hyprctl 'dispatch workspace 4'" + "super, 5, exec, hyprctl 'dispatch workspace 5'" + "super, 6, exec, hyprctl 'dispatch workspace 6'" + "super shift, 1, movetoworkspace, 1" + "super shift, 2, movetoworkspace, 2" + "super shift, 3, movetoworkspace, 3" + "super shift, 4, movetoworkspace, 4" + "super shift, 5, movetoworkspace, 5" + "super shift, 6, movetoworkspace, 6" + "super, s, togglespecialworkspace, magic" + "super shift, s, movetoworkspace, special:magic" + ] + ++ screenshot_bind; bindm = [ "super, mouse:272, movewindow" "super, mouse:273, resizewindow" diff --git a/modules/home/environment/hyprland/default.nix b/modules/home/environment/hyprland/default.nix index c66a001..85e56be 100644 --- a/modules/home/environment/hyprland/default.nix +++ b/modules/home/environment/hyprland/default.nix @@ -2,9 +2,8 @@ inputs, host, ... -}: -{ +}: { imports = [(import ./hyprland.nix)] - ++ [(import ./config.nix)]; + ++ [(import ./config.nix)]; } diff --git a/modules/home/environment/spicetify.nix b/modules/home/environment/spicetify.nix index adf319d..4a6ec3e 100644 --- a/modules/home/environment/spicetify.nix +++ b/modules/home/environment/spicetify.nix @@ -2,7 +2,7 @@ pkgs, lib, inputs, - scheme, + scheme, ... }: let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; @@ -21,23 +21,23 @@ in { hidePodcasts shuffle # shuffle+ (special characters are sanitized out of extension names) ]; - #colorScheme = "custom"; + #colorScheme = "custom"; - #customColorScheme = { - # text = scheme.base06; - # subtext = scheme.base04; - # sidebar-text = scheme.base04; - # main = scheme.base00; - # sidebar = scheme.base01; - # shadow = scheme.base01; - # selected-row = scheme.base08; - # button = scheme.base0D; - # button-active = scheme.base0C; - # button-disabled = scheme.base02; - # tab-active = scheme.base0E; - # notification = scheme.base0A; - # notification-error = scheme.base09; - # misc = scheme.base0F; - #}; + #customColorScheme = { + # text = scheme.base06; + # subtext = scheme.base04; + # sidebar-text = scheme.base04; + # main = scheme.base00; + # sidebar = scheme.base01; + # shadow = scheme.base01; + # selected-row = scheme.base08; + # button = scheme.base0D; + # button-active = scheme.base0C; + # button-disabled = scheme.base02; + # tab-active = scheme.base0E; + # notification = scheme.base0A; + # notification-error = scheme.base09; + # misc = scheme.base0F; + #}; }; } diff --git a/modules/home/environment/stylix.nix b/modules/home/environment/stylix.nix index dab74f5..3f892c7 100644 --- a/modules/home/environment/stylix.nix +++ b/modules/home/environment/stylix.nix @@ -1,19 +1,17 @@ { pkgs, - scheme, - wallpaper, + scheme, + wallpaper, ... -}: - -{ +}: { stylix = { enable = true; autoEnable = true; - targets = { - # fzf.enable = true; - # kitty.enable = true; - # vesktop.enable = true; - waybar.enable = false; - }; + targets = { + # fzf.enable = true; + # kitty.enable = true; + # vesktop.enable = true; + waybar.enable = false; + }; }; } diff --git a/modules/home/environment/swaync.nix b/modules/home/environment/swaync.nix index da1e01f..b069463 100644 --- a/modules/home/environment/swaync.nix +++ b/modules/home/environment/swaync.nix @@ -1,743 +1,743 @@ {pkgs, ...}: { home.packages = with pkgs; [swaynotificationcenter]; xdg.configFile."swaync/style.css".text = '' - @define-color shadow rgba(0, 0, 0, 0.25); - /* - * - * Catppuccin Mocha palette - * Maintainer: rubyowo - * - */ - - @define-color base #1E1D2E; - @define-color mantle #181825; - @define-color crust #11111b; - - @define-color text #cdd6f4; - @define-color subtext0 #a6adc8; - @define-color subtext1 #bac2de; - - @define-color surface0 #313244; - @define-color surface1 #45475a; - @define-color surface2 #585b70; - - @define-color overlay0 #6c7086; - @define-color overlay1 #7f849c; - @define-color overlay2 #9399b2; - - @define-color blue #89b4fa; - @define-color lavender #b4befe; - @define-color sapphire #74c7ec; - @define-color sky #89dceb; - @define-color teal #94e2d5; - @define-color green #a6e3a1; - @define-color yellow #f9e2af; - @define-color peach #fab387; - @define-color maroon #eba0ac; - @define-color red #f38ba8; - @define-color mauve #cba6f7; - @define-color pink #f5c2e7; - @define-color flamingo #f2cdcd; - @define-color rosewater #f5e0dc; - - * { - font-family: "NotoSansMono Nerd Font"; - background-clip: border-box; - } - - /* #notifications_box { */ - /* border: solid 4px red; */ - /* } */ - - label { - color: @text; - } - - .notification { - border: @lavender; - box-shadow: none; - /* margin: 0px; */ - /* margin: -15px -10px -15px -10px; */ - border-radius: 4px; - background: inherit; - /* background: @theme_bg_color; */ - /* background: shade(alpha(@borders, 2.55), 0.25); */ - } - - .notification button { - background: transparent; - border-radius: 0px; - border: none; - margin: 0px; - padding: 0px; - } - - .notification button:hover { - background: @surface0; - /* background: @insensitive_bg_color; */ - } - - - .notification-content { - min-height: 64px; - margin: 10px; - padding: 0px; - border-radius: 0px; - } - - .close-button { - background: @crust; - color: @surface2; - } - - .notification-default-action, - .notification-action { - background: transparent; - border: none; - } - - - .notification-default-action { - border-radius: 4px; - } - - /* When alternative actions are visible */ - .notification-default-action:not(:only-child) { - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; - } - - .notification-action { - border-radius: 0px; - padding: 2px; - color: @text; - /* color: @theme_text_color; */ - } - - /* add bottom border radius to eliminate clipping */ - .notification-action:first-child { - border-bottom-left-radius: 4px; - } - - .notification-action:last-child { - border-bottom-right-radius: 4px; - } - - /*** Notification ***/ - /* Notification header */ - .summary { - color: @text; - /* color: @theme_text_color; */ - font-size: 16px; - padding: 0px; - } - - .time { - color: @subtext0; - /* color: alpha(@theme_text_color, 0.9); */ - font-size: 12px; - text-shadow: none; - margin: 0px 0px 0px 0px; - padding: 2px 0px; - } - - .body { - font-size: 14px; - font-weight: 500; - color: @subtext1; - /* color: alpha(@text, 0.9); */ - /* color: alpha(@theme_text_color, 0.9); */ - text-shadow: none; - margin: 0px 0px 0px 0px; - } - - .body-image { - border-radius: 4px; - } - - /* The "Notifications" and "Do Not Disturb" text widget */ - .top-action-title { - color: @text; - /* color: @theme_text_color; */ - text-shadow: none; - } - - /* Control center */ - - .control-center { - /* background: transparent; */ - background: @crust; - /* background: @theme_bg_color; */ - /* border: 1px solid @surface0; */ - border-radius: 5px; - /* box-shadow: 0px 0px 2px black; */ - } - - /* .right.overlay-indicator { */ - /* border: solid 5px red; */ - /* } */ - - .control-center-list { - /* background: @base; */ - background: @crust; - min-height: 5px; - /* border: 1px solid @surface1; */ - border-top: none; - border-radius: 0px 0px 4px 4px; - } - - .control-center-list-placeholder, - .notification-group-icon, - .notification-group { - /* opacity: 1.0; */ - /* opacity: 0; */ - color: alpha(@theme_text_color, 0.50); - } - - .notification-group { - /* unset the annoying focus thingie */ - all: unset; - border: none; - opacity: 0; - padding: 0px; - box-shadow: none; - /* selectable: no; */ - } - .notification-group > box { - all: unset; - background: @mantle; - /* background: alpha(currentColor, 0.072); */ - padding: 8px; - margin: 0px; - /* margin: 0px -5px; */ - border: none; - border-radius: 4px; - box-shadow: none; - } - - - .notification-row { - outline: none; - transition: all 1s ease; - background: @base; - /* background: @theme_bg_color; */ - border: 1px solid @crust; - margin: 10px 5px 0px 5px; - border-radius: 4px; - /* box-shadow: 0px 0px 4px black; */ - /* background: alpha(currentColor, 0.05); */ - } - - .notification-row:focus, - .notification-row:hover { - box-shadow: none; - } - - .control-center-list > row, - .control-center-list > row:focus, - .control-center-list > row:hover { - background: transparent; - border: none; - margin: 0px; - padding: 5px 10px 5px 10px; - box-shadow: none; - } - - .control-center-list > row:last-child { - padding: 5px 10px 10px 10px; - } - - - /* Window behind control center and on all other monitors */ - .blank-window { - background: transparent; - } - - /*** Widgets ***/ - - /* Title widget */ - .widget-title { - margin: 0px; - background: inherit; - /* background: @theme_bg_color; */ - border-radius: 4px 4px 0px 0px; - /* border: 1px solid @surface1; */ - border-bottom: none; - padding-bottom: 20px; - } - - .widget-title > label { - margin: 18px 10px; - font-size: 20px; - font-weight: 500; - } - - .widget-title > button { - font-weight: 700; - padding: 7px 3px; - margin-right: 10px; - background: @mantle; - color: @text; - /* color: @theme_text_color; */ - /* border: none; */ - border-radius: 4px; - } - .widget-title > button:hover { - background: @base; - /* background: alpha(currentColor, 0.1); */ - } - - /* Label widget */ - .widget-label { - margin: 0px; - padding: 0px; - min-height: 5px; - background: @mantle; - /* background: @theme_bg_color; */ - border-radius: 0px 0px 4px 4px; - /* border: 1px solid @surface1; */ - border-top: none; - } - .widget-label > label { - font-size: 0px; - font-weight: 400; - } - - /* Menubar */ - .widget-menubar { - background: inherit; - /* background: @theme_bg_color; */ - /* border: 1px solid @surface1; */ - border-top: none; - border-bottom: none; - } - .widget-menubar > box > box { - margin: 5px 10px 5px 10px; - min-height: 40px; - border-radius: 4px; - background: transparent; - } - .widget-menubar > box > box > button { - background: @mantle; - /* background: alpha(currentColor, 0.05); */ - min-width: 85px; - min-height: 50px; - margin-right: 13px; - font-size: 17px; - padding: 0px; - } - .widget-menubar > box > box > button:nth-child(4) { - margin-right: 0px; - } - .widget-menubar button:focus { - box-shadow: none; - } - .widget-menubar button:focus:hover { - background: @base; - /* background: alpha(currentColor,0.1); */ - box-shadow: none; - } - - .widget-menubar > box > revealer > box { - margin: 5px 10px 5px 10px; - background: @mantle; - /* background: alpha(currentColor, 0.05); */ - border-radius: 4px; - } - .widget-menubar > box > revealer > box > button { - background: transparent; - min-height: 50px; - padding: 0px; - margin: 5px; - } - - /* Buttons grid */ - .widget-buttons-grid { - /* background-color: @theme_bg_color; */ - background-color: @mantle; - /* border: 1px solid @surface1; */ - border-top: none; - border-bottom: none; - font-size: 14px; - font-weight: 500; - margin: 0px; - padding: 5px; - border-radius: 0px; - } - - .widget-buttons-grid > flowbox > flowboxchild { - background: @mantle; - /* background: alpha(currentColor, 0.05); */ - border-radius: 4px; - min-height: 50px; - min-width: 85px; - margin: 5px; - padding: 0px; - } - - .widget-buttons-grid > flowbox > flowboxchild > button { - background: transparent; - border-radius: 4px; - margin: 0px; - border: none; - box-shadow: none; - } - - - .widget-buttons-grid > flowbox > flowboxchild > button:hover { - background: @mantle; - /* background: alpha(currentColor, 0.1); */ - } - - /* Mpris widget */ - .widget-mpris { - padding: 10px; - padding-bottom: 35px; - padding-top: 35px; - margin-bottom: -33px; - } - .widget-mpris > box { - padding: 0px; - margin: -5px 0px -10px 0px; - padding: 0px; - border-radius: 4px; - /* background: alpha(currentColor, 0.05); */ - background: @mantle; - } - .widget-mpris > box > button:nth-child(1), - .widget-mpris > box > button:nth-child(3) { - margin-bottom: 0px; - } - .widget-mpris > box > button:nth-child(1) { - margin-left: -25px; - margin-right: -25px; - opacity: 0; - } - .widget-mpris > box > button:nth-child(3) { - margin-left: -25px; - margin-right: -25px; - opacity: 0; - } - - .widget-mpris-album-art { - all: unset; - } - - /* Player button box */ - .widget-mpris > box > carousel > widget > box > box:nth-child(2) { - margin: 5px 0px -5px 90px; - } - - /* Player buttons */ - .widget-mpris > box > carousel > widget > box > box:nth-child(2) > button { - border-radius: 4px; - } - .widget-mpris > box > carousel > widget > box > box:nth-child(2) > button:hover { - background: alpha(currentColor, 0.1); - } - carouselindicatordots { - opacity: 0; - } - - .widget-mpris-title { - color: #eeeeee; - font-weight: bold; - font-size: 1.25rem; - text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5); - } - .widget-mpris-subtitle { - color: #eeeeee; - font-size: 1rem; - text-shadow: 0px 0px 3px rgba(0, 0, 0, 1); - } - - .widget-mpris-player { - border-radius: 0px; - margin: 0px; - } - .widget-mpris-player > box > image { - margin: 0px 0px -48px 0px; - } - - .notification-group > box.vertical { - /* border: solid 5px red; */ - margin-top: 3px - } - - /* Backlight and volume widgets */ - .widget-backlight, - .widget-volume { - background-color: @crust; - /* background-color: @theme_bg_color; */ - /* border: 1px solid @surface1; */ - border-top: none; - border-bottom: none; font-size: 13px; - font-weight: 600; - border-radius: 0px; - margin: 0px; - padding: 0px; - } - .widget-volume > box { - background: @mantle; - /* background: alpha(currentColor, 0.05); */ - border-radius: 4px; - margin: 5px 10px 5px 10px; - min-height: 50px; - } - .widget-volume > box > label { - min-width: 50px; - padding: 0px; - } - .widget-volume > box > button { - min-width: 50px; - box-shadow: none; - padding: 0px; - } - .widget-volume > box > button:hover { - /* background: alpha(currentColor, 0.05); */ - background: @surface0; - } - .widget-volume > revealer > list { - background: @mantle; - /* background: alpha(currentColor, 0.05); */ - border-radius: 4px; - margin-top: 5px; - padding: 0px; - } - .widget-volume > revealer > list > row { - padding-left: 10px; - min-height: 40px; - background: transparent; - } - .widget-volume > revealer > list > row:hover { - background: transparent; - box-shadow: none; - border-radius: 4px; - } - .widget-backlight > scale { - background: @mantle; - /* background: alpha(currentColor, 0.05); */ - border-radius: 0px 4px 4px 0px; - margin: 5px 10px 5px 0px; - padding: 0px 10px 0px 0px; - min-height: 50px; - } - .widget-backlight > label { - background: @surface0; - /* background: alpha(currentColor, 0.05); */ - margin: 5px 0px 5px 10px; - border-radius: 4px 0px 0px 4px; - padding: 0px; - min-height: 50px; - min-width: 50px; - } - - /* DND widget */ - .widget-dnd { - margin: 8px; - font-size: 1.1rem; - padding-top: 20px; - } - - .widget-dnd>switch { - font-size: initial; - border-radius: 12px; - background: @surface0; - border: 1px solid @lavender; - box-shadow: none; - } - - .widget-dnd>switch:checked { - background: @surface2; - } - - .widget-dnd>switch slider { - background: @lavender; - border-radius: 12px; - } - - /* Toggles */ - .toggle:checked { - background: @surface1; - /* background: @theme_selected_bg_color; */ - } - /*.toggle:not(:checked) { - color: rgba(128, 128, 128, 0.5); - }*/ - .toggle:checked:hover { - background: @surface2; - /* background: alpha(@theme_selected_bg_color, 0.75); */ - } - - /* Sliders */ - scale { - padding: 0px; - margin: 0px 10px 0px 10px; - } - - scale trough { - border-radius: 4px; - background: @surface0; - /* background: alpha(currentColor, 0.1); */ - } - - scale highlight { - border-radius: 5px; - min-height: 10px; - margin-right: -5px; - } - - scale slider { - margin: -10px; - min-width: 10px; - min-height: 10px; - background: transparent; - box-shadow: none; - padding: 0px; - } - scale slider:hover { - } - - .right.overlay-indicator { - all: unset; - } - ''; + @define-color shadow rgba(0, 0, 0, 0.25); + /* + * + * Catppuccin Mocha palette + * Maintainer: rubyowo + * + */ + + @define-color base #1E1D2E; + @define-color mantle #181825; + @define-color crust #11111b; + + @define-color text #cdd6f4; + @define-color subtext0 #a6adc8; + @define-color subtext1 #bac2de; + + @define-color surface0 #313244; + @define-color surface1 #45475a; + @define-color surface2 #585b70; + + @define-color overlay0 #6c7086; + @define-color overlay1 #7f849c; + @define-color overlay2 #9399b2; + + @define-color blue #89b4fa; + @define-color lavender #b4befe; + @define-color sapphire #74c7ec; + @define-color sky #89dceb; + @define-color teal #94e2d5; + @define-color green #a6e3a1; + @define-color yellow #f9e2af; + @define-color peach #fab387; + @define-color maroon #eba0ac; + @define-color red #f38ba8; + @define-color mauve #cba6f7; + @define-color pink #f5c2e7; + @define-color flamingo #f2cdcd; + @define-color rosewater #f5e0dc; + + * { + font-family: "NotoSansMono Nerd Font"; + background-clip: border-box; + } + + /* #notifications_box { */ + /* border: solid 4px red; */ + /* } */ + + label { + color: @text; + } + + .notification { + border: @lavender; + box-shadow: none; + /* margin: 0px; */ + /* margin: -15px -10px -15px -10px; */ + border-radius: 4px; + background: inherit; + /* background: @theme_bg_color; */ + /* background: shade(alpha(@borders, 2.55), 0.25); */ + } + + .notification button { + background: transparent; + border-radius: 0px; + border: none; + margin: 0px; + padding: 0px; + } + + .notification button:hover { + background: @surface0; + /* background: @insensitive_bg_color; */ + } + + + .notification-content { + min-height: 64px; + margin: 10px; + padding: 0px; + border-radius: 0px; + } + + .close-button { + background: @crust; + color: @surface2; + } + + .notification-default-action, + .notification-action { + background: transparent; + border: none; + } + + + .notification-default-action { + border-radius: 4px; + } + + /* When alternative actions are visible */ + .notification-default-action:not(:only-child) { + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + } + + .notification-action { + border-radius: 0px; + padding: 2px; + color: @text; + /* color: @theme_text_color; */ + } + + /* add bottom border radius to eliminate clipping */ + .notification-action:first-child { + border-bottom-left-radius: 4px; + } + + .notification-action:last-child { + border-bottom-right-radius: 4px; + } + + /*** Notification ***/ + /* Notification header */ + .summary { + color: @text; + /* color: @theme_text_color; */ + font-size: 16px; + padding: 0px; + } + + .time { + color: @subtext0; + /* color: alpha(@theme_text_color, 0.9); */ + font-size: 12px; + text-shadow: none; + margin: 0px 0px 0px 0px; + padding: 2px 0px; + } + + .body { + font-size: 14px; + font-weight: 500; + color: @subtext1; + /* color: alpha(@text, 0.9); */ + /* color: alpha(@theme_text_color, 0.9); */ + text-shadow: none; + margin: 0px 0px 0px 0px; + } + + .body-image { + border-radius: 4px; + } + + /* The "Notifications" and "Do Not Disturb" text widget */ + .top-action-title { + color: @text; + /* color: @theme_text_color; */ + text-shadow: none; + } + + /* Control center */ + + .control-center { + /* background: transparent; */ + background: @crust; + /* background: @theme_bg_color; */ + /* border: 1px solid @surface0; */ + border-radius: 5px; + /* box-shadow: 0px 0px 2px black; */ + } + + /* .right.overlay-indicator { */ + /* border: solid 5px red; */ + /* } */ + + .control-center-list { + /* background: @base; */ + background: @crust; + min-height: 5px; + /* border: 1px solid @surface1; */ + border-top: none; + border-radius: 0px 0px 4px 4px; + } + + .control-center-list-placeholder, + .notification-group-icon, + .notification-group { + /* opacity: 1.0; */ + /* opacity: 0; */ + color: alpha(@theme_text_color, 0.50); + } + + .notification-group { + /* unset the annoying focus thingie */ + all: unset; + border: none; + opacity: 0; + padding: 0px; + box-shadow: none; + /* selectable: no; */ + } + .notification-group > box { + all: unset; + background: @mantle; + /* background: alpha(currentColor, 0.072); */ + padding: 8px; + margin: 0px; + /* margin: 0px -5px; */ + border: none; + border-radius: 4px; + box-shadow: none; + } + + + .notification-row { + outline: none; + transition: all 1s ease; + background: @base; + /* background: @theme_bg_color; */ + border: 1px solid @crust; + margin: 10px 5px 0px 5px; + border-radius: 4px; + /* box-shadow: 0px 0px 4px black; */ + /* background: alpha(currentColor, 0.05); */ + } + + .notification-row:focus, + .notification-row:hover { + box-shadow: none; + } + + .control-center-list > row, + .control-center-list > row:focus, + .control-center-list > row:hover { + background: transparent; + border: none; + margin: 0px; + padding: 5px 10px 5px 10px; + box-shadow: none; + } + + .control-center-list > row:last-child { + padding: 5px 10px 10px 10px; + } + + + /* Window behind control center and on all other monitors */ + .blank-window { + background: transparent; + } + + /*** Widgets ***/ + + /* Title widget */ + .widget-title { + margin: 0px; + background: inherit; + /* background: @theme_bg_color; */ + border-radius: 4px 4px 0px 0px; + /* border: 1px solid @surface1; */ + border-bottom: none; + padding-bottom: 20px; + } + + .widget-title > label { + margin: 18px 10px; + font-size: 20px; + font-weight: 500; + } + + .widget-title > button { + font-weight: 700; + padding: 7px 3px; + margin-right: 10px; + background: @mantle; + color: @text; + /* color: @theme_text_color; */ + /* border: none; */ + border-radius: 4px; + } + .widget-title > button:hover { + background: @base; + /* background: alpha(currentColor, 0.1); */ + } + + /* Label widget */ + .widget-label { + margin: 0px; + padding: 0px; + min-height: 5px; + background: @mantle; + /* background: @theme_bg_color; */ + border-radius: 0px 0px 4px 4px; + /* border: 1px solid @surface1; */ + border-top: none; + } + .widget-label > label { + font-size: 0px; + font-weight: 400; + } + + /* Menubar */ + .widget-menubar { + background: inherit; + /* background: @theme_bg_color; */ + /* border: 1px solid @surface1; */ + border-top: none; + border-bottom: none; + } + .widget-menubar > box > box { + margin: 5px 10px 5px 10px; + min-height: 40px; + border-radius: 4px; + background: transparent; + } + .widget-menubar > box > box > button { + background: @mantle; + /* background: alpha(currentColor, 0.05); */ + min-width: 85px; + min-height: 50px; + margin-right: 13px; + font-size: 17px; + padding: 0px; + } + .widget-menubar > box > box > button:nth-child(4) { + margin-right: 0px; + } + .widget-menubar button:focus { + box-shadow: none; + } + .widget-menubar button:focus:hover { + background: @base; + /* background: alpha(currentColor,0.1); */ + box-shadow: none; + } + + .widget-menubar > box > revealer > box { + margin: 5px 10px 5px 10px; + background: @mantle; + /* background: alpha(currentColor, 0.05); */ + border-radius: 4px; + } + .widget-menubar > box > revealer > box > button { + background: transparent; + min-height: 50px; + padding: 0px; + margin: 5px; + } + + /* Buttons grid */ + .widget-buttons-grid { + /* background-color: @theme_bg_color; */ + background-color: @mantle; + /* border: 1px solid @surface1; */ + border-top: none; + border-bottom: none; + font-size: 14px; + font-weight: 500; + margin: 0px; + padding: 5px; + border-radius: 0px; + } + + .widget-buttons-grid > flowbox > flowboxchild { + background: @mantle; + /* background: alpha(currentColor, 0.05); */ + border-radius: 4px; + min-height: 50px; + min-width: 85px; + margin: 5px; + padding: 0px; + } + + .widget-buttons-grid > flowbox > flowboxchild > button { + background: transparent; + border-radius: 4px; + margin: 0px; + border: none; + box-shadow: none; + } + + + .widget-buttons-grid > flowbox > flowboxchild > button:hover { + background: @mantle; + /* background: alpha(currentColor, 0.1); */ + } + + /* Mpris widget */ + .widget-mpris { + padding: 10px; + padding-bottom: 35px; + padding-top: 35px; + margin-bottom: -33px; + } + .widget-mpris > box { + padding: 0px; + margin: -5px 0px -10px 0px; + padding: 0px; + border-radius: 4px; + /* background: alpha(currentColor, 0.05); */ + background: @mantle; + } + .widget-mpris > box > button:nth-child(1), + .widget-mpris > box > button:nth-child(3) { + margin-bottom: 0px; + } + .widget-mpris > box > button:nth-child(1) { + margin-left: -25px; + margin-right: -25px; + opacity: 0; + } + .widget-mpris > box > button:nth-child(3) { + margin-left: -25px; + margin-right: -25px; + opacity: 0; + } + + .widget-mpris-album-art { + all: unset; + } + + /* Player button box */ + .widget-mpris > box > carousel > widget > box > box:nth-child(2) { + margin: 5px 0px -5px 90px; + } + + /* Player buttons */ + .widget-mpris > box > carousel > widget > box > box:nth-child(2) > button { + border-radius: 4px; + } + .widget-mpris > box > carousel > widget > box > box:nth-child(2) > button:hover { + background: alpha(currentColor, 0.1); + } + carouselindicatordots { + opacity: 0; + } + + .widget-mpris-title { + color: #eeeeee; + font-weight: bold; + font-size: 1.25rem; + text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5); + } + .widget-mpris-subtitle { + color: #eeeeee; + font-size: 1rem; + text-shadow: 0px 0px 3px rgba(0, 0, 0, 1); + } + + .widget-mpris-player { + border-radius: 0px; + margin: 0px; + } + .widget-mpris-player > box > image { + margin: 0px 0px -48px 0px; + } + + .notification-group > box.vertical { + /* border: solid 5px red; */ + margin-top: 3px + } + + /* Backlight and volume widgets */ + .widget-backlight, + .widget-volume { + background-color: @crust; + /* background-color: @theme_bg_color; */ + /* border: 1px solid @surface1; */ + border-top: none; + border-bottom: none; font-size: 13px; + font-weight: 600; + border-radius: 0px; + margin: 0px; + padding: 0px; + } + .widget-volume > box { + background: @mantle; + /* background: alpha(currentColor, 0.05); */ + border-radius: 4px; + margin: 5px 10px 5px 10px; + min-height: 50px; + } + .widget-volume > box > label { + min-width: 50px; + padding: 0px; + } + .widget-volume > box > button { + min-width: 50px; + box-shadow: none; + padding: 0px; + } + .widget-volume > box > button:hover { + /* background: alpha(currentColor, 0.05); */ + background: @surface0; + } + .widget-volume > revealer > list { + background: @mantle; + /* background: alpha(currentColor, 0.05); */ + border-radius: 4px; + margin-top: 5px; + padding: 0px; + } + .widget-volume > revealer > list > row { + padding-left: 10px; + min-height: 40px; + background: transparent; + } + .widget-volume > revealer > list > row:hover { + background: transparent; + box-shadow: none; + border-radius: 4px; + } + .widget-backlight > scale { + background: @mantle; + /* background: alpha(currentColor, 0.05); */ + border-radius: 0px 4px 4px 0px; + margin: 5px 10px 5px 0px; + padding: 0px 10px 0px 0px; + min-height: 50px; + } + .widget-backlight > label { + background: @surface0; + /* background: alpha(currentColor, 0.05); */ + margin: 5px 0px 5px 10px; + border-radius: 4px 0px 0px 4px; + padding: 0px; + min-height: 50px; + min-width: 50px; + } + + /* DND widget */ + .widget-dnd { + margin: 8px; + font-size: 1.1rem; + padding-top: 20px; + } + + .widget-dnd>switch { + font-size: initial; + border-radius: 12px; + background: @surface0; + border: 1px solid @lavender; + box-shadow: none; + } + + .widget-dnd>switch:checked { + background: @surface2; + } + + .widget-dnd>switch slider { + background: @lavender; + border-radius: 12px; + } + + /* Toggles */ + .toggle:checked { + background: @surface1; + /* background: @theme_selected_bg_color; */ + } + /*.toggle:not(:checked) { + color: rgba(128, 128, 128, 0.5); + }*/ + .toggle:checked:hover { + background: @surface2; + /* background: alpha(@theme_selected_bg_color, 0.75); */ + } + + /* Sliders */ + scale { + padding: 0px; + margin: 0px 10px 0px 10px; + } + + scale trough { + border-radius: 4px; + background: @surface0; + /* background: alpha(currentColor, 0.1); */ + } + + scale highlight { + border-radius: 5px; + min-height: 10px; + margin-right: -5px; + } + + scale slider { + margin: -10px; + min-width: 10px; + min-height: 10px; + background: transparent; + box-shadow: none; + padding: 0px; + } + scale slider:hover { + } + + .right.overlay-indicator { + all: unset; + } + ''; xdg.configFile."swaync/config.json".text = '' - { - "positionX": "right", - "positionY": "top", - "layer": "overlay", - "layer-shell": "true", - "cssPriority": "application", - "control-center-margin-top": 10, - "control-center-margin-bottom": 10, - "control-center-margin-right": 10, - "control-center-margin-left": 10, - "notification-icon-size": 64, - "notification-body-image-height": 128, - "notification-body-image-width": 200, - "timeout": 10, - "timeout-low": 5, - "timeout-critical": 0, - "fit-to-screen": true, - "control-center-width": 400, - "control-center-height": 650, - "notification-window-width": 350, - "keyboard-shortcuts": true, - "image-visibility": "when-available", - "transition-time": 200, - "hide-on-clear": false, - "hide-on-action": true, - "script-fail-notify": true, - "widgets": [ - "title", - "menubar#desktop", - "volume", - "backlight#mobile", - "mpris", - "dnd", - "notifications" - ], - "widget-config": { - "title": { - "text": "Notifications", - "clear-all-button": true, - "button-text": " Clear All " - }, - "menubar#desktop": { - "menu#powermode-buttons": { - "label": " 󰌪 ", - "position": "left", - "actions": [ - { - "label": "Performance", - "command": "powerprofilesctl set performance" - }, - { - "label": "Balanced", - "command": "powerprofilesctl set balanced" - }, - { - "label": "Power-saver", - "command": "powerprofilesctl set power-saver" - } - ] - }, - "menu#screenshot": { - "label": "  ", - "position": "left", - "actions": [ - { - "label": "󰹑 Whole screen", - "command": "grimblast --notify --cursor --freeze copy output" - }, - { - "label": "󰩭 Window / Region", - "command": "grimblast --notify --cursor --freeze copy area" - } - ] - }, - "menu#record": { - "label": " 󰕧 ", - "position": "left", - "actions": [ - { - "label": " Record screen", - "command": "record screen & ; swaync-client -t" - }, - { - "label": " Record selection", - "command": "record area & ; swaync-client -t" - }, - { - "label": " Record GIF", - "command": "record gif & ; swaync-client -t" - }, - { - "label": "󰻃 Stop", - "command": "record stop" - } - ] - }, - "menu#power-buttons": { - "label": "  ", - "position": "left", - "actions": [ - { - "label": " Lock", - "command": "swaylock" - }, - { - "label": " Reboot", - "command": "systemctl reboot" - }, - { - "label": " Shut down", - "command": "systemctl poweroff" - } - ] - } - }, - "backlight#mobile": { - "label": " 󰃠 ", - "device": "panel" - }, - "volume": { - "label": "", - "expand-button-label": "", - "collapse-button-label": "", - "show-per-app": true, - "show-per-app-icon": true, - "show-per-app-label": false - }, - "dnd": { - "text": " Do Not Disturb" - }, - "mpris": { - "image-size": 85, - "image-radius": 5 - } - } - } - ''; + { + "positionX": "right", + "positionY": "top", + "layer": "overlay", + "layer-shell": "true", + "cssPriority": "application", + "control-center-margin-top": 10, + "control-center-margin-bottom": 10, + "control-center-margin-right": 10, + "control-center-margin-left": 10, + "notification-icon-size": 64, + "notification-body-image-height": 128, + "notification-body-image-width": 200, + "timeout": 10, + "timeout-low": 5, + "timeout-critical": 0, + "fit-to-screen": true, + "control-center-width": 400, + "control-center-height": 650, + "notification-window-width": 350, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 200, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "widgets": [ + "title", + "menubar#desktop", + "volume", + "backlight#mobile", + "mpris", + "dnd", + "notifications" + ], + "widget-config": { + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": " Clear All " + }, + "menubar#desktop": { + "menu#powermode-buttons": { + "label": " 󰌪 ", + "position": "left", + "actions": [ + { + "label": "Performance", + "command": "powerprofilesctl set performance" + }, + { + "label": "Balanced", + "command": "powerprofilesctl set balanced" + }, + { + "label": "Power-saver", + "command": "powerprofilesctl set power-saver" + } + ] + }, + "menu#screenshot": { + "label": "  ", + "position": "left", + "actions": [ + { + "label": "󰹑 Whole screen", + "command": "grimblast --notify --cursor --freeze copy output" + }, + { + "label": "󰩭 Window / Region", + "command": "grimblast --notify --cursor --freeze copy area" + } + ] + }, + "menu#record": { + "label": " 󰕧 ", + "position": "left", + "actions": [ + { + "label": " Record screen", + "command": "record screen & ; swaync-client -t" + }, + { + "label": " Record selection", + "command": "record area & ; swaync-client -t" + }, + { + "label": " Record GIF", + "command": "record gif & ; swaync-client -t" + }, + { + "label": "󰻃 Stop", + "command": "record stop" + } + ] + }, + "menu#power-buttons": { + "label": "  ", + "position": "left", + "actions": [ + { + "label": " Lock", + "command": "swaylock" + }, + { + "label": " Reboot", + "command": "systemctl reboot" + }, + { + "label": " Shut down", + "command": "systemctl poweroff" + } + ] + } + }, + "backlight#mobile": { + "label": " 󰃠 ", + "device": "panel" + }, + "volume": { + "label": "", + "expand-button-label": "", + "collapse-button-label": "", + "show-per-app": true, + "show-per-app-icon": true, + "show-per-app-label": false + }, + "dnd": { + "text": " Do Not Disturb" + }, + "mpris": { + "image-size": 85, + "image-radius": 5 + } + } + } + ''; } diff --git a/modules/home/environment/userpkgs.nix b/modules/home/environment/userpkgs.nix index 98a964f..ea2df14 100644 --- a/modules/home/environment/userpkgs.nix +++ b/modules/home/environment/userpkgs.nix @@ -2,24 +2,23 @@ pkgs, host, ... -}: - let - desktop = (host == "oganesson"); - extraFigletFonts = pkgs.fetchFromGitHub { - owner = "xero"; - repo = "figlet-fonts"; - rev = "master"; - sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; - }; - toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { - buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; +}: let + desktop = host == "oganesson"; + extraFigletFonts = pkgs.fetchFromGitHub { + owner = "xero"; + repo = "figlet-fonts"; + rev = "master"; + sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; + }; + toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { + buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; - installPhase = '' - make install PREFIX=$out - mkdir -p $out/share/figlet - cp -r ${extraFigletFonts}/* $out/share/figlet - ''; - }); + installPhase = '' + make install PREFIX=$out + mkdir -p $out/share/figlet + cp -r ${extraFigletFonts}/* $out/share/figlet + ''; + }); desktop_pkgs = if desktop @@ -37,9 +36,9 @@ in { [ chafa nemo - flavours - ags - sassc + flavours + ags + sassc gtk3 sqlite gimp diff --git a/modules/home/environment/waybar/settings.nix b/modules/home/environment/waybar/settings.nix index 8f6b649..1b7b719 100644 --- a/modules/home/environment/waybar/settings.nix +++ b/modules/home/environment/waybar/settings.nix @@ -1,7 +1,4 @@ -{ -host, -... -}: +{host, ...}: # Grocery list: # Clock # CPU/MEM meters @@ -11,33 +8,37 @@ host, # secondary monitor will have a vertical bar on the left side # Can contain more info with two bars let - desktop = (host == "oganesson"); + desktop = host == "oganesson"; workspaces = { - format = "{icon}"; - format-icons = { - "1" = "一"; - "2" = "二"; - "3" = "三"; - "4" = "四"; - "5" = "五"; - "6" = "六"; - }; - persistent-workspaces = if desktop then { - "HDMI-A-1" = [ 1 2 3 ]; - "DP-1" = [ 4 5 6 ]; - } else { - "eDP-1" = [ 1 2 3 4 ]; + format = "{icon}"; + format-icons = { + "1" = "一"; + "2" = "二"; + "3" = "三"; + "4" = "四"; + "5" = "五"; + "6" = "六"; + }; + persistent-workspaces = + if desktop + then { + "HDMI-A-1" = [1 2 3]; + "DP-1" = [4 5 6]; + } + else { + "eDP-1" = [1 2 3 4]; }; }; - monitors = if desktop then [ - "DP-1" - "HDMI-A-1" - ] else [ - "eDP-1" - ]; - -in -{ + monitors = + if desktop + then [ + "DP-1" + "HDMI-A-1" + ] + else [ + "eDP-1" + ]; +in { programs.waybar.settings.mainBar = { layer = "bottom"; output = builtins.elemAt monitors 0; @@ -45,7 +46,10 @@ in name = "mainBar"; margin-left = 8; margin-top = 5; - margin-right = if desktop then 8 else 5; + margin-right = + if desktop + then 8 + else 5; mode = "dock"; "gtk-layer-shell" = true; @@ -81,7 +85,7 @@ in waves = false; noise_reduction = 0.77; input_delay = 2; - format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ]; + format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; }; "group/hardware" = { @@ -121,7 +125,15 @@ in rotate = 270; format = "{icon}"; format-icons = [ - "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" + "󰝦" + "󰪞" + "󰪟" + "󰪠" + "󰪡" + "󰪢" + "󰪣" + "󰪤" + "󰪥" ]; }; @@ -130,7 +142,15 @@ in rotate = 270; format = "{icon}"; format-icons = [ - "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" + "󰝦" + "󰪞" + "󰪟" + "󰪠" + "󰪡" + "󰪢" + "󰪣" + "󰪤" + "󰪥" ]; max-length = 10; tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB"; @@ -141,7 +161,15 @@ in rotate = 270; format = "{icon}"; format-icons = [ - "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" + "󰝦" + "󰪞" + "󰪟" + "󰪠" + "󰪡" + "󰪢" + "󰪣" + "󰪤" + "󰪥" ]; tooltip-format = "CPU: {usage:0.1f}%"; }; @@ -182,15 +210,16 @@ in format = "{:%I:%M %p}"; tooltip = false; }; + }; - -}; - -# ------------------------------------------ + # ------------------------------------------ programs.waybar.settings.sideBar = { layer = "bottom"; - output = if desktop then builtins.elemAt monitors 1 else builtins.elemAt monitors 0; + output = + if desktop + then builtins.elemAt monitors 1 + else builtins.elemAt monitors 0; position = "right"; margin-top = 8; margin-right = 5; @@ -199,12 +228,15 @@ in mode = "dock"; "gtk-layer-shell" = true; - modules-left = if desktop then [ - "hyprland/workspaces" - ] else [ - "group/brightness" - "battery" - ]; + modules-left = + if desktop + then [ + "hyprland/workspaces" + ] + else [ + "group/brightness" + "battery" + ]; modules-center = [ ]; modules-right = [ @@ -257,7 +289,15 @@ in tooltip-format-charging = "{capacity}%\nTil full: {time}"; format = "{icon}"; format-icons = [ - "󰁺" "󰁻" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" + "󰁺" + "󰁻" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" ]; format-charging = "󰂄"; }; diff --git a/modules/home/environment/waybar/style.nix b/modules/home/environment/waybar/style.nix index d8bf5d2..b47afd5 100644 --- a/modules/home/environment/waybar/style.nix +++ b/modules/home/environment/waybar/style.nix @@ -1,33 +1,27 @@ -{ -scheme, -... -}: - -let - bg = { - darkester = scheme.base00; - darkest = scheme.base01; - darker = scheme.base02; - dark = scheme.base03; - }; - fg = { - lightester = scheme.base07; - lightest = scheme.base06; - lighter = scheme.base05; - light = scheme.base04; - }; - colors = { - color0 = scheme.base08; - color1 = scheme.base09; - color2 = scheme.base0A; - color3 = scheme.base0B; - color4 = scheme.base0C; - color5 = scheme.base0D; - color6 = scheme.base0E; - color7 = scheme.base0F; - }; -in -{ +{scheme, ...}: let + bg = { + darkester = scheme.base00; + darkest = scheme.base01; + darker = scheme.base02; + dark = scheme.base03; + }; + fg = { + lightester = scheme.base07; + lightest = scheme.base06; + lighter = scheme.base05; + light = scheme.base04; + }; + colors = { + color0 = scheme.base08; + color1 = scheme.base09; + color2 = scheme.base0A; + color3 = scheme.base0B; + color4 = scheme.base0C; + color5 = scheme.base0D; + color6 = scheme.base0E; + color7 = scheme.base0F; + }; +in { programs.waybar.style = '' * { border: none; diff --git a/modules/home/files.nix b/modules/home/files.nix index df8afad..1ad7540 100644 --- a/modules/home/files.nix +++ b/modules/home/files.nix @@ -1,111 +1,109 @@ -{ self, ...}: - -{ +{self, ...}: { home.file.".config/neofetch/config.conf".text = '' -username=$(whoami) -name_length=''${#username} -total_width=40 -side_length=$(( (total_width - name_length - 2) / 2 )) + username=$(whoami) + name_length=''${#username} + total_width=40 + side_length=$(( (total_width - name_length - 2) / 2 )) -top_line=$(printf "─%.0s" $(seq 1 $side_length)) -top_line="$top_line $username " -top_line+=$(printf "─%.0s" $(seq 1 $side_length)) + top_line=$(printf "─%.0s" $(seq 1 $side_length)) + top_line="$top_line $username " + top_line+=$(printf "─%.0s" $(seq 1 $side_length)) -if (( (total_width - name_length) % 2 != 0 )); then - top_line+="─" -fi + if (( (total_width - name_length) % 2 != 0 )); then + top_line+="─" + fi -print_info() { - prin "┌$top_line┐" - info " ​ ​  " distro - info " ​ ​  " kernel - info " ​ ​  " wm - info " ​ ​  " shell - info " ​ ​  " term - info " ​ ​  " term_font - info " ​ ​ 󰏗 " packages - prin "└────────────────────────────────────────┘" - info cols -prin "\n \n \n \n \n ''${cl3} \n \n ''${cl5} \n \n ''${cl2} \n \n ''${cl6} \n \n ''${cl4} \n \n ''${cl1} \n \n ''${cl7} \n \n ''${cl0}" -} + print_info() { + prin "┌$top_line┐" + info " ​ ​  " distro + info " ​ ​  " kernel + info " ​ ​  " wm + info " ​ ​  " shell + info " ​ ​  " term + info " ​ ​  " term_font + info " ​ ​ 󰏗 " packages + prin "└────────────────────────────────────────┘" + info cols + prin "\n \n \n \n \n ''${cl3} \n \n ''${cl5} \n \n ''${cl2} \n \n ''${cl6} \n \n ''${cl4} \n \n ''${cl1} \n \n ''${cl7} \n \n ''${cl0}" + } -kernel_shorthand="on" -distro_shorthand="on" -os_arch="off" -uptime_shorthand="on" -memory_percent="on" -package_managers="off" -shell_path="off" -shell_version="on" -speed_type="bios_limit" -speed_shorthand="on" -gtk_shorthand="on" -gtk2="on" -gtk3="on" -colors=(distro) -bold="on" -underline_enabled="on" -underline_char="-" -separator="  " -color_blocks="off" -block_range=(0 15) # Colorblocks + kernel_shorthand="on" + distro_shorthand="on" + os_arch="off" + uptime_shorthand="on" + memory_percent="on" + package_managers="off" + shell_path="off" + shell_version="on" + speed_type="bios_limit" + speed_shorthand="on" + gtk_shorthand="on" + gtk2="on" + gtk3="on" + colors=(distro) + bold="on" + underline_enabled="on" + underline_char="-" + separator="  " + color_blocks="off" + block_range=(0 15) # Colorblocks -# Colors for custom colorblocks -magenta="\033[1;35m" -green="\033[1;32m" -white="\033[1;37m" -blue="\033[1;34m" -red="\033[1;31m" -black="\033[1;40;30m" -yellow="\033[1;33m" -cyan="\033[1;36m" -reset="\033[0m" -bgyellow="\033[1;43;33m" -bgwhite="\033[1;47;37m" -cl0="''${reset}" -cl1="''${magenta}" -cl2="''${green}" -cl3="''${white}" -cl4="''${blue}" -cl5="''${red}" -cl6="''${yellow}" -cl7="''${cyan}" -cl8="''${black}" -cl9="''${bgyellow}" -cl10="''${bgwhite}" + # Colors for custom colorblocks + magenta="\033[1;35m" + green="\033[1;32m" + white="\033[1;37m" + blue="\033[1;34m" + red="\033[1;31m" + black="\033[1;40;30m" + yellow="\033[1;33m" + cyan="\033[1;36m" + reset="\033[0m" + bgyellow="\033[1;43;33m" + bgwhite="\033[1;47;37m" + cl0="''${reset}" + cl1="''${magenta}" + cl2="''${green}" + cl3="''${white}" + cl4="''${blue}" + cl5="''${red}" + cl6="''${yellow}" + cl7="''${cyan}" + cl8="''${black}" + cl9="''${bgyellow}" + cl10="''${bgwhite}" -block_width=4 -block_height=1 + block_width=4 + block_height=1 -bar_char_elapsed="-" -bar_char_total="=" -bar_border="on" -bar_length=15 -bar_color_elapsed="distro" -bar_color_total="distro" + bar_char_elapsed="-" + bar_char_total="=" + bar_border="on" + bar_length=15 + bar_color_elapsed="distro" + bar_color_total="distro" -cpu_display="on" -memory_display="on" -battery_display="on" -disk_display="on" + cpu_display="on" + memory_display="on" + battery_display="on" + disk_display="on" -image_backend="kitty" -image_source="${self}/assets/images/nixos-logo.png" -image_size="250px" -image_loop="off" + image_backend="kitty" + image_source="${self}/assets/images/nixos-logo.png" + image_size="250px" + image_loop="off" -aascii_distro="auto" -ascii_colors=(distro) -ascii_bold="on" + aascii_distro="auto" + ascii_colors=(distro) + ascii_bold="on" -crop_mode="normal" -crop_offset="center" + crop_mode="normal" + crop_offset="center" -gap=2 + gap=2 -yoffset=0 -xoffset=0 + yoffset=0 + xoffset=0 -stdout="off" + stdout="off" ''; } diff --git a/modules/home/home-manager.nix b/modules/home/home-manager.nix index 16a3c82..db7a63b 100644 --- a/modules/home/home-manager.nix +++ b/modules/home/home-manager.nix @@ -1,11 +1,11 @@ { host, - pkgs, + pkgs, self, inputs, username, - wallpaper, - scheme, + wallpaper, + scheme, config, ... }: let @@ -27,8 +27,8 @@ in { programs.home-manager.enable = true; imports = [ ./programs - ./environment - ./scripts + ./environment + ./scripts ./files.nix ]; home = { diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 9e7dd25..88578e8 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -1,7 +1,7 @@ { host, nur, - nixvim, + nixvim, self, inputs, username, @@ -9,7 +9,7 @@ home-manager, ... }: let - desktop = (host == "onagesson"); + desktop = host == "onagesson"; desktop_modules = if desktop then [(import ./gaming)] @@ -28,5 +28,5 @@ in { ++ [(import ./password-store.nix)] ++ [(import ./autojump.nix)] ++ [(import ./firefox.nix)] - ++ desktop_modules; + ++ desktop_modules; } diff --git a/modules/home/programs/kitty.nix b/modules/home/programs/kitty.nix index 3382abb..57c67b4 100644 --- a/modules/home/programs/kitty.nix +++ b/modules/home/programs/kitty.nix @@ -1,8 +1,11 @@ -{pkgs, scheme, ...}: { +{ + pkgs, + scheme, + ... +}: { programs.kitty = { enable = true; - settings = { confirm_os_window_close = 0; window_padding_width = 4; @@ -31,40 +34,40 @@ "ctrl+shift+right" = "no_op"; }; - extraConfig = '' - background #${scheme.base00} - foreground #${scheme.base05} - selection_background #${scheme.base05} - selection_foreground #${scheme.base00} - url_color #${scheme.base04} - cursor #${scheme.base05} - active_border_color #${scheme.base03} - inactive_border_color #${scheme.base01} - active_tab_background #${scheme.base00} - active_tab_foreground #${scheme.base05} - inactive_tab_background #${scheme.base01} - inactive_tab_foreground #${scheme.base04} - tab_bar_background #${scheme.base01} + extraConfig = '' + background #${scheme.base00} + foreground #${scheme.base05} + selection_background #${scheme.base05} + selection_foreground #${scheme.base00} + url_color #${scheme.base04} + cursor #${scheme.base05} + active_border_color #${scheme.base03} + inactive_border_color #${scheme.base01} + active_tab_background #${scheme.base00} + active_tab_foreground #${scheme.base05} + inactive_tab_background #${scheme.base01} + inactive_tab_foreground #${scheme.base04} + tab_bar_background #${scheme.base01} - # normal - color0 #${scheme.base01} - color1 #${scheme.base08} - color2 #${scheme.base0B} - color3 #${scheme.base0A} - color4 #${scheme.base0D} - color5 #${scheme.base0E} - color6 #${scheme.base0C} - color7 #${scheme.base05} + # normal + color0 #${scheme.base01} + color1 #${scheme.base08} + color2 #${scheme.base0B} + color3 #${scheme.base0A} + color4 #${scheme.base0D} + color5 #${scheme.base0E} + color6 #${scheme.base0C} + color7 #${scheme.base05} - # bright - color8 #${scheme.base03} - color9 #${scheme.base09} - color10 #${scheme.base01} - color11 #${scheme.base02} - color12 #${scheme.base04} - color13 #${scheme.base06} - color14 #${scheme.base0F} - color15 #${scheme.base07} - ''; + # bright + color8 #${scheme.base03} + color9 #${scheme.base09} + color10 #${scheme.base01} + color11 #${scheme.base02} + color12 #${scheme.base04} + color13 #${scheme.base06} + color14 #${scheme.base0F} + color15 #${scheme.base07} + ''; }; } diff --git a/modules/home/scripts/commands/splash.nix b/modules/home/scripts/commands/splash.nix index 7640a3b..8c1b412 100644 --- a/modules/home/scripts/commands/splash.nix +++ b/modules/home/scripts/commands/splash.nix @@ -3,11 +3,11 @@ pkgs, }: pkgs.writeShellScriptBin "splash" '' - #!/bin/bash + #!/bin/bash - echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux" - date +"%A %B %-d %Y" - echo - echo " NixOS" | toilet -f 3d | lolcat -S 25 + echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux" + date +"%A %B %-d %Y" echo + echo " NixOS" | toilet -f 3d | lolcat -S 25 + echo '' diff --git a/modules/home/scripts/commands/toolbelt.nix b/modules/home/scripts/commands/toolbelt.nix index 83442b3..b08de1d 100644 --- a/modules/home/scripts/commands/toolbelt.nix +++ b/modules/home/scripts/commands/toolbelt.nix @@ -1,83 +1,82 @@ -{ pkgs, ... }: - +{pkgs, ...}: pkgs.writeShellScriptBin "toolbelt" '' -hostname=$(cat /etc/hostname) + hostname=$(cat /etc/hostname) -cliphistory() { - selection=$(cliphist list | fzf --preview=" - index=\$(echo {} | awk '{print \$1}'); \ - mime=\$(cliphist decode \$index | file -i -); \ - if echo \"\$mime\" | grep -q 'image'; then \ - echo \$(cliphist list | rg \"^\$index\" | cut -d ' ' -f 2- | fmt -w 30); \ - else \ - cliphist decode \"\$index\" | fmt -w 30; \ - fi" --prompt="> " | awk '{print $1}') - [ -z "$selection" ] && return 1 - cliphist decode "$selection" | wl-copy -} -btop_cmd() { - if [ "$hostname" = 'oganesson' ]; then - hyprctl dispatch resizeactive 20% 140% && - moveonscreen --center && - btop && - hyprctl dispatch resizeactive exact 40% 25% && - moveonscreen - else - hyprctl dispatch resizeactive exact 60% 68% && - moveonscreen --center && - btop && - hyprctl dispatch resizeactive exact 40% 25% && - moveonscreen - fi -} + cliphistory() { + selection=$(cliphist list | fzf --preview=" + index=\$(echo {} | awk '{print \$1}'); \ + mime=\$(cliphist decode \$index | file -i -); \ + if echo \"\$mime\" | grep -q 'image'; then \ + echo \$(cliphist list | rg \"^\$index\" | cut -d ' ' -f 2- | fmt -w 30); \ + else \ + cliphist decode \"\$index\" | fmt -w 30; \ + fi" --prompt="> " | awk '{print $1}') + [ -z "$selection" ] && return 1 + cliphist decode "$selection" | wl-copy + } + btop_cmd() { + if [ "$hostname" = 'oganesson' ]; then + hyprctl dispatch resizeactive 20% 140% && + moveonscreen --center && + btop && + hyprctl dispatch resizeactive exact 40% 25% && + moveonscreen + else + hyprctl dispatch resizeactive exact 60% 68% && + moveonscreen --center && + btop && + hyprctl dispatch resizeactive exact 40% 25% && + moveonscreen + fi + } -running=true + running=true -declare -A commands=( - ["Change Wallpaper"]="moveonscreen --center && if chpaper; then running=false; else moveonscreen; fi" - ["Change System Color Scheme"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && if chscheme; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" - ["Open System Monitor"]="hyprctl dispatch resizeactive 20% 140% && moveonscreen --center && btop_cmd && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" - ["Open Volume Controls"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && alsamixer && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" - ["Open Keyring"]="hyprctl dispatch resizeactive -300 0 && moveonscreen && if keyring; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" - ["View Clipboard History"]="hyprctl dispatch resizeactive 45% 120% && moveonscreen --center && if cliphistory;then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" -) + declare -A commands=( + ["Change Wallpaper"]="moveonscreen --center && if chpaper; then running=false; else moveonscreen; fi" + ["Change System Color Scheme"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && if chscheme; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" + ["Open System Monitor"]="hyprctl dispatch resizeactive 20% 140% && moveonscreen --center && btop_cmd && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" + ["Open Volume Controls"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && alsamixer && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" + ["Open Keyring"]="hyprctl dispatch resizeactive -300 0 && moveonscreen && if keyring; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" + ["View Clipboard History"]="hyprctl dispatch resizeactive 45% 120% && moveonscreen --center && if cliphistory;then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" + ) -ordered_commands=( - "Open Keyring" - "Open System Monitor" - "Open Volume Controls" - "Change Wallpaper" - "Change System Color Scheme" - "View Clipboard History" -) + ordered_commands=( + "Open Keyring" + "Open System Monitor" + "Open Volume Controls" + "Change Wallpaper" + "Change System Color Scheme" + "View Clipboard History" + ) -# Use fzf to select a command with preview -while $running; do -selected_command=$(printf "%s\n" "''${ordered_commands[@]}" | fzf --preview=" -cleaned_key=\$(echo {} | tr -d \"'\"); \ -echo \"Cleaned key: \$cleaned_key\"; \ -declare -A descriptions=( - [\"Change Wallpaper\"]=\"Choose a wallpaper to switch to from the assets/wallpapers folder in the system flake directory. Requires rebuilding the system and restarting hyprpaper.\" - [\"Change System Color Scheme\"]=\"Changes the base16 color scheme used by stylix to color system applications.\" - [\"Open System Monitor\"]=\"Opens a btop window.\" - [\"Open Volume Controls\"]=\"Opens alsamixer.\" - [\"Open Keyring\"]=\"Opens a fuzzy finder with all of the paths held in ~/.password-store. Selecting one uses pass to copy that password to the clipboard. Password is cleared from clipboard history after 45 seconds.\" - [\"View Clipboard History\"]=\"Opens clipboard history. Selecting an item copies it to the clipboard.\" -); \ -if [[ -v descriptions[\$cleaned_key] ]]; then \ - clear; \ - echo \''${descriptions[\$cleaned_key]} | fmt -w 28; \ -else \ - clear; \ - echo \"No description available\"; \ -fi" --prompt="> ") + # Use fzf to select a command with preview + while $running; do + selected_command=$(printf "%s\n" "''${ordered_commands[@]}" | fzf --preview=" + cleaned_key=\$(echo {} | tr -d \"'\"); \ + echo \"Cleaned key: \$cleaned_key\"; \ + declare -A descriptions=( + [\"Change Wallpaper\"]=\"Choose a wallpaper to switch to from the assets/wallpapers folder in the system flake directory. Requires rebuilding the system and restarting hyprpaper.\" + [\"Change System Color Scheme\"]=\"Changes the base16 color scheme used by stylix to color system applications.\" + [\"Open System Monitor\"]=\"Opens a btop window.\" + [\"Open Volume Controls\"]=\"Opens alsamixer.\" + [\"Open Keyring\"]=\"Opens a fuzzy finder with all of the paths held in ~/.password-store. Selecting one uses pass to copy that password to the clipboard. Password is cleared from clipboard history after 45 seconds.\" + [\"View Clipboard History\"]=\"Opens clipboard history. Selecting an item copies it to the clipboard.\" + ); \ + if [[ -v descriptions[\$cleaned_key] ]]; then \ + clear; \ + echo \''${descriptions[\$cleaned_key]} | fmt -w 28; \ + else \ + clear; \ + echo \"No description available\"; \ + fi" --prompt="> ") - #Execute the selected command if selection is not empty - if [[ -n $selected_command ]]; then - eval "''${commands[$selected_command]}" - else - running=false - fi -done + #Execute the selected command if selection is not empty + if [[ -n $selected_command ]]; then + eval "''${commands[$selected_command]}" + else + running=false + fi + done '' diff --git a/modules/home/scripts/commands/viconf.nix b/modules/home/scripts/commands/viconf.nix index 85c6db7..2d375f9 100644 --- a/modules/home/scripts/commands/viconf.nix +++ b/modules/home/scripts/commands/viconf.nix @@ -1,7 +1,4 @@ -{ - pkgs, -}: - +{pkgs}: pkgs.writeShellScriptBin "viconf" '' #!/usr/bin/env bash diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index bbaf3fa..39089fd 100644 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -41,19 +41,19 @@ self = self; pkgs = pkgs; }; - moveonscreen = import ./wm-controls/moveonscreen.nix { pkgs = pkgs; }; - toolbelt = import ./commands/toolbelt.nix { pkgs = pkgs; }; + moveonscreen = import ./wm-controls/moveonscreen.nix {pkgs = pkgs;}; + toolbelt = import ./commands/toolbelt.nix {pkgs = pkgs;}; viconf = import ./commands/viconf.nix { pkgs = pkgs; }; - chscheme = import ./wm-controls/chscheme.nix { - pkgs = pkgs; - }; - chpaper = import ./wm-controls/chpaper.nix { pkgs = pkgs; }; + chscheme = import ./wm-controls/chscheme.nix { + pkgs = pkgs; + }; + chpaper = import ./wm-controls/chpaper.nix {pkgs = pkgs;}; in { home.packages = [ chpaper - chscheme + chscheme keyring garbage-collect invoke diff --git a/modules/home/scripts/wm-controls/chpaper.nix b/modules/home/scripts/wm-controls/chpaper.nix index 6116f7e..8c6f94c 100644 --- a/modules/home/scripts/wm-controls/chpaper.nix +++ b/modules/home/scripts/wm-controls/chpaper.nix @@ -1,16 +1,15 @@ -{ pkgs }: - +{pkgs}: pkgs.writeShellScriptBin "chpaper" '' - paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")" - [ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1 - echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/flake.nix - echo "Successfully changed wallpaper. Rebuild now?" && \ - select choice in "Yes" "No"; do - case $choice in - "Yes") - rebuild;pkill -9 hyprpaper;exit 0;; - "No") - echo "Exiting...";exit 0;; - esac - done + paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")" + [ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1 + echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/flake.nix + echo "Successfully changed wallpaper. Rebuild now?" && \ + select choice in "Yes" "No"; do + case $choice in + "Yes") + rebuild;pkill -9 hyprpaper;exit 0;; + "No") + echo "Exiting...";exit 0;; + esac + done '' diff --git a/modules/home/scripts/wm-controls/chscheme.nix b/modules/home/scripts/wm-controls/chscheme.nix index 26fb22b..059c0aa 100644 --- a/modules/home/scripts/wm-controls/chscheme.nix +++ b/modules/home/scripts/wm-controls/chscheme.nix @@ -1,42 +1,40 @@ -{ - pkgs, -}: +{pkgs}: pkgs.writeShellScriptBin "chscheme" '' -selected_scheme=$(/usr/bin/env ls "$(nix-build '' -A base16-schemes)"/share/themes | \ - sed 's/\.yaml//g' | \ - fzf --preview 'cat $(nix-build "" -A base16-schemes)/share/themes/{}.yaml | \ - while IFS=": " read -r key value; do \ - if [[ $key =~ base0[0-9A-F] ]]; then \ - clean_value=$(echo $value | tr -d "\""); \ - r=$((16#''${clean_value:0:2})); \ - g=$((16#''${clean_value:2:2})); \ - b=$((16#''${clean_value:4:2})); \ - printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \ - fi; \ - done') + selected_scheme=$(/usr/bin/env ls "$(nix-build '' -A base16-schemes)"/share/themes | \ + sed 's/\.yaml//g' | \ + fzf --preview 'cat $(nix-build "" -A base16-schemes)/share/themes/{}.yaml | \ + while IFS=": " read -r key value; do \ + if [[ $key =~ base0[0-9A-F] ]]; then \ + clean_value=$(echo $value | tr -d "\""); \ + r=$((16#''${clean_value:0:2})); \ + g=$((16#''${clean_value:2:2})); \ + b=$((16#''${clean_value:4:2})); \ + printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \ + fi; \ + done') -if [[ -z "$selected_scheme" ]]; then - echo "Aborting color scheme change." - exit 1 -fi + if [[ -z "$selected_scheme" ]]; then + echo "Aborting color scheme change." + exit 1 + fi -echo "$selected_scheme" | xargs -I {} sed -i '/base16scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/flake.nix -if [ $? -ne 0 ]; then - echo "Failed to change color scheme." - exit 1 -fi + echo "$selected_scheme" | xargs -I {} sed -i '/base16scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/flake.nix + if [ $? -ne 0 ]; then + echo "Failed to change color scheme." + exit 1 + fi -echo "Successfully changed system color scheme. Rebuild now?" -select choice in "Yes" "No"; do - case $choice in - "Yes") - rebuild - exit 0 - ;; - "No") - echo "Exiting..." - exit 0 - ;; - esac -done + echo "Successfully changed system color scheme. Rebuild now?" + select choice in "Yes" "No"; do + case $choice in + "Yes") + rebuild + exit 0 + ;; + "No") + echo "Exiting..." + exit 0 + ;; + esac + done '' diff --git a/modules/home/scripts/wm-controls/moveonscreen.nix b/modules/home/scripts/wm-controls/moveonscreen.nix index 44c2015..4ec1f56 100644 --- a/modules/home/scripts/wm-controls/moveonscreen.nix +++ b/modules/home/scripts/wm-controls/moveonscreen.nix @@ -1,77 +1,76 @@ -{ pkgs }: - +{pkgs}: pkgs.writeShellScriptBin "moveonscreen" '' -center_window=false -if [[ $1 == "--center" ]]; then - center_window=true -fi + center_window=false + if [[ $1 == "--center" ]]; then + center_window=true + fi -cursor_pos=$(hyprctl cursorpos | sed 's/,//') -cursor_x=$(echo "$cursor_pos" | awk '{print $1}') -cursor_y=$(echo "$cursor_pos" | awk '{print $2}') + cursor_pos=$(hyprctl cursorpos | sed 's/,//') + cursor_x=$(echo "$cursor_pos" | awk '{print $1}') + cursor_y=$(echo "$cursor_pos" | awk '{print $2}') -window_info=$(hyprctl activewindow -j) -window_width=$(echo "$window_info" | jq ".size[0]") -window_height=$(echo "$window_info" | jq ".size[1]") + window_info=$(hyprctl activewindow -j) + window_width=$(echo "$window_info" | jq ".size[0]") + window_height=$(echo "$window_info" | jq ".size[1]") -if [ "$center_window" = true ]; then - cursor_x=$((cursor_x - window_width / 2)) - cursor_y=$((cursor_y - window_height / 2)) + if [ "$center_window" = true ]; then + cursor_x=$((cursor_x - window_width / 2)) + cursor_y=$((cursor_y - window_height / 2)) - if (( cursor_x < 10 )); then - cursor_x=10 - fi - if (( cursor_y < 54 )); then - cursor_y=54 - fi -fi + if (( cursor_x < 10 )); then + cursor_x=10 + fi + if (( cursor_y < 54 )); then + cursor_y=54 + fi + fi -monitors=$(hyprctl monitors -j) + monitors=$(hyprctl monitors -j) -monitor_x_min=0 -monitor_x_max=0 -monitor_y_min=0 -monitor_y_max=0 -focused_monitor=-1 + monitor_x_min=0 + monitor_x_max=0 + monitor_y_min=0 + monitor_y_max=0 + focused_monitor=-1 -for ((i = 0; i < $(echo "$monitors" | jq 'length'); i++)); do - mon_x=$(echo "$monitors" | jq ".[$i].x") - mon_y=$(echo "$monitors" | jq ".[$i].y") - mon_width=$(echo "$monitors" | jq ".[$i].width") - mon_height=$(echo "$monitors" | jq ".[$i].height") - is_focused=$(echo "$monitors" | jq ".[$i].focused") + for ((i = 0; i < $(echo "$monitors" | jq 'length'); i++)); do + mon_x=$(echo "$monitors" | jq ".[$i].x") + mon_y=$(echo "$monitors" | jq ".[$i].y") + mon_width=$(echo "$monitors" | jq ".[$i].width") + mon_height=$(echo "$monitors" | jq ".[$i].height") + is_focused=$(echo "$monitors" | jq ".[$i].focused") - if [ "$is_focused" = true ]; then - monitor_x_min=$((mon_x + 10)) - monitor_x_max=$((mon_x + mon_width - 10)) - monitor_y_min=$((mon_y + 10)) - monitor_y_max=$((mon_y + mon_height - 10)) - focused_monitor=$i - break - fi -done + if [ "$is_focused" = true ]; then + monitor_x_min=$((mon_x + 10)) + monitor_x_max=$((mon_x + mon_width - 10)) + monitor_y_min=$((mon_y + 10)) + monitor_y_max=$((mon_y + mon_height - 10)) + focused_monitor=$i + break + fi + done -if [ "$focused_monitor" -eq -1 ]; then - exit 1 -fi + if [ "$focused_monitor" -eq -1 ]; then + exit 1 + fi -if (( cursor_x < monitor_x_min )); then - adjusted_x=$monitor_x_min -elif (( cursor_x + window_width > monitor_x_max )); then - adjusted_x=$((monitor_x_max - window_width)) -else - adjusted_x=$cursor_x -fi + if (( cursor_x < monitor_x_min )); then + adjusted_x=$monitor_x_min + elif (( cursor_x + window_width > monitor_x_max )); then + adjusted_x=$((monitor_x_max - window_width)) + else + adjusted_x=$cursor_x + fi -if (( cursor_y < monitor_y_min )); then - adjusted_y=$monitor_y_min -elif (( cursor_y + window_height > monitor_y_max )); then - adjusted_y=$((monitor_y_max - window_height)) -else - adjusted_y=$cursor_y -fi + if (( cursor_y < monitor_y_min )); then + adjusted_y=$monitor_y_min + elif (( cursor_y + window_height > monitor_y_max )); then + adjusted_y=$((monitor_y_max - window_height)) + else + adjusted_y=$cursor_y + fi -hyprctl dispatch moveactive exact "$adjusted_x $adjusted_y" > /dev/null 2>&1 + hyprctl dispatch moveactive exact "$adjusted_x $adjusted_y" > /dev/null 2>&1 '' diff --git a/modules/server/default.nix b/modules/server/default.nix index d6c4a34..809e918 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -1,3 +1,8 @@ -{config,inputs,scheme,wallpaper,username,...}: - -{} +{ + config, + inputs, + scheme, + wallpaper, + username, + ... +}: {} diff --git a/modules/server/services.nix b/modules/server/services.nix index b4c06af..03f88d6 100644 --- a/modules/server/services.nix +++ b/modules/server/services.nix @@ -1,6 +1,9 @@ -{ config, pkgs, username, ... }: - { + config, + pkgs, + username, + ... +}: { systemd.user.tmpfiles.users."${username}".rules = [ "d /home/${username}/media 0770 ${username} users -" "d /home/${username}/backup 0770 ${username} users -" @@ -10,6 +13,4 @@ "d /home/${username}/inbox 0770 ${username} users -" "d /home/${username}/outbox 0770 ${username} users -" ]; - - } diff --git a/modules/sys/configuration.nix b/modules/sys/configuration.nix index 51d03d5..81c1de4 100644 --- a/modules/sys/configuration.nix +++ b/modules/sys/configuration.nix @@ -6,12 +6,11 @@ username, host, ... -}: { +}: { imports = [ - ./hardware - ./software - ./environment - ../home/home-manager.nix - ]; + ./hardware + ./software + ./environment + ../home/home-manager.nix + ]; } - diff --git a/modules/sys/environment/default.nix b/modules/sys/environment/default.nix index 746b83f..2f70861 100644 --- a/modules/sys/environment/default.nix +++ b/modules/sys/environment/default.nix @@ -1,15 +1,15 @@ { inputs, nixpkgs, - nixvim, + nixvim, config, self, username, host, ... -}: { +}: { imports = - [(import ./sddm.nix)] + [(import ./sddm.nix)] ++ [(import ./issue.nix)] - ++ [(import ./stylix.nix)]; + ++ [(import ./stylix.nix)]; } diff --git a/modules/sys/environment/issue.nix b/modules/sys/environment/issue.nix index 1b04387..ffc781d 100644 --- a/modules/sys/environment/issue.nix +++ b/modules/sys/environment/issue.nix @@ -1,31 +1,29 @@ -{ ... }: - -{ +{...}: { environment.etc."issue".text = '' - \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒ - \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒ \e[38;5;27m ▓▓▓ - \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓ ▓▓ ▓▓▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ - \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\e[38;5;81m▒▒▒▒▒▒ \e[38;5;27m▓▓ \e[38;5;27m ▓▓▓▓▓ ▓▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ - \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓ \e[38;5;27m ▓▓▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ - \e[38;5;81m▒▒▒▒ \e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒ ▒▒▒▒ ▒▒▒▒ - \e[38;5;81m▒▒▒▒ \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒ - \e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;81m▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒ - \e[38;5;81m ▒▒▒▒▒▒▒▒▒\e[38;5;27m \e[38;5;27m▓▓▓▓▓▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒ - \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓ \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒ - \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒ - \e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓▓ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒ - \e[38;5;81m▒▒▒ \e[38;5;27m▓▓▓▓\e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ \e[38;5;81m ▒▒▒▒ ▒▒▒▒ ▒▒▒▒ - \e[38;5;81m▒▒ \e[38;5;27m▓▓▓▓▓▓\e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ - \e[38;5;27m▓▓▓▓▓▓▓▓ \e[38;5;81m▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒ - \e[38;5;27m▓▓▓▓ ▓▓▓▓ \e[38;5;81m▒▒▒▒ \e[38;5;27m ▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ - \e[38;5;27m▓▓▓▓ ▓▓▓▓ \e[38;5;81m▒▒▒▒ + \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒ + \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒ \e[38;5;27m ▓▓▓ + \e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓ ▓▓ ▓▓▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ + \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\e[38;5;81m▒▒▒▒▒▒ \e[38;5;27m▓▓ \e[38;5;27m ▓▓▓▓▓ ▓▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ + \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓ \e[38;5;27m ▓▓▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒ + \e[38;5;81m▒▒▒▒ \e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒ ▒▒▒▒ ▒▒▒▒ + \e[38;5;81m▒▒▒▒ \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒ + \e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;81m▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒ + \e[38;5;81m ▒▒▒▒▒▒▒▒▒\e[38;5;27m \e[38;5;27m▓▓▓▓▓▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒ + \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓ \e[38;5;27m▓▓▓▓▓▓▓▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒ + \e[38;5;81m▒▒▒▒\e[38;5;27m▓▓▓▓ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒▒ + \e[38;5;81m▒▒▒▒ \e[38;5;27m▓▓▓▓ \e[38;5;27m▓▓▓▓ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓ \e[38;5;81m ▒▒▒ ▒▒▒ ▒▒▒▒ + \e[38;5;81m▒▒▒ \e[38;5;27m▓▓▓▓\e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ \e[38;5;81m ▒▒▒▒ ▒▒▒▒ ▒▒▒▒ + \e[38;5;81m▒▒ \e[38;5;27m▓▓▓▓▓▓\e[38;5;81m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ + \e[38;5;27m▓▓▓▓▓▓▓▓ \e[38;5;81m▒▒▒▒ \e[38;5;27m ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒ + \e[38;5;27m▓▓▓▓ ▓▓▓▓ \e[38;5;81m▒▒▒▒ \e[38;5;27m ▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ \e[38;5;81m ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ + \e[38;5;27m▓▓▓▓ ▓▓▓▓ \e[38;5;81m▒▒▒▒ - \e[1;32mSystem Maintainer\e[0m: Kyler Clay - \e[1;32mContact\e[0m: kylerclay@proton.me - 470-403-8522 + \e[1;32mSystem Maintainer\e[0m: Kyler Clay + \e[1;32mContact\e[0m: kylerclay@proton.me + 470-403-8522 - Run '\e[1;35mnixos-help\e[0m' for the NixOS manual. - Run '\e[1;35mHyprland\e[0m' to enter the desktop environment. -''; + Run '\e[1;35mnixos-help\e[0m' for the NixOS manual. + Run '\e[1;35mHyprland\e[0m' to enter the desktop environment. + ''; } diff --git a/modules/sys/environment/sddm.nix b/modules/sys/environment/sddm.nix index 777b0bf..a9c7996 100644 --- a/modules/sys/environment/sddm.nix +++ b/modules/sys/environment/sddm.nix @@ -4,15 +4,17 @@ config, ... }: { - environment.systemPackages = [( - pkgs.catppuccin-sddm.override { - flavor = "mocha"; - font = "JetBrains Mono Nerd Font"; - fontSize = "14"; - loginBackground = true; - background = "${self}/assets/wallpapers/dark-waves.jpg"; - } - )]; + environment.systemPackages = [ + ( + pkgs.catppuccin-sddm.override { + flavor = "mocha"; + font = "JetBrains Mono Nerd Font"; + fontSize = "14"; + loginBackground = true; + background = "${self}/assets/wallpapers/dark-waves.jpg"; + } + ) + ]; services.displayManager.sddm = { enable = true; wayland.enable = true; diff --git a/modules/sys/environment/stylix.nix b/modules/sys/environment/stylix.nix index 08deb63..edb5ce5 100644 --- a/modules/sys/environment/stylix.nix +++ b/modules/sys/environment/stylix.nix @@ -1,24 +1,22 @@ { pkgs, - scheme, - wallpaper, + scheme, + wallpaper, ... -}: - -{ +}: { stylix = { enable = true; - base16Scheme = scheme; + base16Scheme = scheme; image = wallpaper; polarity = "dark"; autoEnable = true; - opacity.terminal = 0.5; + opacity.terminal = 0.5; targets = { console.enable = true; feh.enable = true; grub.enable = true; - gtk.enable = true; - nixos-icons.enable = true; + gtk.enable = true; + nixos-icons.enable = true; }; cursor = { package = pkgs.bibata-cursors; @@ -37,12 +35,12 @@ package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; name = "JetBrains Mono Nerd Font"; }; - sizes = { - desktop = 10; - applications = 14; - terminal = 14; - popups = 16; - }; + sizes = { + desktop = 10; + applications = 14; + terminal = 14; + popups = 16; + }; }; }; } diff --git a/modules/sys/hardware/default.nix b/modules/sys/hardware/default.nix index c748941..7d75833 100644 --- a/modules/sys/hardware/default.nix +++ b/modules/sys/hardware/default.nix @@ -1,16 +1,14 @@ - { inputs, nixpkgs, - nixvim, + nixvim, config, self, username, host, ... -}: { - imports = - [( import ./bootloader.nix )] - ++ [( import ./network.nix )]; +}: { + imports = + [(import ./bootloader.nix)] + ++ [(import ./network.nix)]; } - diff --git a/modules/sys/hardware/network.nix b/modules/sys/hardware/network.nix index fcdfcee..971fdc4 100644 --- a/modules/sys/hardware/network.nix +++ b/modules/sys/hardware/network.nix @@ -1,8 +1,6 @@ -{host, ...}: -let - desktop = (host == "oganesson"); -in -{ +{host, ...}: let + desktop = host == "oganesson"; +in { networking = { networkmanager.enable = true; hostName = diff --git a/modules/sys/software/default.nix b/modules/sys/software/default.nix index 6fdcea7..f48cb43 100644 --- a/modules/sys/software/default.nix +++ b/modules/sys/software/default.nix @@ -6,18 +6,17 @@ username, host, ... -}: -let - desktop = (host == "oganesson"); - desktop_modules = if desktop then - [(import ./virtualization.nix)] ++ [(import ./gaming)] - else []; -in -{ +}: let + desktop = host == "oganesson"; + desktop_modules = + if desktop + then [(import ./virtualization.nix)] ++ [(import ./gaming)] + else []; +in { imports = - [(import ./packages.nix)] - ++ [(import ./programs.nix)] - ++ [(import ./services.nix)] - ++ [(import ./nixvim)] - ++ desktop_modules; + [(import ./packages.nix)] + ++ [(import ./programs.nix)] + ++ [(import ./services.nix)] + ++ [(import ./nixvim)] + ++ desktop_modules; } diff --git a/modules/sys/software/gaming/default.nix b/modules/sys/software/gaming/default.nix index a628395..0b11b5c 100644 --- a/modules/sys/software/gaming/default.nix +++ b/modules/sys/software/gaming/default.nix @@ -1,7 +1,5 @@ -{ ... }: - -{ - imports = - [(import ./steam.nix)] - ++ [(import ./gaming_pkgs.nix)]; +{...}: { + imports = + [(import ./steam.nix)] + ++ [(import ./gaming_pkgs.nix)]; } diff --git a/modules/sys/software/gaming/gaming_pkgs.nix b/modules/sys/software/gaming/gaming_pkgs.nix index 29137c5..f2685f3 100644 --- a/modules/sys/software/gaming/gaming_pkgs.nix +++ b/modules/sys/software/gaming/gaming_pkgs.nix @@ -1,7 +1,5 @@ -{ pkgs, ... }: - -{ - environment.systemPackages = with pkgs; [ - snes9x-gtk - ]; +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + snes9x-gtk + ]; } diff --git a/modules/sys/software/nixvim/default.nix b/modules/sys/software/nixvim/default.nix index 50dfb49..46d3e67 100644 --- a/modules/sys/software/nixvim/default.nix +++ b/modules/sys/software/nixvim/default.nix @@ -3,10 +3,10 @@ pkgs, ... }: { - imports = [ - ./plugins - ./options.nix - ./keymaps.nix - ./autocmd.nix - ]; + imports = [ + ./plugins + ./options.nix + ./keymaps.nix + ./autocmd.nix + ]; } diff --git a/modules/sys/software/nixvim/options.nix b/modules/sys/software/nixvim/options.nix index 44095de..5eda762 100644 --- a/modules/sys/software/nixvim/options.nix +++ b/modules/sys/software/nixvim/options.nix @@ -1,28 +1,30 @@ -{ scheme, config, ... }: - { + scheme, + config, + ... +}: { programs.nixvim = { - colorschemes.base16 = { - enable = true; - #colorscheme = { - # base00 = "#${scheme.base00}"; - # base01 = "#${scheme.base01}"; - # base02 = "#${scheme.base02}"; - # base03 = "#${scheme.base03}"; - # base04 = "#${scheme.base04}"; - # base05 = "#${scheme.base05}"; - # base06 = "#${scheme.base06}"; - # base07 = "#${scheme.base07}"; - # base08 = "#${scheme.base08}"; - # base09 = "#${scheme.base09}"; - # base0A = "#${scheme.base0A}"; - # base0B = "#${scheme.base0B}"; - # base0C = "#${scheme.base0C}"; - # base0D = "#${scheme.base0D}"; - # base0E = "#${scheme.base0E}"; - # base0F = "#${scheme.base0F}"; - #}; - }; + colorschemes.base16 = { + enable = true; + #colorscheme = { + # base00 = "#${scheme.base00}"; + # base01 = "#${scheme.base01}"; + # base02 = "#${scheme.base02}"; + # base03 = "#${scheme.base03}"; + # base04 = "#${scheme.base04}"; + # base05 = "#${scheme.base05}"; + # base06 = "#${scheme.base06}"; + # base07 = "#${scheme.base07}"; + # base08 = "#${scheme.base08}"; + # base09 = "#${scheme.base09}"; + # base0A = "#${scheme.base0A}"; + # base0B = "#${scheme.base0B}"; + # base0C = "#${scheme.base0C}"; + # base0D = "#${scheme.base0D}"; + # base0E = "#${scheme.base0E}"; + # base0F = "#${scheme.base0F}"; + #}; + }; enable = true; diagnostics.signs = false; extraConfigLua = '' diff --git a/modules/sys/software/nixvim/plugins/default.nix b/modules/sys/software/nixvim/plugins/default.nix index 0514d52..b76449b 100644 --- a/modules/sys/software/nixvim/plugins/default.nix +++ b/modules/sys/software/nixvim/plugins/default.nix @@ -1,16 +1,16 @@ { - imports = [ - ./alpha.nix - ./haskell.nix - ./vim-matchup.nix - ./coq.nix - ./barbar.nix - ./cmp.nix - ./lsp.nix - ./lualine.nix - ./plugins.nix - ./nvim-tree.nix - ./telescope.nix - ./extra_plugins.nix - ]; + imports = [ + ./alpha.nix + ./haskell.nix + ./vim-matchup.nix + ./coq.nix + ./barbar.nix + ./cmp.nix + ./lsp.nix + ./lualine.nix + ./plugins.nix + ./nvim-tree.nix + ./telescope.nix + ./extra_plugins.nix + ]; } diff --git a/modules/sys/software/nixvim/plugins/extra_plugins.nix b/modules/sys/software/nixvim/plugins/extra_plugins.nix index eebfd52..fe87f74 100644 --- a/modules/sys/software/nixvim/plugins/extra_plugins.nix +++ b/modules/sys/software/nixvim/plugins/extra_plugins.nix @@ -39,13 +39,13 @@ }; }) #(pkgs.vimUtils.buildVimPlugin { - #name = "nvim-ghost.nvim"; - #src = pkgs.fetchFromGitHub { - #owner = "subnut"; - #repo = "nvim-ghost.nvim"; - #rev = "67cc8f38c69d271af1c2430ff5099766f3550eb8"; - #hash = "sha256-XldDgPqVeIfUjaRLVUMp88eHBHLzoVgOmT3gupPs+ao="; - #}; + #name = "nvim-ghost.nvim"; + #src = pkgs.fetchFromGitHub { + #owner = "subnut"; + #repo = "nvim-ghost.nvim"; + #rev = "67cc8f38c69d271af1c2430ff5099766f3550eb8"; + #hash = "sha256-XldDgPqVeIfUjaRLVUMp88eHBHLzoVgOmT3gupPs+ao="; + #}; #}) ]; }; diff --git a/modules/sys/software/nixvim/plugins/haskell.nix b/modules/sys/software/nixvim/plugins/haskell.nix index 59f99af..8b8c687 100644 --- a/modules/sys/software/nixvim/plugins/haskell.nix +++ b/modules/sys/software/nixvim/plugins/haskell.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: { - programs.nixvim = { - extraPlugins = [ - (pkgs.vimUtils.buildVimPlugin { +{pkgs, ...}: { + programs.nixvim = { + extraPlugins = [ + (pkgs.vimUtils.buildVimPlugin { name = "haskell-tools.nvim"; src = pkgs.fetchFromGitHub { owner = "mrcjkb"; @@ -10,9 +10,9 @@ hash = "sha256-f+M35EwAlHwjJ2Xs2u9FLnyH0FJT22D0LLShDXCbEEs="; }; }) - ]; - plugins = { - haskell-scope-highlighting.enable = true; - }; - }; + ]; + plugins = { + haskell-scope-highlighting.enable = true; + }; + }; } diff --git a/modules/sys/software/nixvim/plugins/lsp.nix b/modules/sys/software/nixvim/plugins/lsp.nix index bd7e7d4..a8d9af0 100644 --- a/modules/sys/software/nixvim/plugins/lsp.nix +++ b/modules/sys/software/nixvim/plugins/lsp.nix @@ -14,10 +14,10 @@ nil_ls.enable = true; pyright.enable = true; sqls.enable = true; - hls = { - enable = true; - installGhc = true; - }; + hls = { + enable = true; + installGhc = true; + }; }; }; }; diff --git a/modules/sys/software/nixvim/plugins/plugins.nix b/modules/sys/software/nixvim/plugins/plugins.nix index 41dc2b1..9fd5686 100644 --- a/modules/sys/software/nixvim/plugins/plugins.nix +++ b/modules/sys/software/nixvim/plugins/plugins.nix @@ -1,29 +1,29 @@ { programs.nixvim = { plugins = { - dap = { + dap = { enable = true; extensions.dap-ui.enable = true; }; - nix.enable = true; - neoscroll.enable = true; - endwise.enable = true; - firenvim.enable = true; - floaterm.enable = true; - fugitive.enable = true; - gitsigns.enable = true; - indent-blankline.enable = true; - lastplace.enable = true; - markdown-preview.enable = true; - marks.enable = true; - nvim-surround.enable = true; - rainbow-delimiters.enable = true; - render-markdown.enable = true; - rustaceanvim.enable = true; - treesitter.enable = true; - trim.enable = true; - trouble.enable = true; - web-devicons.enable = true; + nix.enable = true; + neoscroll.enable = true; + endwise.enable = true; + firenvim.enable = true; + floaterm.enable = true; + fugitive.enable = true; + gitsigns.enable = true; + indent-blankline.enable = true; + lastplace.enable = true; + markdown-preview.enable = true; + marks.enable = true; + nvim-surround.enable = true; + rainbow-delimiters.enable = true; + render-markdown.enable = true; + rustaceanvim.enable = true; + treesitter.enable = true; + trim.enable = true; + trouble.enable = true; + web-devicons.enable = true; }; }; } diff --git a/modules/sys/software/packages.nix b/modules/sys/software/packages.nix index b5c7f6b..af3b804 100644 --- a/modules/sys/software/packages.nix +++ b/modules/sys/software/packages.nix @@ -9,7 +9,7 @@ alsa-utils bc cava - cabal-install + cabal-install clang clang-tools cliphist diff --git a/modules/sys/software/services.nix b/modules/sys/software/services.nix index c2864ad..77a6e08 100644 --- a/modules/sys/software/services.nix +++ b/modules/sys/software/services.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{...}: { services = { pipewire = { enable = true; @@ -11,6 +11,9 @@ dbus.enable = true; mullvad-vpn.enable = true; blueman.enable = true; - openssh.enable = true; + openssh = { + enable = true; + allowSFTP = true; + }; }; }