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_out = 18
border_size = 2
col.active_border = $lavender $red 15deg
col.inactive_border = $yellow $sapphire 15deg
col.active_border = $base $surface0 $red 45deg
col.inactive_border = $base $surface0 $yellow 45deg
layout = dwindle
}

View file

@ -1,45 +1,135 @@
{ pkgs, ... }:
{ ... }:
{
programs.waybar = {
enable = true;
package = (pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
})
);
settings = {
mainBar = {
layer = "top";
position = "top";
margin = "10px 10px 0";
height = 30;
modules-left = [
"hyprland/submap"
"hyprland/workspaces"
"custom/arrow10"
"hyprland/window"
];
modules-center = [
"clock"
];
modules-right = [
"custom/arrow9"
"pulseaudio"
"custom/arrow8"
"network"
"custom/arrow7"
"memory"
"custom/arrow6"
"cpu"
"custom/arrow5"
"temperature"
"custom/arrow4"
"battery"
"custom/arrow3"
"hyprland/language"
"custom/arrow2"
"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
battery = {
interval = 10;
@ -64,159 +154,24 @@
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" = {
format = " {}";
min-length = 5;
#"on-click" = "swaymsg 'input * xkb_switch_layout next'";
tooltip = false;
};
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 = [
""
""
""
""
""
];
format = " {}";
format-en = "EN/US";
format-pt-br = "PT/BR";
#"on-click" = "hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next";
tooltip = false;
};
tray = {
icon-size = 18;
#"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;
spacing = 10;
};
};
};
style = ''
/* Using https://github.com/catppuccin/catppuccin for color reference. */
/* Keyframes */
@keyframes blink-critical {
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;
border-radius: 0;
min-height: 0;
margin: 0;
padding: 0;
box-shadow: none;
text-shadow: none;
icon-shadow: none;
all: unset;
color: #c6d0f5;
font-family: "FantasqueSansM Nerd Font", 'Courier New', Courier, monospace;
font-size: 16px;
}
/* The whole bar */
#waybar {
background: rgba(40, 40, 40, 0.8784313725); /* #282828e0 */
color: @white;
font-family: JetBrains Mono, Siji;
font-size: 10pt;
/*font-weight: bold;*/
.modules-left,
.modules-right,
.modules-center {
padding: 0 20px;
border-radius: 10px;
background-color: rgba(48, 52, 70, 0.85);
}
/* Each module */
#battery,
#clock,
#cpu,
#language,
#memory,
#mode,
#network,
#pulseaudio,
#temperature,
#tray,
#backlight,
#idle_inhibitor,
#disk,
#user,
#mpris {
padding-left: 8pt;
padding-right: 8pt;
tooltip {
background-color: rgba(48, 52, 70, 0.85);
border-radius: 10px;
padding: 8px;
}
/* Each critical module */
#mode,
#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;
tooltip label {
color: #c6d0f5;
}
/* Each warning */
#network.disconnected,
#memory.warning,
#cpu.warning,
#temperature.warning,
#battery.warning.discharging {
color: @warning;
#workspaces {
margin-left: -5px;
padding-left: 0px;
}
/* And now modules themselves in their respective order */
/* Current sway mode (resize etc) */
#mode {
color: @white;
background: @mode;
}
/* Workspaces stuff */
#workspaces button {
/*font-weight: bold;*/
padding-left: 2pt;
padding-right: 2pt;
color: @white;
background: @unfocused;
margin: 0 8px;
}
/* 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 {
background: @black;
color: @white;
background: #414559;
border: none;
}
#window {
margin-right: 35pt;
margin-left: 35pt;
#clock {
padding: 0 10px;
}
#pulseaudio {
background: @sound;
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;
#network, #cpu, #memory, #language, #temperature, #pulseaudio {
margin: 0 8px;
}
#tray {
background: @date;
margin-left: 8px;
}
#clock.date {
background: @date;
color: @white;
}
#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;
#tray menu {
background-color: rgba(48, 52, 70, 0.85);
border-radius: 10px;
padding: 8px;
}
'';
};

View file

@ -9,10 +9,10 @@ waybar &
## Start wallpaper daemon and set one.
#
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"
IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-3zjexv.jpg"
IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-g7ze63.jpg"
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;

View file

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