diff --git a/homes/x86_64-linux/julian@aspi/default.nix b/homes/x86_64-linux/julian@aspi/default.nix index a82e4db..5502da8 100644 --- a/homes/x86_64-linux/julian@aspi/default.nix +++ b/homes/x86_64-linux/julian@aspi/default.nix @@ -81,18 +81,25 @@ zotero xfce.mousepad tor-browser + wl-clipboard ## My scripts pkgs.frajul.deploy-to-pianopi pkgs.frajul.edit-config pkgs.frajul.open-messaging - pkgs.frajul.pulseaudio-popup ] ++ lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; }) [ ./fonts.nix ./packages.nix ]; + services.gammastep = { + enable = true; + latitude = 47.92; + longitude = 10.12; + provider = "manual"; + }; + # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index 4771273..7dce78c 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -40,8 +40,11 @@ in # hyprpicker # TODO # hyprcursor # TODO brightnessctl + grimblast ]; + services.copyq.enable = true; + programs.hyprlock.enable = true; programs.hyprlock.settings = { general = { @@ -179,6 +182,8 @@ in ]; # Environment Variables + ### + env = "XDG_CURRENT_DESKTOP,Hyprland"; # env = "XCURSOR_SIZE,24"; # env = "HYPRCURSOR_SIZE,24"; @@ -202,6 +207,15 @@ in layout = "master"; }; + decoration = { + # power saving + # blur = { + # enable = false; + # }; + # power saving + drop_shadow = false; + }; + # Dwindle layout dwindle = { pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below @@ -223,6 +237,7 @@ in # we do, in fact, want direct scanout # no_direct_scanout = false; + vfr = true; # power saving }; # Input diff --git a/modules/home/hyprland/style.css b/modules/home/hyprland/style.css index eaa2e87..3c695d5 100644 --- a/modules/home/hyprland/style.css +++ b/modules/home/hyprland/style.css @@ -1,189 +1,300 @@ + +@keyframes blink-warning { + 70% { + color: @light; + } + + to { + color: @light; + background-color: @warning; + } +} + +@keyframes blink-critical { + 70% { + color: @light; + } + + to { + color: @light; + background-color: @critical; + } +} + + +/* ----------------------------------------------------------------------------- + * Styles + * -------------------------------------------------------------------------- */ + +/* COLORS */ + +/* Nord */ +@define-color bg #2E3440; +/*@define-color bg #353C4A;*/ +@define-color light #D8DEE9; +/*@define-color dark @nord_dark_font;*/ +@define-color warning #ebcb8b; +@define-color critical #BF616A; +@define-color mode #434C5E; +/*@define-color workspaces @bg;*/ +/*@define-color workspaces @nord_dark_font;*/ +/*@define-color workspacesfocused #434C5E;*/ +@define-color workspacesfocused #4C566A; +@define-color tray @workspacesfocused; +@define-color sound #EBCB8B; +@define-color network #5D7096; +@define-color memory #546484; +@define-color cpu #596A8D; +@define-color temp #4D5C78; +@define-color layout #5e81ac; +@define-color battery #88c0d0; +@define-color date #434C5E; +@define-color time #434C5E; +@define-color backlight #434C5E; +@define-color nord_bg #434C5E; +@define-color nord_bg_blue #546484; +@define-color nord_light #D8DEE9; +@define-color nord_light_font #D8DEE9; +@define-color nord_dark_font #434C5E; + +/* Reset all styles */ * { - /* `otf-font-awesome` is required to be installed for icons */ - font-family: "Noto Sans CJK KR Regular"; - font-size: 16px; - min-height: 0; + border: none; + border-radius: 3px; + min-height: 0; + margin: 0.1em 0.2em 0.1em 0.2em; } -window#waybar { - background: transparent; - /* background-color: rgba(43, 48, 59, 0.5); */ - /* border-bottom: 3px solid rgba(100, 114, 125, 0.5); */ - color: #ffffff; - transition-property: background-color; - transition-duration: .5s; +/* The whole bar */ +#waybar { + background: @bg; + color: @light; + font-family: "Cantarell", "Font Awesome 5 Pro"; + font-size: 13px; + font-weight: bold; } -window#waybar.hidden { - opacity: 0.2; +/* Each module */ +#battery, +#clock, +#cpu, +#custom-layout, +#memory, +#mode, +#network, +#pulseaudio, +#temperature, +#custom-alsa, +#custom-pacman, +#custom-weather, +#custom-gpu, +#tray, +#backlight, +#language, +#custom-cpugovernor { + padding-left: 0.6em; + padding-right: 0.6em; } -#waybar.empty #window { - background-color: transparent; +/* Each module that should blink */ +#mode, +#memory, +#temperature, +#battery { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; } +/* Each critical module */ +#memory.critical, +#cpu.critical, +#temperature.critical, +#battery.critical { + color: @critical; +} + +/* Each critical that should blink */ +#mode, +#memory.critical, +#temperature.critical, +#battery.critical.discharging { + animation-name: blink-critical; + animation-duration: 2s; +} + +/* Each warning */ +#network.disconnected, +#memory.warning, +#cpu.warning, +#temperature.warning, +#battery.warning { + background: @warning; + color: @nord_dark_font; +} + +/* Each warning that should blink */ +#battery.warning.discharging { + animation-name: blink-warning; + animation-duration: 3s; +} + +/* And now modules themselves in their respective order */ + +#mode { /* Shown current Sway mode (resize etc.) */ + color: @light; + background: @mode; +} + +/* Workspaces stuff */ + #workspaces { -} - -#window { - margin: 2; - padding-left: 8; - padding-right: 8; - background-color: rgba(0,0,0,0.6); - font-size:14px; - font-weight: bold; -} - -button { - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -3px 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; - border-top: 2px solid #c9545d; + /* color: #D8DEE9; */ + /* margin-right: 10px; */ } #workspaces button { - padding: 0 4px; -/* background-color: rgba(0,0,0,0.6); */ + font-weight: bold; /* Somewhy the bar-wide setting is ignored*/ + padding: 0; + /* color: #999; */ + opacity: 1.0; + background: @mode; + font-size: 1em; } -#workspaces button:hover { -} - -#workspaces button.focused { - background-color: #ecf0f1; - color: #2d3436; - /* box-shadow: inset 0 -2px #c9545d; */ - border-top: 2px solid #c9545d; +#workspaces button.visible { + background: @memory; + color: #D8DEE9; + opacity: 1; + padding: 0 0.4em; } #workspaces button.urgent { - background-color: #eb4d4b; + border-color: #c9545d; + color: #c9545d; + opacity: 1; } -#mode { - background-color: #64727D; - border-bottom: 3px solid #ffffff; +#window { + margin-right: 40px; + margin-left: 40px; + font-weight: normal; +} +#bluetooth { + background: @nord_bg_blue; + font-size: 1.2em; + font-weight: bold; + padding: 0 0.6em; +} +#custom-gpu { + background: @nord_bg; + font-weight: bold; + padding: 0 0.6em; +} +#custom-weather { + background: @mode; + font-weight: bold; + padding: 0 0.6em; +} +#custom-pacman { + background: @nord_light; + color: @nord_dark_font; + font-weight: bold; + padding: 0 0.6em; +} +#custom-scratchpad-indicator { + background: @nord_light; + color: @nord_dark_font; + font-weight: bold; + padding: 0 0.6em; +} +#idle_inhibitor { + background: @memory; + /*font-size: 1.6em;*/ + font-weight: bold; + padding: 0 0.6em; +} +#custom-alsa { + background: @sound; } -#clock, -#battery, -#cpu, -#memory, -#disk, -#temperature, -#backlight, -#network, -#pulseaudio, -#wireplumber, -#custom-media, -#tray, -#mode, -#idle_inhibitor, -#scratchpad, -#mpd { - margin: 2px; - padding-left: 4px; - padding-right: 4px; - background-color: rgba(0,0,0,0.6); - color: #ffffff; +#network { + background: @nord_bg_blue; } -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0; +#memory { + background: @memory; } -/* If workspaces is the rightmost module, omit right margin */ -.modules-right > widget:last-child > #workspaces { - margin-right: 0; +#disk { + background: @memory; +} + +#cpu { + background: @memory; + color: #D8DEE9; +} +#cpu.critical { + color: @nord_dark_font; +} +#language { + background: @nord_bg_blue; + color: #D8DEE9; + padding: 0 0.4em; +} +#custom-cpugovernor { + background-color: @nord_light; + color: @nord_dark_font; +} +#custom-cpugovernor.perf { + +} +#temperature { + background-color: @nord_bg; + color: #D8DEE9; +} +#temperature.critical { + background: @critical; +} +#custom-layout { + background: @layout; +} + +#battery { + background: @battery; +} + +#backlight { + background: @backlight; } #clock { - font-size:14px; - font-weight: bold; + background: @nord_bg_blue; + color: #D8DEE9; +} +#clock.date { + background: @date; } -#battery icon { - color: red; +#clock.time { + background: @mode; } -#battery.charging, #battery.plugged { - color: #ffffff; - /* background-color: #26A65B; */ +#pulseaudio { /* Unsused but kept for those who needs it */ + background: @nord_bg_blue; + color: #D8DEE9; } -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } +#pulseaudio.muted { + background: #BF616A; + color: #BF616A; + /* No styles */ } - -#battery.warning: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; +#pulseaudio.source-muted { + background: #D08770; + color: #D8DEE9; + /* No styles */ } - -#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; +#tray { + background: #434C5E; } - -label:focus { - background-color: #000000; -} - -#network.disconnected { - background-color: #f53c3c; -} - -#temperature.critical { - background-color: #eb4d4b; -} - -#idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; -} - -/* - -window#waybar.solo { -background-color: #FFFFFF; -} - -window#waybar.termite { -background-color: #3F3F3F; -} - -window#waybar.chromium { -background-color: #000000; -border: none; -} - */ diff --git a/modules/home/hyprland/waybar-config.json b/modules/home/hyprland/waybar-config.json index 5216aa1..2fde264 100644 --- a/modules/home/hyprland/waybar-config.json +++ b/modules/home/hyprland/waybar-config.json @@ -1,16 +1,22 @@ { "position": "bottom", - "height": 35, + "height": 10, "modules-left": ["hyprland/workspaces"], - "modules-right": ["idle_inhibitor", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"], + "modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"], "idle_inhibitor": { "format": "{icon}", "format-icons": { - "activated": "", - "deactivated": "" + "activated": " ", + "deactivated": " " } }, + "disk": { + "interval": 30, + "format": "free: {percentage_free}% ({free})", + "path": "/", + "unit": "GB" + }, "tray": { "spacing": 10 }, @@ -34,7 +40,7 @@ "format": "{icon} {capacity}% ({time})", "format-charging": " {capacity}% ({time})", "format-plugged": " {capacity}% ({time})", - "format-full": "{icon}", + "format-full": "{icon} ", "format-icons": ["", "", "", "", ""] }, "pulseaudio": { diff --git a/packages/pulseaudio-popup/default.nix b/packages/pulseaudio-popup/default.nix index 6c058d1..3e3508f 100644 --- a/packages/pulseaudio-popup/default.nix +++ b/packages/pulseaudio-popup/default.nix @@ -18,6 +18,7 @@ pkgs.writeShellApplication { runtimeInputs = with pkgs; [ pavucontrol jgmenu + pulseaudio ]; text = '' diff --git a/systems/x86_64-linux/aspi/default.nix b/systems/x86_64-linux/aspi/default.nix index 227d8cb..3562648 100644 --- a/systems/x86_64-linux/aspi/default.nix +++ b/systems/x86_64-linux/aspi/default.nix @@ -243,7 +243,8 @@ # }; # }; - services.redshift.enable = true; + # x11 only, for wayland use gammastep (home-manager) + # services.redshift.enable = true; services.flatpak.enable = true; @@ -267,6 +268,7 @@ mc xorg.xhost kdePackages.qtwayland + frajul.pulseaudio-popup ]; virtualisation.docker.enable = true;