diff --git a/common/colors.nix b/common/colors.nix index 2c6fd94..2555ffc 100644 --- a/common/colors.nix +++ b/common/colors.nix @@ -5,42 +5,35 @@ nix-colors.homeManagerModules.default ]; - # colorScheme = nix-colors.colorSchemes.catppuccin-macchiato; - colorScheme = { slug = "test"; name = "TestScheme"; author = "Noa"; palette = { - base00 = "#000000"; - base01 = "#0000FF"; - base02 = "#00FF00"; - base03 = "#00FFFF"; - base04 = "#FF0000"; - base05 = "#FF00FF"; - base06 = "#FFFF00"; - base07 = "#FFFFFF"; - base08 = "#777777"; - base09 = "#7777FF"; - base0A = "#77FF77"; - base0B = "#77FFFF"; - base0C = "#FF7777"; - base0D = "#FF77FF"; - base0E = "#FFFF77"; - base0F = "#AAAAAA"; - text = "#222222"; - textInverted = "#DDDDDD"; - textMuted = "#DDDDDD"; - background = "#FFD2D2"; - backgroundMuted = "#CCCCCC"; - warn = "#FF0000"; - highlight = "#FBAF44"; - danger = "#F53C3C"; - succes = "#5BBD63"; - spotifyGreen = "#39A04A"; - border = "#5F5F5F"; - info = "#2CB6AF"; - ok = "#38B148"; + base00 = "#26052e"; # background222c"; # background + base01 = "#950fad"; # lighter background"#282a36"; # lighter background + base02 = "#3A3C4E"; # selection background + base03 = "#4D4F68"; # comments, invisibles, line highlighting + base04 = "#626483"; # dark foreground + base05 = "#E9E9F4"; # foreground + base06 = "#f8f8f2"; # light foreground + base07 = "#ffffff"; # lightest foreground + base08 = "#ff5555"; # red + base09 = "#f1fa8c"; # yellow + base0A = "#EBFF87"; # classes, markup, search text highlight + base0B = "#50fa7b"; # green + base0C = "#8be9fd"; # cyan + base0D = "#bd93f9"; # blue + base0E = "#ff79c6"; # purple + base0F = "#00F769"; # deprecated + base10 = "#1D1D26"; # darker background + base11 = "#1B1B23"; # darkest background + base12 = "#ff6e6e"; # bright red + base13 = "#ffffa5"; # bright yellow + base14 = "#69ff94"; # bright green + base15 = "#a4ffff"; # bright cyan + base16 = "#d6acff"; # bright blue + base17 = "#ff92df"; # bright purple }; }; diff --git a/modules/automapaper/default.nix b/modules/automapaper/default.nix index 85ad53a..b851afe 100644 --- a/modules/automapaper/default.nix +++ b/modules/automapaper/default.nix @@ -149,8 +149,8 @@ in in highp vec2 texCoords; out vec4 stateColor; - const vec4 bgColor = ${nix-colors.lib.conversions.hexToGLSLVec "26052e"}; // #26052e - const vec4 fgColor = ${nix-colors.lib.conversions.hexToGLSLVec "950fad"}; // #950fad + const vec4 bgColor = ${nix-colors.lib.conversions.hexToGLSLVec config.colorScheme.palette.base00}; // #26052e + const vec4 fgColor = ${nix-colors.lib.conversions.hexToGLSLVec config.colorScheme.palette.base01}; // #950fad void main() { vec2 canvasSize = vec2(textureSize(tex2D, 0)); diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 44fce76..e95249a 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -91,8 +91,8 @@ in gaps_in = "2"; gaps_out = "3"; border_size = "3"; - "col.active_border" = "0xff950fad"; - "col.inactive_border" = "0xff26052e"; + "col.active_border" = "0xff${config.colorScheme.palette.base01}"; + "col.inactive_border" = "0xff${config.colorScheme.palette.base01}"; }; misc = { key_press_enables_dpms = true; diff --git a/modules/waybar/default.nix b/modules/waybar/default.nix index 2c30d83..d2950e0 100644 --- a/modules/waybar/default.nix +++ b/modules/waybar/default.nix @@ -37,6 +37,7 @@ in ./workspaces.nix ./temperature.nix ./wireplumber.nix + ../../common/colors.nix ]; config = lib.mkIf cfg.enable { @@ -74,7 +75,7 @@ in window#waybar { background-color: transparent; border-radius: 999px; - color: #${config.colorScheme.palette.text}; + color: #${config.colorScheme.palette.base05}; transition-property: background-color; transition-duration: .5s; } @@ -111,22 +112,21 @@ in min-width: 15px; min-height: 15px; background-color: transparent; - color: #${config.colorScheme.palette.textMuted}; + color: #${config.colorScheme.palette.base04}; border-radius: 999px; } #workspaces button:hover { - background-color: #${config.colorScheme.palette.highlight}; + background-color: #${config.colorScheme.palette.base17}; } #workspaces button.active { - color: #${config.colorScheme.palette.text}; font-weight: bold; - background-color: #${config.colorScheme.palette.highlight}; + background-color: #${config.colorScheme.palette.base0E}; } #workspaces button.urgent { - background-color: #${config.colorScheme.palette.danger}; + background-color: #${config.colorScheme.palette.base08}; } #clock, @@ -148,12 +148,12 @@ in #custom-updates, #custom-poweroff, #mpd { - color: #${config.colorScheme.palette.textMuted}; + color: #${config.colorScheme.palette.base04}; margin: 0px 2px; padding: 0 15px; border-radius: 999px; - box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.backgroundMuted}; + box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01}; } .modules-right > widget:last-child > #battery { @@ -163,19 +163,19 @@ in #tray { padding: 4px 10px; border-radius: 999px 999px 999px 999px; - box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.backgroundMuted}; + box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.base01}; } #window { margin-left: 6px; - color: #${config.colorScheme.palette.textMuted}; + color: #${config.colorScheme.palette.base04}; } #workspaces { margin: 0 4px; padding: 4px 4px; border-radius: 999px; - box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.backgroundMuted}; + box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.base01}; } #cpu { @@ -187,8 +187,8 @@ in border-radius: 0px; padding: 0 10px; margin: 0px; - box-shadow: inset 0px 2px 0 -1px #${config.colorScheme.palette.backgroundMuted}, - inset 0px -2px 0 -1px #${config.colorScheme.palette.backgroundMuted}; + box-shadow: inset 0px 2px 0 -1px #${config.colorScheme.palette.base01}, + inset 0px -2px 0 -1px #${config.colorScheme.palette.base01}; } #clock { @@ -199,13 +199,13 @@ in #battery { min-width: 50px; border-radius: 999px; - box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.backgroundMuted}; - background-color: #${config.colorScheme.palette.backgroundMuted}; + box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01}; + background-color: #${config.colorScheme.palette.base01}; transition: all 0.3s; } #battery.charging, #battery.plugged { - color: #${config.colorScheme.palette.succes}; + color: #${config.colorScheme.palette.base0B}; background-color: transparent; animation: batteryCharging 1.2s linear 0s infinite normal forwards, } @@ -213,7 +213,7 @@ in animation: batteryFull 7.0s linear 0s infinite normal forwards; } #battery.critical:not(.charging) { - background-color: #${config.colorScheme.palette.background}; + background-color: #${config.colorScheme.palette.base00}; animation: batteryCritical 1.2s linear 0s infinite normal forwards; } @@ -224,11 +224,11 @@ in #network.disconnected, #pulseaudio.muted { transition: all 0.2s; - color: #${config.colorScheme.palette.backgroundMuted}; + color: #${config.colorScheme.palette.base01}; } .custom-spotify { - color: #${config.colorScheme.palette.spotifyGreen}; + color: #${config.colorScheme.palette.base14}; margin-right: 10px; } @@ -239,7 +239,7 @@ in #temperature.critical { background-color: transparent; - color: #${config.colorScheme.palette.danger}; + color: #${config.colorScheme.palette.base08}; } #tray { @@ -252,7 +252,7 @@ in } #tray > .needs-attention { - background-color: #${config.colorScheme.palette.danger}; + background-color: #${config.colorScheme.palette.base08}; border-radius: 999px; } @@ -263,107 +263,16 @@ in background-color: transparent; } - #custom-updates { - box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.backgroundMuted}; - color: #${config.colorScheme.palette.textMuted}; - transition: all 0.5s; - } - - #custom-updates.pending { - box-shadow: inset 0 0 0 2px #${config.colorScheme.palette.highlight}; - color: #${config.colorScheme.palette.highlight}; - font-weight: bold; - transition: all 0.5s; - } - tooltip { - background-color: #${config.colorScheme.palette.background}; + background-color: #${config.colorScheme.palette.base00}; border: 1px solid; - border-color: #${config.colorScheme.palette.border}; + border-color: #${config.colorScheme.palette.base04}; border-radius: 10px; - color: #${config.colorScheme.palette.text}; + color: #${config.colorScheme.palette.base05}; } tooltip label { padding: 5px; } - - /* Keyframes ---------------------------------------------------------------- */ - - @keyframes batteryCritical { - 0% { - box-shadow: inset 0px 20px 8px -16px #${config.colorScheme.palette.danger}, - inset 0px -20px 8px -16px #${config.colorScheme.palette.danger}; - color: #${config.colorScheme.palette.danger}; - } - 50% { - box-shadow: inset 0px 12px 8px -16px #${config.colorScheme.palette.danger}, - inset 0px -12px 8px -16px #${config.colorScheme.palette.danger}; - color: #${config.colorScheme.palette.textMuted}; - } - 100% { - box-shadow: inset 0px 20px 8px -16px #${config.colorScheme.palette.danger}, - inset 0px -20px 8px -16px #${config.colorScheme.palette.danger}; - color: #${config.colorScheme.palette.danger}; - } - } - - @keyframes batteryCharging { - 0% { - box-shadow: inset 0px 0px 8px 0px #${config.colorScheme.palette.info}, - inset 0px 20px 8px -18px #${config.colorScheme.palette.ok}, - inset 0px -20px 8px -18px #${config.colorScheme.palette.ok}; - } - 25% { - box-shadow: inset 0px 0px 8px 0px #${config.colorScheme.palette.info}, - inset 14px 14px 8px -18px #${config.colorScheme.palette.ok}, - inset -14px -14px 8px -18px #${config.colorScheme.palette.ok}; - } - 50% { - box-shadow: inset 0px 0px 8px 0px #${config.colorScheme.palette.info}, - inset 20px 0px 8px -18px #${config.colorScheme.palette.ok}, - inset -20px 0px 8px -18px #${config.colorScheme.palette.ok}; - } - 75% { - box-shadow: inset 0px 0px 8px 0px #${config.colorScheme.palette.info}, - inset 14px -14px 8px -18px #${config.colorScheme.palette.ok}, - inset -14px 14px 8px -18px #${config.colorScheme.palette.ok}; - } - 100% { - box-shadow: inset 0px 0px 8px 0px #${config.colorScheme.palette.info}, - inset 0px -20px 8px -18px #${config.colorScheme.palette.ok}, - inset 0px 20px 8px -18px #${config.colorScheme.palette.ok}; - } - } - - - - @keyframes batteryFull { - 0% { - box-shadow: inset 0px 20px 8px -16px #${config.colorScheme.palette.warn}, - inset 0px -20px 8px -16px #${config.colorScheme.palette.warn}; - color: #${config.colorScheme.palette.warn}; - } - 25% { - box-shadow: inset 0px 19px 8px -16px #${config.colorScheme.palette.warn}, - inset 0px -19px 8px -16px #${config.colorScheme.palette.warn}; - color: #${config.colorScheme.palette.warn}; - } - 50% { - box-shadow: inset 0px 15px 8px -16px #${config.colorScheme.palette.warn}, - inset 0px -15px 8px -16px #${config.colorScheme.palette.warn}; - color: #${config.colorScheme.palette.warn}; - } - 75% { - box-shadow: inset 0px 19px 8px -16px #${config.colorScheme.palette.warn}, - inset 0px -19px 8px -16px #${config.colorScheme.palette.warn}; - color: #${config.colorScheme.palette.warn}; - } - 100% { - box-shadow: inset 0px 20px 8px -16px #${config.colorScheme.palette.warn}, - inset 0px -20px 8px -16px #${config.colorScheme.palette.warn}; - color: #${config.colorScheme.palette.warn}; - } - } ''; }; }; diff --git a/modules/wofi.nix b/modules/wofi.nix index 160dbc1..df337a9 100644 --- a/modules/wofi.nix +++ b/modules/wofi.nix @@ -12,113 +12,112 @@ in config = lib.mkIf cfg.enable { home.packages = with pkgs; [ (writeShellScriptBin "wofi-launch" '' - ${wofi}/bin/wofi --show drun - '') + ${wofi}/bin/wofi --show drun + '') (writeShellScriptBin "wofi-power" '' - lock="Lock" - poweroff="Poweroff" - reboot="Reboot" - sleep="Suspend" - - selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$poweroff" | wofi --dmenu -i -p "Powermenu") + lock="Lock" + poweroff="Poweroff" + reboot="Reboot" + sleep="Suspend" + selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$poweroff" | wofi --dmenu -i -p "Powermenu") - if [ "$selected_option" == "$lock" ] - then - echo "lock" - swaylock - elif [ "$selected_option" == "$poweroff" ] - then - echo "poweroff" - poweroff - elif [ "$selected_option" == "$reboot" ] - then - echo "reboot" - reboot - elif [ "$selected_option" == "$sleep" ] - then - echo "sleep" - suspend - else - echo "No match" - fi - '') + if [ "$selected_option" == "$lock" ] + then + echo "lock" + swaylock + elif [ "$selected_option" == "$poweroff" ] + then + echo "poweroff" + poweroff + elif [ "$selected_option" == "$reboot" ] + then + echo "reboot" + reboot + elif [ "$selected_option" == "$sleep" ] + then + echo "sleep" + suspend + else + echo "No match" + fi + '') ]; programs.wofi = { enable = true; settings = { }; style = '' - * { - outline: none; - outline-style: none; - } + * { + outline: none; + outline-style: none; + } - #window { - margin: 10px; - border: none; - background-color: #${config.colorScheme.palette.background}; - border-radius: 10px; - font-family: - JetBrains Mono NF, - monospace; - font-weight: bold; - font-size: 14px; - } + #window { + margin: 10px; + border: none; + background-color: #${config.colorScheme.palette.base01}; + border-radius: 10px; + font-family: + JetBrains Mono NF, + monospace; + font-weight: bold; + font-size: 14px; + } - #outer-box { - margin: 10px; - border: 2px #${config.colorScheme.palette.backgroundMuted}; - border-radius: 10px; - background-color: transparent; - } + #outer-box { + margin: 10px; + border: 2px #${config.colorScheme.palette.base00}; + border-radius: 10px; + background-color: transparent; + } - #input { - border: none; - border-radius: 10px; - margin-left: 2px; - color: #${config.colorScheme.palette.info}; - outline-style: none; - background-color: #${config.colorScheme.palette.background}; - } + #input { + border: none; + border-radius: 10px; + margin-left: 2px; + color: #${config.colorScheme.palette.base05}; + outline-style: none; + background-color: #${config.colorScheme.palette.base03}; + } - #scroll { - border: 10px solid #${config.colorScheme.palette.border}; - border-radius: 10px; - /*padding-right: 10px;*/ - outline: none; - background-color: #${config.colorScheme.palette.background}; - } + #scroll { + border: 5px solid #${config.colorScheme.palette.base02}; + border-radius: 10px; + /*padding-right: 10px;*/ + outline: none; + background-color: #${config.colorScheme.palette.base00}; + } - #inner-box { - border: none; - border-radius: 10px; - background-color: transparent; - } + #inner-box { + border: none; + border-radius: 10px; + background-color: transparent; + } - #entry { - border: none; - /*border-radius: 10px; - margin-right: 15px; - margin-left: 15px;*/ - padding-right: 10px; - padding-left: 10px; - color: #${config.colorScheme.palette.text}; - background-color: #${config.colorScheme.palette.background}; - } - #entry:selected { - border: none; - background-color: #${config.colorScheme.palette.info}; - } + #entry { + border: none; + border-radius: 10px; + margin-right: 15px; + margin-left: 15px; + padding-right: 10px; + padding-left: 10px; + color: #${config.colorScheme.palette.base05}; + background-color: #${config.colorScheme.palette.base00}; + } + #entry:selected { + border: none; + background-color: #${config.colorScheme.palette.base02}; + } - #text:selected { - border: none; - color: #${config.colorScheme.palette.textMuted}; - } + #text:selected { + border: none; + color: #${config.colorScheme.palette.base05}; + } - #img { - background-color: transparent; - margin-right: 6px; - } - ''; + #img { + background-color: transparent; + margin-right: 6px; + } + ''; }; }; } diff --git a/styles/waybar.css b/styles/waybar.css deleted file mode 100644 index 9f5b63c..0000000 --- a/styles/waybar.css +++ /dev/null @@ -1,292 +0,0 @@ -* { - /* `otf-font-awesome` is required to be installed for icons */ - font-family: "Maple Mono NF"; - font-size: 13px; -} - -window#waybar { - background-color: transparent; - border-bottom: none; - color: #ffffff; - transition-property: background-color; - transition-duration: .5s; -} -window#waybar.hidden { - opacity: 0.2; -} - -window#waybar.termite { - background-color: #3F3F3F; -} - -window#waybar.chromium { - background-color: #000000; - border: none; -} - -button { - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -1px transparent; - /* Avoid rounded borders under each button name */ - border: none; - border-radius: 0; -} - -/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ -button:hover { - background: inherit; - box-shadow: inset 0 -1px #ffffff; -} - -#workspaces button { - padding: 0 5px; - background-color: transparent; - color: #ffffff; -} - -#workspaces button:hover { - background: #1f2430; -} - -#workspaces button.active { - color: #80BFFF; - box-shadow: inset 0 -1px #80BFFF; -} - -#workspaces button.urgent { - background-color: #eb4d4b; -} - -#mode { - background-color: #64727D; - border-bottom: 3px solid #ffffff; -} - -#clock, -#battery, -#cpu, -#memory, -#disk, -#temperature, -#backlight, -#network, -#pulseaudio, -#wireplumber, -#custom-media, -#tray, -#mode, -#idle_inhibitor, -#scratchpad, -#mpd { - padding: 0 10px; -} - -#window, -#workspaces { - margin: 0 4px; -} - -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0; -} - -/* If workspaces is the rightmost module, omit right margin */ -.modules-right > widget:last-child > #workspaces { - margin-right: 0; -} - -#clock { - color: #ffffff; -} -#clock > tooltip { - background-color: #ffffff; - color: #ffffff; -} - -#battery { - background-color: #ffffff; - color: #000000; -} - -#battery.charging, #battery.plugged { - color: #ffffff; - background-color: #26A65B; -} - -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } -} - -#battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -label:focus { - background-color: #000000; -} - -#cpu { - background-color: transparent; - color: #87D96C; -} - -#memory { - background-color: transparent; - color: #DFBFFF; -} - -#disk { - background-color: transparent; - color: #FFAD66; -} - -#backlight { - background-color: #90b1b1; -} - -#network { - background-color: transparent; - color: #80BFFF; -} - -#network.disconnected { - background-color: #f53c3c; -} - -#pulseaudio { - background-color: transparent; - color: #F29E74; -} - -#pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; -} - -#wireplumber { - background-color: #fff0f5; - color: #000000; -} - -#wireplumber.muted { - background-color: #f53c3c; -} - -#custom-pronouns { - background-color: #660000; - transition: all 0.2s ease-in-out; - padding: 0 5px; - margin: 0 5px; - border-radius:999px; -} - -#custom-poweroff { - background-color: #343946; - border-radius: 999px; - padding: 0px 5px; - margin: 5px 5px 5px 0px; - transition: all 0.2s ease-in-out; -} -#custom-poweroff:hover { - background-color: #f53c3c; -} - - -.custom-spotify { - color: #87D96C; -} - -#custom-media.custom-vlc { - background-color: #ffa000; -} - -#temperature { - background-color: transparent; - color: #ffcc66; -} - -#temperature.critical { - background-color: transparent; - color: #eb4d4b; -} - -#tray { - background-color: #1f2430; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - -} - -#idle_inhibitor { - background-color: #2d3436; -} - -#idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; -} - -#mpd { - background-color: #66cc99; - color: #2a5c45; -} - -#mpd.disconnected { - background-color: #f53c3c; -} - -#mpd.stopped { - background-color: #90b1b1; -} - -#mpd.paused { - background-color: #51a37a; -} - -#language { - background: #00b093; - color: #740864; - padding: 0 5px; - margin: 0 5px; - min-width: 16px; -} - -#keyboard-state { - background: #97e1ad; - color: #000000; - padding: 0 0px; - margin: 0 5px; - min-width: 16px; -} - -#keyboard-state > label { - padding: 0 5px; -} - -#keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); -} - -#scratchpad { - background: rgba(0, 0, 0, 0.2); -} - -#scratchpad.empty { - background-color: transparent; -}