feat: change desktop theming

This commit is contained in:
Alexandre Cavalheiro 2024-03-15 23:39:44 -03:00
parent 6784de8ef7
commit 3ea5c64fa3
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
4 changed files with 155 additions and 399 deletions

View file

@ -120,8 +120,8 @@
gaps_in = 6 gaps_in = 6
gaps_out = 18 gaps_out = 18
border_size = 2 border_size = 2
col.active_border = $lavender $red 15deg col.active_border = $base $surface0 $red 45deg
col.inactive_border = $yellow $sapphire 15deg col.inactive_border = $base $surface0 $yellow 45deg
layout = dwindle layout = dwindle
} }

View file

@ -1,45 +1,135 @@
{ pkgs, ... }: { ... }:
{ {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = (pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
})
);
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
position = "top"; margin = "10px 10px 0";
height = 30;
modules-left = [ modules-left = [
"hyprland/submap"
"hyprland/workspaces" "hyprland/workspaces"
"custom/arrow10" ];
"hyprland/window" modules-center = [
"clock"
]; ];
modules-right = [ modules-right = [
"custom/arrow9"
"pulseaudio" "pulseaudio"
"custom/arrow8"
"network" "network"
"custom/arrow7"
"memory" "memory"
"custom/arrow6"
"cpu" "cpu"
"custom/arrow5"
"temperature" "temperature"
"custom/arrow4"
"battery" "battery"
"custom/arrow3"
"hyprland/language" "hyprland/language"
"custom/arrow2"
"tray" "tray"
"clock#date"
"custom/arrow1"
"clock#time"
]; ];
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
active = "";
default = "";
empty = "";
persistent = "";
special = "";
urgent = "";
};
};
clock = {
format = "{:%H:%M} ";
format-alt = "{:%A; %B %d, %Y (%R)} ";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#e5c890'><b>{}</b></span>";
days = "<span color='#c6d0f5'><b>{}</b></span>";
weeks = "<span color='#81c8be'><b>W{}</b></span>";
weekdays = "<span color='#ef9f76'><b>{}</b></span>";
today = "<span color='#a6d189'><b><u>{}</u></b></span>";
};
actions = {
on-click-backward = "tz_down";
on-click-forward = "tz_up";
on-click-right = "mode";
on-scroll-down = "shift_down";
on-scroll-up = "shift_up";
};
};
};
pulseaudio = {
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [
""
""
];
};
scroll-step = 1;
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
tooltip = false;
};
network = {
interval = 5;
format = " {bandwidthUpBits} 󰇙 {bandwidthDownBits} ";
format-disconnected = " No connection";
tooltip-format-wifi = " {essid} ({signalStrength}%)";
};
memory = {
interval = 5;
format = " {percentage}%";
states = {
warning = 70;
critical = 90;
};
"tooltip-format" = " {used:0.1f}G/{total:0.1f}G";
};
cpu = {
interval = 5;
tooltip = false;
format = " {usage}%";
format-alt = " {load}";
states = {
warning = 70;
critical = 90;
};
};
temperature = {
critical-threshold = 90;
interval = 5;
format = "{icon} {temperatureC}°";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
# Module configuration # Module configuration
battery = { battery = {
interval = 10; interval = 10;
@ -64,159 +154,24 @@
tooltip = false; tooltip = false;
}; };
"clock#time" = {
interval = 10;
format = "{:%H:%M}";
tooltip = false;
};
"clock#date" = {
interval = 20;
format = "{:%e %b %Y}";
tooltip = false;
#"tooltip-format" = "{:%e %B %Y}"
};
"cpu" = {
interval = 5;
tooltip = false;
format = " {usage}%";
format-alt = " {load}";
states = {
warning = 70;
critical = 90;
};
};
"hyprland/language" = { "hyprland/language" = {
format = " {}"; format = " {}";
min-length = 5; format-en = "EN/US";
#"on-click" = "swaymsg 'input * xkb_switch_layout next'"; format-pt-br = "PT/BR";
tooltip = false; #"on-click" = "hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next";
};
memory = {
interval = 5;
format = "🧠 {used:0.1f}G/{total:0.1f}G";
states = {
"warning" = 70;
"critical" = 90;
};
tooltip = false;
};
network = {
interval = 5;
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = " {ifname}";
format-disconnected = "No connection";
format-alt = " {ipaddr}/{cidr}";
tooltip = false;
};
"hyprland/submap" = {
format = "{}";
tooltip = false;
};
"hyprland/window" = {
format = "{}";
max-length = 30;
tooltip = false;
};
pulseaudio = {
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [
""
""
];
};
scroll-step = 1;
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
tooltip = false;
};
temperature = {
critical-threshold = 90;
interval = 5;
format = "{icon} {temperatureC}°";
format-icons = [
""
""
""
""
""
];
tooltip = false; tooltip = false;
}; };
tray = { tray = {
icon-size = 18; icon-size = 18;
#"spacing" = 10 spacing = 10;
};
"custom/arrow1" = {
format = "";
tooltip = false;
};
"custom/arrow2" = {
format = "";
tooltip = false;
};
"custom/arrow3" = {
format = "";
tooltip = false;
};
"custom/arrow4" = {
format = "";
tooltip = false;
};
"custom/arrow5" = {
format = "";
tooltip = false;
};
"custom/arrow6" = {
format = "";
tooltip = false;
};
"custom/arrow7" = {
format = "";
tooltip = false;
};
"custom/arrow8" = {
format = "";
tooltip = false;
};
"custom/arrow9" = {
format = "";
tooltip = false;
};
"custom/arrow10" = {
format = "";
tooltip = false;
}; };
}; };
}; };
style = '' style = ''
/* Using https://github.com/catppuccin/catppuccin for color reference. */
/* Keyframes */ /* Keyframes */
@keyframes blink-critical { @keyframes blink-critical {
to { to {
@ -225,260 +180,61 @@
} }
} }
/* Styles */
/* Colors (gruvbox) */
@define-color black #282828;
@define-color red #cc241d;
@define-color green #98971a;
@define-color yellow #d79921;
@define-color blue #458588;
@define-color purple #b16286;
@define-color aqua #689d6a;
@define-color gray #a89984;
@define-color brgray #928374;
@define-color brred #fb4934;
@define-color brgreen #b8bb26;
@define-color bryellow #fabd2f;
@define-color brblue #83a598;
@define-color brpurple #d3869b;
@define-color braqua #8ec07c;
@define-color white #ebdbb2;
@define-color bg2 #504945;
@define-color warning @bryellow;
@define-color critical @red;
@define-color mode @black;
@define-color unfocused @bg2;
@define-color focused @braqua;
@define-color inactive @purple;
@define-color sound @brpurple;
@define-color network @purple;
@define-color memory @braqua;
@define-color cpu @green;
@define-color temp @brgreen;
@define-color layout @bryellow;
@define-color battery @aqua;
@define-color date @black;
@define-color time @white;
/* Reset all styles */
* { * {
border: none; all: unset;
border-radius: 0; color: #c6d0f5;
min-height: 0; font-family: "FantasqueSansM Nerd Font", 'Courier New', Courier, monospace;
margin: 0; font-size: 16px;
padding: 0;
box-shadow: none;
text-shadow: none;
icon-shadow: none;
} }
/* The whole bar */ .modules-left,
#waybar { .modules-right,
background: rgba(40, 40, 40, 0.8784313725); /* #282828e0 */ .modules-center {
color: @white; padding: 0 20px;
font-family: JetBrains Mono, Siji; border-radius: 10px;
font-size: 10pt; background-color: rgba(48, 52, 70, 0.85);
/*font-weight: bold;*/
} }
/* Each module */ tooltip {
#battery, background-color: rgba(48, 52, 70, 0.85);
#clock, border-radius: 10px;
#cpu, padding: 8px;
#language,
#memory,
#mode,
#network,
#pulseaudio,
#temperature,
#tray,
#backlight,
#idle_inhibitor,
#disk,
#user,
#mpris {
padding-left: 8pt;
padding-right: 8pt;
} }
/* Each critical module */ tooltip label {
#mode, color: #c6d0f5;
#memory.critical,
#cpu.critical,
#temperature.critical,
#battery.critical.discharging {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-name: blink-critical;
animation-duration: 1s;
} }
/* Each warning */ #workspaces {
#network.disconnected, margin-left: -5px;
#memory.warning, padding-left: 0px;
#cpu.warning,
#temperature.warning,
#battery.warning.discharging {
color: @warning;
} }
/* And now modules themselves in their respective order */
/* Current sway mode (resize etc) */
#mode {
color: @white;
background: @mode;
}
/* Workspaces stuff */
#workspaces button { #workspaces button {
/*font-weight: bold;*/ margin: 0 8px;
padding-left: 2pt;
padding-right: 2pt;
color: @white;
background: @unfocused;
} }
/* Inactive (on unfocused output) */
#workspaces button.visible {
color: @white;
background: @inactive;
}
/* Active (on focused output) */
#workspaces button.focused {
color: @black;
background: @focused;
}
/* Contains an urgent window */
#workspaces button.urgent {
color: @black;
background: @warning;
}
/* Style when cursor is on the button */
#workspaces button:hover { #workspaces button:hover {
background: @black; background: #414559;
color: @white; border: none;
} }
#window { #clock {
margin-right: 35pt; padding: 0 10px;
margin-left: 35pt;
} }
#pulseaudio { #network, #cpu, #memory, #language, #temperature, #pulseaudio {
background: @sound; margin: 0 8px;
color: @black;
}
#network {
background: @network;
color: @white;
}
#memory {
background: @memory;
color: @black;
}
#cpu {
background: @cpu;
color: @white;
}
#temperature {
background: @temp;
color: @black;
}
#language {
background: @layout;
color: @black;
}
#battery {
background: @battery;
color: @white;
} }
#tray { #tray {
background: @date; margin-left: 8px;
} }
#clock.date { #tray menu {
background: @date; background-color: rgba(48, 52, 70, 0.85);
color: @white; border-radius: 10px;
} padding: 8px;
#clock.time {
background: @time;
color: @black;
}
#custom-arrow1 {
font-size: 11pt;
color: @time;
background: @date;
}
#custom-arrow2 {
font-size: 11pt;
color: @date;
background: @layout;
}
#custom-arrow3 {
font-size: 11pt;
color: @layout;
background: @battery;
}
#custom-arrow4 {
font-size: 11pt;
color: @battery;
background: @temp;
}
#custom-arrow5 {
font-size: 11pt;
color: @temp;
background: @cpu;
}
#custom-arrow6 {
font-size: 11pt;
color: @cpu;
background: @memory;
}
#custom-arrow7 {
font-size: 11pt;
color: @memory;
background: @network;
}
#custom-arrow8 {
font-size: 11pt;
color: @network;
background: @sound;
}
#custom-arrow9 {
font-size: 11pt;
color: @sound;
background: transparent;
}
#custom-arrow10 {
font-size: 11pt;
color: @unfocused;
background: transparent;
} }
''; '';
}; };

View file

@ -9,10 +9,10 @@ waybar &
## Start wallpaper daemon and set one. ## Start wallpaper daemon and set one.
# #
OUTPUT_1="DP-2" OUTPUT_1="DP-2"
IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-g71xoe.jpg" IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-z8e3wo.png"
OUTPUT_2="DP-3" OUTPUT_2="DP-3"
IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-3zjexv.jpg" IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-g7ze63.jpg"
function load_wallpapers() { function load_wallpapers() {
swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1; swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1;

View file

@ -1,11 +1,11 @@
{ pkgs }: { pkgs }:
let let
imgLink = "https://w.wallhaven.cc/full/1p/wallhaven-1p398w.jpg"; imgLink = "https://w.wallhaven.cc/full/yj/wallhaven-yjq257.png";
image = pkgs.fetchurl { image = pkgs.fetchurl {
url = imgLink; url = imgLink;
sha256 = "5347bc5a114db8afe9d189682a75565e8d0bc46e003f714879d6957729224335"; sha256 = "sha256-lrQv8VAks86zMzRaF9VEZotp78O9M7/dV8jZNTRb6SY=";
}; };
in in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {