mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
feat: refactored home manager
This commit is contained in:
parent
65417d1809
commit
376c1d7b18
511 changed files with 1777 additions and 772 deletions
19
home/modules/gui/desktop/waybar/config/scripts/get_weather.sh
Executable file
19
home/modules/gui/desktop/waybar/config/scripts/get_weather.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
for i in {1..5}
|
||||
do
|
||||
text=$(curl -s "https://wttr.in/$1?format=1")
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
text=$(echo "$text" | sed -E "s/\s+/ /g")
|
||||
tooltip=$(curl -s "https://wttr.in/$1?format=4")
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
|
||||
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"
|
162
home/modules/gui/desktop/waybar/config/settings.nix
Executable file
162
home/modules/gui/desktop/waybar/config/settings.nix
Executable file
|
@ -0,0 +1,162 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
;
|
||||
in
|
||||
{
|
||||
mainBar = {
|
||||
position = "bottom";
|
||||
layer = "top";
|
||||
height = 5;
|
||||
margin-top = 0;
|
||||
margin-bottom = 5;
|
||||
margin-left = 5;
|
||||
margin-right = 5;
|
||||
modules-left = [
|
||||
"custom/launcher"
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
|
||||
modules-center = [
|
||||
"custom/weather"
|
||||
];
|
||||
|
||||
modules-right = [
|
||||
"tray"
|
||||
"privacy"
|
||||
"cpu"
|
||||
"memory"
|
||||
"disk"
|
||||
"pulseaudio"
|
||||
# "network"
|
||||
"clock"
|
||||
];
|
||||
|
||||
clock = {
|
||||
calendar = {
|
||||
format = {
|
||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
format = " {:%H:%M}";
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt = " {:%d/%m}";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
disable-scroll = true;
|
||||
format = "{icon}";
|
||||
on-click = "activate";
|
||||
format-icons = {
|
||||
"1" = "◉";
|
||||
"2" = "◉";
|
||||
"3" = "◉";
|
||||
"4" = "◉";
|
||||
urgent = "";
|
||||
default = "";
|
||||
sort-by-number = true;
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = " {}%";
|
||||
format-alt = " {used} GiB"; #
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
format-alt = " {avg_frequency} GHz";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
disk = {
|
||||
# path = "/";
|
||||
format = " {percentage_used}%";
|
||||
interval = 60;
|
||||
};
|
||||
|
||||
# network = {
|
||||
# format-wifi = " {signalStrength}%";
|
||||
# format-ethernet = " ";
|
||||
# tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
# format-linked = "{ifname} (No IP)";
|
||||
# format-disconnected = " ";
|
||||
# };
|
||||
|
||||
tray = {
|
||||
icon-size = 12;
|
||||
spacing = 8;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
tooltip = false;
|
||||
format-muted = " Muted";
|
||||
on-click = "easyeffects";
|
||||
on-scroll-up = "amixer sset Master 5%+";
|
||||
on-scroll-down = "amixer sset Master 5%-";
|
||||
scroll-step = 5;
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
};
|
||||
"custom/launcher" = {
|
||||
format = "";
|
||||
on-click = "rm -r /home/$USER/.cache/tofi* ; tofi-drun";
|
||||
# on-click-right = "pkill tofi || wallpaper-picker";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
privacy = {
|
||||
icon-spacing = 8;
|
||||
icon-size = 12;
|
||||
transition-duration = 250;
|
||||
modules = {
|
||||
screenshare = {
|
||||
type = "screenshare";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 12;
|
||||
};
|
||||
audio-out = {
|
||||
type = "audio-out";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 12;
|
||||
};
|
||||
audio-in = {
|
||||
type = "audio-in";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 12;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
exec = "/home/${user0}/Files/Projects/dotfiles/home/modules/waybar/config/scripts/get_weather.sh Winnipeg";
|
||||
return-type = "json";
|
||||
format = "{}";
|
||||
tooltip = true;
|
||||
interval = 3600;
|
||||
};
|
||||
};
|
||||
}
|
||||
# https://unicodes.jessetane.com/
|
101
home/modules/gui/desktop/waybar/config/style.nix
Executable file
101
home/modules/gui/desktop/waybar/config/style.nix
Executable file
|
@ -0,0 +1,101 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
|
||||
inherit (flake.config.aesthetics.themes)
|
||||
currentTheme
|
||||
palettes
|
||||
font
|
||||
;
|
||||
|
||||
el = palettes.${currentTheme}.colours;
|
||||
|
||||
custom = {
|
||||
font = font.name;
|
||||
font_size = "${builtins.toString font.size.desktop}px";
|
||||
font_weight = "bold";
|
||||
opacityBg = "0.90";
|
||||
opacityBt = "1";
|
||||
text_color = el.base0E;
|
||||
secondary_accent = el.base07;
|
||||
tertiary_accent = el.base15;
|
||||
button_color = el.base04;
|
||||
background_1 = el.base01;
|
||||
background_2 = el.base00;
|
||||
background_3 = el.base04;
|
||||
};
|
||||
in
|
||||
''
|
||||
|
||||
* {
|
||||
min-height: 0px;
|
||||
font-family: ${custom.font};
|
||||
font-weight: ${custom.font_weight};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #${custom.background_2};
|
||||
color: #${custom.background_3};
|
||||
border: 2px solid;
|
||||
border-radius: 30px;
|
||||
border-color: #${custom.text_color};
|
||||
min-height: 100px;
|
||||
opacity: ${custom.opacityBg};
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-size: 18px;
|
||||
padding-left: 15px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
#workspaces button {
|
||||
color: #${custom.button_color};
|
||||
padding: 5px;
|
||||
opacity: ${custom.opacityBt};
|
||||
}
|
||||
#workspaces button.empty {
|
||||
color: #${custom.background_3};
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #${custom.text_color};
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #privacy, #cpu, #memory, #disk, #clock {
|
||||
font-size: ${custom.font_size};
|
||||
color: #${custom.text_color};
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#privacy {
|
||||
}
|
||||
|
||||
#cpu {
|
||||
}
|
||||
|
||||
#memory {
|
||||
}
|
||||
|
||||
#disk {
|
||||
}
|
||||
|
||||
#tray {
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
}
|
||||
|
||||
#clock {
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
font-size: 20px;
|
||||
color: #${custom.text_color};
|
||||
font-weight: ${custom.font_weight};
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
font-size: 14px;
|
||||
color: #${custom.text_color};
|
||||
font-weight: ${custom.font_weight};
|
||||
}
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue