This commit is contained in:
Peritia 2026-02-12 15:32:45 +01:00
parent b6b87d5aed
commit 9c72a71585
3546 changed files with 18655 additions and 0 deletions

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}: {
imports = [
./hyprland
./waybar
./wofi
./hyprpaper
./eww
./gtk-theme
];
}

View file

@ -0,0 +1,26 @@
#!/bin/bash
# Get the day of the week, day of the month, month, and year
day_of_week=$(date +"%a")
day_of_month=$(date +"%d")
month=$(date +"%b")
year=$(date +"%Y")
# Remove leading zero from the day of the month
day_of_month=$(echo $day_of_month | sed 's/^0*//')
# Determine the ordinal suffix
if [[ $day_of_month -ge 11 && $day_of_month -le 13 ]]; then
suffix="th"
else
case $((day_of_month % 10)) in
1) suffix="st" ;;
2) suffix="nd" ;;
3) suffix="rd" ;;
*) suffix="th" ;;
esac
fi
# Output the formatted date
echo "${day_of_month}${suffix} $month $year"

View file

@ -0,0 +1,102 @@
* {
all: unset;
background: transparent;
font-family: Noto Sans;
}
$accent-color: #20d0fc;
window {
background: transparent;
}
.container {
padding: 0px;
background: linear-gradient(to bottom, rgba(255,255,255,0.3)0%, rgba(0,0,0,0.4)50%, rgba(0,0,0,0.5)50%, rgba(0,0,0,0.7)100%);
color: white;
border-radius: 12px;
border-style: solid;
border-width: 2px;
border-left-width: 1px;
border-top-width: 1px;
border-color: rgba(255,255,255,0.25);
border-bottom-color: rgba(0,50,50,0.8);
border-right-color: rgba(0,50,50,0.8);
box-shadow: inset 0px 0px 12px rgba(0,0,0,0.25);
}
.completelytrans {
background: none;
}
.button {
padding: 5px;
}
.button:hover {
background-color: rgba(0,255,255,0.1);
border-radius: 12px;
transition-duration: 150ms;
}
.button:active {
background-color: rgba(0,0,0,0.6);
transition-duration: 150ms;
}
.daybox {
border-radius: 8px;
margin: 5px;
}
.temperature-container {
padding: 25px;
}
.temperature {
background: rgba(0,0,0,0.5);
margin: 0px;
padding: 12px;
font-size: 18px;
}
.temp-label-header {
color: rgba(255,255,255,1);
text-shadow: 0px 0px 5px rgba(0,255,255,1);
margin-bottom: 110px;
font-size: 32px;
}
.temp-label {
font-size: 22px;
margin-bottom: 10px;
font-weight: bold;
}
.weather-label {
color: rgba(0,255,255,0.5);
margin-top: 45px;
font-size: 18px;
font-weight: bold;
}
.date-label {
background: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(0,0,0,0.2));
font-size: 16px;
font-weight: 500;
padding: 2px;
box-shadow: 0px 0px 8px rgba(0,0,0,0.45);
border-radius: 6px;
padding: 6px;
border-top-style: solid;
border-bottom-style: solid;
border-width: 1px;
border-color: rgba(255,255,255,0.25);
border-top-color: rgba(255,255,255,0.4);
color: rgba(255,255,255,0.8);
text-shadow: 0px 0px 6px black;
font-weight: bold;
}

View file

@ -0,0 +1,29 @@
#!/bin/bash
# Reload/Open eww
eww kill
eww daemon
# Day label at the top of the screen.
eww open daybox
# Wofi button -- Cancelled/still wip, I think it looks bad.
# eww open menu
# All other aesthetic gifs
eww open gif1
eww open gif2
# The temperature widget
#eww open diinkitemperature
# Call the weather polling function once initially.
# I recommend installing cron and making a cronjob that calls
# the script with --getdata every 30 minutes.
#WEATHER_POLLING="$HOME/.config/eww/scripts/weather.sh"
#bash "$WEATHER_POLLING" --getdata &
#disown
# -- Experimental gif, uncomment if you want it :D
# eww open gif3

View file

@ -0,0 +1,12 @@
{
imports = [
./main.nix
./widgets/daybox.nix
./widgets/menu.nix
./widgets/diinkitemperature.nix
./widgets/gif1.nix
./widgets/gif2.nix
./widgets/gif3.nix
];
}

View file

@ -0,0 +1,49 @@
{
config,
lib,
pkgs,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = nixosVista.eww;
in {
#
#
# Definetly not done yet the Widgets don't really work
#
#
#
options.nixosVista.eww.enable =
mkEnableOption "Modular EWW system";
config = mkIf cfg.enable {
programs.eww.enable = true;
home.packages = [
pkgs.jq
pkgs.curl
];
home.file = {
".config/eww/eww.scss".source = ./base/eww.scss;
".config/eww/eww.yuck".text = ''
;; Base EWW file
(include "eww_vars.yuck")
'';
".config/eww/eww_vars.yuck".text = ''
(defpoll DATE :interval "1s" '~/.config/eww/date_format.sh')
(defpoll uptime :interval "25s" "uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/'")
'';
".config/eww/date_format.sh".source =
./base/date_format.sh;
".config/eww/start.sh".source =
./base/start.sh;
};
};
}

View file

@ -0,0 +1,26 @@
#!/bin/bash
# Get the day of the week, day of the month, month, and year
day_of_week=$(date +"%a")
day_of_month=$(date +"%d")
month=$(date +"%b")
year=$(date +"%Y")
# Remove leading zero from the day of the month
day_of_month=$(echo $day_of_month | sed 's/^0*//')
# Determine the ordinal suffix
if [[ $day_of_month -ge 11 && $day_of_month -le 13 ]]; then
suffix="th"
else
case $((day_of_month % 10)) in
1) suffix="st" ;;
2) suffix="nd" ;;
3) suffix="rd" ;;
*) suffix="th" ;;
esac
fi
# Output the formatted date
echo "${day_of_month}${suffix} $month $year"

View file

@ -0,0 +1,29 @@
#!/bin/bash
# Reload/Open eww
eww kill
eww daemon
# Day label at the top of the screen.
eww open daybox
# Wofi button -- Cancelled/still wip, I think it looks bad.
# eww open menu
# All other aesthetic gifs
eww open gif1
eww open gif2
# The temperature widget
eww open diinkitemperature
# Call the weather polling function once initially.
# I recommend installing cron and making a cronjob that calls
# the script with --getdata every 30 minutes.
WEATHER_POLLING="$HOME/.config/eww/scripts/weather.sh"
bash "$WEATHER_POLLING" --getdata &
disown
# -- Experimental gif, uncomment if you want it :D
# eww open gif3

View file

@ -0,0 +1,150 @@
#!/bin/bash
# -- Code inspired by adi1090x on github!
## Collect data
cache_dir="$HOME/.cache/eww/weather"
cache_weather_stat=${cache_dir}/weather-stat
cache_weather_degree=${cache_dir}/weather-degree
cache_weather_quote=${cache_dir}/weather-quote
cache_weather_hex=${cache_dir}/weather-hex
cache_weather_icon=${cache_dir}/weather-icon
## WEATHER API DATA & KEYS! --------- INPUT YOUR DETAILS FROM openweathermap.org !!!
KEY=""
ID="" # Steps: 1. Go to openweathermap.org | 2. Search your City | 3. The City ID is in the URL.
UNIT="metric" # Available options : 'metric' or 'imperial'
## --------------------------------------------------------------------------------
## Make cache dir
if [[ ! -d "$cache_dir" ]]; then
mkdir -p ${cache_dir}
fi
## Get data
get_weather_data() {
weather=`curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT""`
echo ${weather}
if [ ! -z "$weather" ]; then
weather_temp=`echo "$weather" | jq ".main.temp" | cut -d "." -f 1`
weather_icon_code=`echo "$weather" | jq -r ".weather[].icon" | head -1`
weather_description=`echo "$weather" | jq -r ".weather[].description" | head -1 | sed -e "s/\b\(.\)/\u\1/g"`
#Big long if statement of doom
if [ "$weather_icon_code" == "50d" ]; then
weather_icon=" "
weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
weather_hex="#84afdb"
elif [ "$weather_icon_code" == "50n" ]; then
weather_icon=" "
weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
weather_hex="#84afdb"
elif [ "$weather_icon_code" == "01d" ]; then
weather_icon=" "
weather_quote="It's a sunny day, gonna be fun! \nDon't go wandering all by yourself though..."
weather_hex="#ffd86b"
elif [ "$weather_icon_code" == "01n" ]; then
weather_icon=" "
weather_quote="It's a clear night \nYou might want to take a evening stroll to relax..."
weather_hex="#fcdcf6"
elif [ "$weather_icon_code" == "02d" ]; then
weather_icon=" "
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
weather_hex="#adadff"
elif [ "$weather_icon_code" == "02n" ]; then
weather_icon=" "
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
weather_hex="#adadff"
elif [ "$weather_icon_code" == "03d" ]; then
weather_icon=" "
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
weather_hex="#adadff"
elif [ "$weather_icon_code" == "03n" ]; then
weather_icon=" "
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
weather_hex="#adadff"
elif [ "$weather_icon_code" == "04d" ]; then
weather_icon=" "
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
weather_hex="#adadff"
elif [ "$weather_icon_code" == "04n" ]; then
weather_icon=" "
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
weather_hex="#adadff"
elif [ "$weather_icon_code" == "09d" ]; then
weather_icon=" "
weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
weather_hex="#6b95ff"
elif [ "$weather_icon_code" == "09n" ]; then
weather_icon=" "
weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
weather_hex="#6b95ff"
elif [ "$weather_icon_code" == "10d" ]; then
weather_icon=" "
weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
weather_hex="#6b95ff"
elif [ "$weather_icon_code" == "10n" ]; then
weather_icon=" "
weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
weather_hex="#6b95ff"
elif [ "$weather_icon_code" == "11d" ]; then
weather_icon=""
weather_quote="There's storm for forecast today \nMake sure you don't get blown away..."
weather_hex="#ffeb57"
elif [ "$weather_icon_code" == "11n" ]; then
weather_icon=""
weather_quote="There's gonna be storms tonight \nMake sure you're warm in bed and the windows are shut..."
weather_hex="#ffeb57"
elif [ "$weather_icon_code" == "13d" ]; then
weather_icon=" "
weather_quote="It's gonna snow today \nYou'd better wear thick clothes and make a snowman as well!"
weather_hex="#e3e6fc"
elif [ "$weather_icon_code" == "13n" ]; then
weather_icon=" "
weather_quote="It's gonna snow tonight \nMake sure you get up early tomorrow to see the sights..."
weather_hex="#e3e6fc"
elif [ "$weather_icon_code" == "40d" ]; then
weather_icon=" "
weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
weather_hex="#84afdb"
elif [ "$weather_icon_code" == "40n" ]; then
weather_icon=" "
weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
weather_hex="#84afdb"
else
weather_icon=" "
weather_quote="Sort of odd, I don't know what to forecast \nMake sure you have a good time!"
weather_hex="#adadff"
fi
echo "$weather_icon" > ${cache_weather_icon}
echo "$weather_description" > ${cache_weather_stat}
echo "$weather_temp""°C" > ${cache_weather_degree}
echo -e "$weather_quote" > ${cache_weather_quote}
echo "$weather_hex" > ${cache_weather_hex}
else
echo "Weather Unavailable" > ${cache_weather_stat}
echo " " > ${cache_weather_icon}
echo -e "Ah well, no weather huh? \nEven if there's no weather, it's gonna be a great day!" > ${cache_weather_quote}
echo "-" > ${cache_weather_degree}
echo "#adadff" > ${tcache_weather_hex}
fi
}
## Execute
if [[ "$1" == "--getdata" ]]; then
get_weather_data
elif [[ "$1" == "--icon" ]]; then
cat ${cache_weather_icon}
elif [[ "$1" == "--temp" ]]; then
cat ${cache_weather_degree}
elif [[ "$1" == "--hex" ]]; then
cat ${cache_weather_hex}
elif [[ "$1" == "--stat" ]]; then
cat ${cache_weather_stat}
elif [[ "$1" == "--quote" ]]; then
cat ${cache_weather_quote} | head -n1
elif [[ "$1" == "--quote2" ]]; then
cat ${cache_weather_quote} | tail -n1
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View file

@ -0,0 +1,43 @@
{
config,
lib,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkIf mkAfter;
root = nixosVista.eww;
cfg = root.widgets.daybox;
in {
options.nixosVista.eww.widgets.daybox.enable =
mkEnableOption "Daybox widget";
config = mkIf (root.enable && cfg.enable) {
home.file.".config/eww/daybox.yuck".text = ''
(defwidget daybox []
(box :halign "center" :valign "center" :class "container"
(box :halign "center" :valign "center" :class "daybox"
(label :class "date-label" :text DATE)
)
)
)
(defwindow daybox
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "noblur"
:geometry (geometry
:x "0px"
:y "30px"
:width "150px"
:height "70px"
:anchor "top center")
(daybox)
)
'';
home.file.".config/eww/eww.yuck".text = mkAfter ''
(include "daybox.yuck")
'';
};
}

View file

@ -0,0 +1,110 @@
{
config,
lib,
pkgs,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkOption types mkIf mkAfter;
root = nixosVista.eww;
cfg = root.widgets.diinkitemperature;
in {
options.nixosVista.eww.widgets.diinkitemperature = {
enable = mkEnableOption "Temperature widget";
apiKey = mkOption {
type = types.nullOr types.str;
default = null;
};
cityID = mkOption {
type = types.nullOr types.str;
default = null;
};
unit = mkOption {
type = types.enum ["metric" "imperial"];
default = "metric";
};
};
config = mkIf (root.enable && cfg.enable) {
assertions = [
{
assertion = cfg.apiKey != null && cfg.cityID != null;
message = "Temperature widget requires apiKey and cityID.";
}
];
home.file = {
".config/eww/images/macscreen.png".source =
./assets/macscreen.png;
".config/eww/scripts/weather.sh" = {
executable = true;
source = pkgs.writeShellScript "eww-weather" ''
API_KEY="${cfg.apiKey}"
CITY_ID="${cfg.cityID}"
UNIT="${cfg.unit}"
CACHE="$HOME/.cache/eww/weather.json"
mkdir -p "$HOME/.cache/eww"
fetch() {
${pkgs.curl}/bin/curl -s \
"https://api.openweathermap.org/data/2.5/weather?id=$CITY_ID&appid=$API_KEY&units=$UNIT" \
| ${pkgs.jq}/bin/jq '.' > "$CACHE"
}
case "$1" in
--getdata)
fetch
;;
--temp)
${pkgs.jq}/bin/jq -r '.main.temp | tostring + "°"' "$CACHE"
;;
--stat)
${pkgs.jq}/bin/jq -r '.weather[0].main' "$CACHE"
;;
--icon)
${pkgs.jq}/bin/jq -r '.weather[0].icon' "$CACHE"
;;
esac
'';
};
".config/eww/temperature.yuck".text = ''
(defpoll TEMP :interval "30s" '~/.config/eww/scripts/weather.sh --temp')
(defpoll WEATHER :interval "30s" '~/.config/eww/scripts/weather.sh --stat')
(defpoll WEATHERICON :interval "30s" '~/.config/eww/scripts/weather.sh --icon')
(defwidget diinkitemperature []
(overlay :halign "center" :valign "center" :class "temperature-container"
(image :path "images/macscreen.png" :image-width 250)
(label :text WEATHERICON :class "temp-label-header")
(label :text TEMP :class "temp-label")
(label :text WEATHER :class "weather-label")
)
)
(defwindow diinkitemperature
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
:geometry (geometry
:x "0px"
:y "360px"
:width "250px"
:height "250px"
:anchor "top right")
(diinkitemperature)
)
'';
};
home.file.".config/eww/eww.yuck".text = mkAfter ''
(include "temperature.yuck")
'';
};
}

View file

@ -0,0 +1,40 @@
{
config,
lib,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkIf mkAfter;
root = nixosVista.eww;
cfg = root.widgets.gif1;
in {
options.nixosVista.eww.widgets.gif1.enable =
mkEnableOption "Gif1 widget";
config = mkIf (root.enable && cfg.enable) {
home.file = {
".config/eww/images/gif1.gif".source =
./assets/gif1.gif;
".config/eww/gif1.yuck".text = ''
(defwidget gif1 []
(box :halign "center" :valign "center" :class "container"
(image :path "images/gif1.gif")
)
)
(defwindow gif1
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
(gif1)
)
'';
};
home.file.".config/eww/eww.yuck".text = mkAfter ''
(include "gif1.yuck")
'';
};
}

View file

@ -0,0 +1,40 @@
{
config,
lib,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkIf mkAfter;
root = nixosVista.eww;
cfg = root.widgets.gif2;
in {
options.nixosVista.eww.widgets.gif2.enable =
mkEnableOption "Gif2 widget";
config = mkIf (root.enable && cfg.enable) {
home.file = {
".config/eww/images/gif2.gif".source =
./assets/gif2.gif;
".config/eww/gif2.yuck".text = ''
(defwidget gif2 []
(box :halign "center" :valign "center" :class "container"
(image :path "images/gif2.gif")
)
)
(defwindow gif2
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
(gif2)
)
'';
};
home.file.".config/eww/eww.yuck".text = mkAfter ''
(include "gif2.yuck")
'';
};
}

View file

@ -0,0 +1,38 @@
{
config,
lib,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkIf mkAfter;
root = nixosVista.eww;
cfg = root.widgets.gif3;
in {
options.nixosVista.eww.widgets.gif3.enable =
mkEnableOption "Gif3 widget";
config = mkIf (root.enable && cfg.enable) {
home.file = {
".config/eww/images/gif3.gif".source =
./assets/gif3.gif;
".config/eww/gif3.yuck".text = ''
(defwidget gif3 []
(image :path "images/gif3.gif")
)
(defwindow gif3
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
(gif3)
)
'';
};
home.file.".config/eww/eww.yuck".text = mkAfter ''
(include "gif3.yuck")
'';
};
}

View file

@ -0,0 +1,50 @@
{
config,
lib,
nixosVista,
...
}: let
inherit (lib) mkEnableOption mkIf mkAfter;
root = nixosVista.eww;
cfg = root.widgets.menu;
in {
options.nixosVista.eww.widgets.menu.enable =
mkEnableOption "Menu widget";
config = mkIf (root.enable && cfg.enable) {
home.file = {
".config/eww/images/os_logo.png".source =
./assets/os_logo.png;
".config/eww/menu.yuck".text = ''
(defwidget menu []
(box :halign "center" :valign "center" :class "container"
(button :onclick "wofi --show drun &" :class "button"
(image :path "images/os_logo.png"
:image-width 50
:image-height 50)
)
)
)
(defwindow menu
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
:geometry (geometry
:x "30px"
:y "30px"
:width "70px"
:height "70px"
:anchor "top right")
(menu)
)
'';
};
home.file.".config/eww/eww.yuck".text = mkAfter ''
(include "menu.yuck")
'';
};
}

View file

@ -0,0 +1,143 @@
{
config,
lib,
pkgs,
nixosVista,
...
}: let
cfg = nixosVista.eww;
w = cfg.widgets;
############################################################
# Window blocks
############################################################
dayboxWindow = lib.optionalString w.daybox.enable ''
(defwindow daybox
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "noblur"
:geometry (geometry
:x "0px"
:y "30px"
:width "150px"
:height "70px"
:anchor "top center")
(daybox)
)
'';
menuWindow = lib.optionalString w.menu.enable ''
(defwindow menu
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
:geometry (geometry
:x "30px"
:y "30px"
:width "70px"
:height "70px"
:anchor "top right")
(menu)
)
'';
temperatureWindow = lib.optionalString w.diinkitemperature.enable ''
(defwindow diinkitemperature
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
:geometry (geometry
:x "0px"
:y "360px"
:width "100px"
:height "100px"
:anchor "top right")
(diinkitemperature)
)
'';
gif1Window = lib.optionalString w.gif1.enable ''
(defwindow gif1
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
(gif1)
)
'';
############################################################
# Final yuck
############################################################
finalYuck = ''
(include "eww_widgets.yuck")
${dayboxWindow}
${menuWindow}
${temperatureWindow}
${gif1Window}
'';
in
{
programs.eww.enable = lib.mkIf cfg.enable true;
home.file.".config/eww/eww.yuck" = lib.mkIf cfg.enable {
text = finalYuck;
};
}
{
config,
lib,
pkgs,
nixosVista,
...
}: let
root = nixosVista.eww;
w = root.widgets.diinkitemperature;
weatherScript = pkgs.writeShellScript "weather.sh" ''
#!/usr/bin/env bash
KEY="${w.apiKey}"
ID="${w.cityID}"
UNIT="${w.unit}"
echo "Weather stub"
'';
windowBlock = lib.optionalString w.enable ''
(defwindow diinkitemperature
:monitor '["<primary>", 2, 1, 0]'
:windowtype "dock"
:stacking "bg"
:namespace "eww"
:geometry (geometry
:x "0px"
:y "360px"
:width "100px"
:height "100px"
:anchor "top right")
(diinkitemperature)
)
'';
in {
config = lib.mkIf (root.enable && w.enable) {
home.packages = [
pkgs.curl
pkgs.jq
];
home.file.".config/eww/scripts/weather.sh" = {
source = weatherScript;
executable = true;
};
nixosVista.eww.generatedYuck =
lib.mkAfter windowBlock;
};
}

View file

@ -0,0 +1,47 @@
{
config,
lib,
pkgs,
...
}: let
diinkiAeroGtkTheme =
pkgs.callPackage
../../../Ressources/package/gtk-theme
{};
crystalRemixIconTheme =
pkgs.callPackage
../../../Ressources/package/icon-theme
{};
in {
gtk = {
enable = true;
theme = {
name = "diinki-aero";
package = diinkiAeroGtkTheme;
};
iconTheme = {
name = "crystal-remix-icon-theme-diinki-version";
package = crystalRemixIconTheme;
};
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "Oxygen_Zion";
size = 24;
package = pkgs.kdePackages.oxygen;
};
}
# # cursorTheme = {
# # name = "Adwaita";
# # package = pkgs.gnome.adwaita-icon-theme;
# # };
# };
# #};
# }

View file

@ -0,0 +1,54 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland;
in {
############################################################
# Options exposed to the user
############################################################
options.nixosVista.hyprland = {
customTop = lib.mkOption {
type = lib.types.lines;
default = "";
description = ''
Custom Hyprland configuration injected near the top
of the generated config.
'';
};
customBottom = lib.mkOption {
type = lib.types.lines;
default = "";
description = ''
Custom Hyprland configuration injected at the very bottom
of the generated config.
'';
};
};
############################################################
# Inject into fragment system
############################################################
config = lib.mkIf nixosVista.enable {
nixosVista.hyprland.fragments.customTop = lib.mkIf (cfg.customTop != "") ''
############################################################
# Your Custom User / nixosVista.hyprland.customTop
############################################################
${cfg.customTop}
'';
nixosVista.hyprland.fragments.customBottom = lib.mkIf (cfg.customBottom != "") ''
############################################################
# Custom User Bottom Config / nixosVista.hyprland.customBottom
############################################################
${cfg.customBottom}
'';
};
}

View file

@ -0,0 +1,22 @@
{lib, ...}: {
imports = [
# Main entry:
./main.nix
# Each one is a Snippet for the main
# Each one will first add to the fragment so that it can build the hyprland config in order
./header.nix
./monitor.nix
./startup.nix
./variables.nix
./enviorment.nix
./special.nix
./input.nix
./keybindings.nix
./windowRules.nix
./style
# Doesn't work yet:
#./customUser.nix
];
}

View file

@ -0,0 +1,31 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland;
############################################################
# Environment variables (Hyprland env = ...)
############################################################
envLines =
lib.mapAttrsToList
(name: value: "env = ${name},${value}")
cfg.env;
in {
config = lib.mkIf nixosVista.enable {
nixosVista.hyprland.fragments.environment = ''
############################################################
# Environment
############################################################
# env = XCURSOR_SIZE,24
# env = HYPRCURSOR_SIZE,24
${lib.concatStringsSep "\n" envLines}
'';
};
}

View file

@ -0,0 +1,18 @@
{
config,
lib,
nixosVista,
...
}: {
config = lib.mkIf nixosVista.enable {
#warnings = [">>> HYPRLAND HEADER MODULE ACTIVE <<<"];
nixosVista.hyprland.fragments.header = ''
# ========
# Hyprland config file
# Credit goes alot to diinki
# Inspiration: https://github.com/diinki/diinki-aero/
# ========
'';
};
}

View file

@ -0,0 +1,38 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland.input;
optionalLine = name: value:
lib.optional (value != null && value != "")
"${name} = ${value}";
lines =
[
"kb_layout = ${cfg.kb_layout}"
"follow_mouse = ${toString cfg.follow_mouse}"
"sensitivity = ${toString cfg.sensitivity}"
]
++ optionalLine "kb_options" cfg.kb_options
++ optionalLine "kb_rules" cfg.kb_rules
++ optionalLine "kb_variant" cfg.kb_variant
++ optionalLine "kb_model" cfg.kb_model;
in {
config = lib.mkIf nixosVista.enable {
nixosVista.hyprland.fragments.input = ''
############################################################
# Input
############################################################
input {
${lib.concatStringsSep "\n " lines}
touchpad {
natural_scroll = ${lib.boolToString cfg.touchpad.natural_scroll}
}
}
'';
};
}

View file

@ -0,0 +1,170 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland.keybindings;
############################################################
# Presets
############################################################
# I wanna adjust the Main Keybinds still a lil but anyone can easily build their own
defaultPreset = [
# Main modifier
#"$mainMod = SUPER"
# Switch focus Arrow keys
"bind = $mainMod, left, movefocus, l"
"bind = $mainMod, right, movefocus, r"
"bind = $mainMod, up, movefocus, u"
"bind = $mainMod, down, movefocus, d"
# Terminal
"bind = $mainMod, Enter, exec, $terminal"
"bind = $mainMod, Return, exec, $terminal"
# Kill active
"bind = $mainMod, Q, killactive"
# Screenshot
"bind = $mainMod SHIFT, S, exec, hyprshot --mode region --output-folder /tmp"
# File manager
"bind = $mainMod, E, exec, $fileManager"
# Toggle floating
"bind = $mainMod SHIFT, SPACE, togglefloating"
# Fullscreen
"bind = $mainMod, F, fullscreen"
# Launcher
"bind = $mainMod, D, exec, $menu"
# Workspaces
"bind = $mainMod, 1, workspace, 1"
"bind = $mainMod, 2, workspace, 2"
"bind = $mainMod, 3, workspace, 3"
"bind = $mainMod, 4, workspace, 4"
"bind = $mainMod, 5, workspace, 5"
"bind = $mainMod, 6, workspace, 6"
"bind = $mainMod, 7, workspace, 7"
"bind = $mainMod, 8, workspace, 8"
"bind = $mainMod, 9, workspace, 9"
"bind = $mainMod, 0, workspace, 10"
# Move to workspace
"bind = $mainMod SHIFT, 1, movetoworkspace, 1"
"bind = $mainMod SHIFT, 2, movetoworkspace, 2"
"bind = $mainMod SHIFT, 3, movetoworkspace, 3"
"bind = $mainMod SHIFT, 4, movetoworkspace, 4"
"bind = $mainMod SHIFT, 5, movetoworkspace, 5"
"bind = $mainMod SHIFT, 6, movetoworkspace, 6"
"bind = $mainMod SHIFT, 7, movetoworkspace, 7"
"bind = $mainMod SHIFT, 8, movetoworkspace, 8"
"bind = $mainMod SHIFT, 9, movetoworkspace, 9"
"bind = $mainMod SHIFT, 0, movetoworkspace, 10"
# Mouse
"bindm = $mainMod, mouse:272, movewindow"
"bindm = $mainMod, mouse:273, resizewindow"
# Volume / brightness
"bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
"bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
"bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
"bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
"bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+"
"bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
diinkii = [
# Main modifier
#"$mainMod = SUPER"
# Terminal
"bind = $mainMod, Return, exec, $terminal"
# Kill active
"bind = $mainMod, Q, killactive"
# Screenshot
"bind = $mainMod SHIFT, S, exec, hyprshot --mode region --output-folder /tmp"
# File manager
"bind = $mainMod, E, exec, $fileManager"
# Toggle floating
"bind = $mainMod SHIFT, SPACE, togglefloating"
# Fullscreen
"bind = $mainMod, F, fullscreen"
# Launcher
"bind = $mainMod, D, exec, $menu"
# Workspaces
"bind = $mainMod, 1, workspace, 1"
"bind = $mainMod, 2, workspace, 2"
"bind = $mainMod, 3, workspace, 3"
"bind = $mainMod, 4, workspace, 4"
"bind = $mainMod, 5, workspace, 5"
"bind = $mainMod, 6, workspace, 6"
"bind = $mainMod, 7, workspace, 7"
"bind = $mainMod, 8, workspace, 8"
"bind = $mainMod, 9, workspace, 9"
"bind = $mainMod, 0, workspace, 10"
# Move to workspace
"bind = $mainMod SHIFT, 1, movetoworkspace, 1"
"bind = $mainMod SHIFT, 2, movetoworkspace, 2"
"bind = $mainMod SHIFT, 3, movetoworkspace, 3"
"bind = $mainMod SHIFT, 4, movetoworkspace, 4"
"bind = $mainMod SHIFT, 5, movetoworkspace, 5"
"bind = $mainMod SHIFT, 6, movetoworkspace, 6"
"bind = $mainMod SHIFT, 7, movetoworkspace, 7"
"bind = $mainMod SHIFT, 8, movetoworkspace, 8"
"bind = $mainMod SHIFT, 9, movetoworkspace, 9"
"bind = $mainMod SHIFT, 0, movetoworkspace, 10"
# Mouse
"bindm = $mainMod, mouse:272, movewindow"
"bindm = $mainMod, mouse:273, resizewindow"
# Volume / brightness
"bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
"bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
"bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
"bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
"bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+"
"bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
minimalPreset = [
"$mainMod = SUPER"
"bind = $mainMod, Return, exec, $terminal"
"bind = $mainMod, Q, killactive"
];
presetBinds =
if cfg.preset == "default"
then defaultPreset
else if cfg.preset == "minimal"
then minimalPreset
else [];
finalBinds = presetBinds ++ cfg.extra;
in {
config = lib.mkIf (nixosVista.enable && finalBinds != []) {
#warnings = [">>> HYPRLAND KEYBINDS MODULE ACTIVE <<<"];
nixosVista.hyprland.fragments.keybinds = ''
############################################################
# Keybindings
############################################################
${lib.concatStringsSep "\n" finalBinds}
'';
};
}

View file

@ -0,0 +1,92 @@
{
config,
lib,
nixosVista,
...
}: let
############################################################
# Correct Fragment Source (IMPORTANT)
############################################################
fragments =
config.nixosVista.hyprland.fragments or {};
get = name:
fragments.${name} or "";
ordered = [
(get "header")
(get "customTop")
(get "monitors")
(get "startup")
(get "variables")
(get "environment")
(get "special")
(get "input")
(get "style")
(get "animation")
(get "keybinds")
(get "windowRules")
(get "customBottom")
];
filteredOrdered =
lib.filter (x: x != "") ordered;
finalConfig = lib.concatStringsSep "\n\n" (
[
''
# IF YOU SEE THIS IT LOADED
# Not needed anymore
#exec-once = hyprctl notify 5 3000 "rgb(ff0000)" "HM HYPRLAND ACTIVE"
''
]
++ filteredOrdered
);
in {
############################################################
# Root Options
############################################################
options.nixosVista.hyprland = {
enable =
lib.mkEnableOption "NixOS-Vista Hyprland configuration";
fragments = lib.mkOption {
type = lib.types.attrsOf lib.types.lines;
default = {};
internal = true;
description = "Internal fragment registry for deterministic assembly.";
};
};
############################################################
# Config
############################################################
# Uncomment this and it will error:
#warnings = [">>> HYPRLAND main.nix gets imported <<<"];
config = lib.mkIf nixosVista.enable {
##########################################################
# Warnings
##########################################################
# Not needed anymore:
# warnings = let
# fragmentNames =
# builtins.attrNames fragments;
# in [
# ">>> HYPRLAND HM MODULE IS LOADED <<<"
# ">>> ENABLE = ${toString config.nixosVista.hyprland.enable}"
# ">>> REGISTERED FRAGMENTS: ${toString fragmentNames}"
# ">>> ORDERED COUNT (non-empty): ${toString (builtins.length filteredOrdered)}"
# ">>> FINAL CONFIG LENGTH: ${toString (builtins.stringLength finalConfig)}"
# ];
##########################################################
wayland.windowManager.hyprland = {
enable = true;
extraConfig = finalConfig;
};
};
}

View file

@ -0,0 +1,56 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista;
############################################################
# Generate explicit monitor lines
############################################################
explicitMonitors =
lib.mapAttrsToList
(
name: settings: "monitor = ${name}, ${settings}"
)
cfg.monitor.list;
############################################################
# Optional fallback monitor
############################################################
fallbackMonitor =
lib.optional
(cfg.monitor.defaultMonitor != null)
"monitor = , ${cfg.monitor.defaultMonitor}";
############################################################
# Final monitor block
############################################################
monitorConfig =
explicitMonitors ++ fallbackMonitor;
in {
config = lib.mkIf (nixosVista.enable && monitorConfig != []) {
#warnings = [">>> HYPRLAND MONITOR MODULE ACTIVE <<<"];
nixosVista.hyprland.fragments.monitors = ''
############################################################
# Monitors
############################################################
# Run `hyprctl monitors all` to see available monitor names
#
# Format:
# monitor = NAME, RESOLUTION@REFRESH, POSITION, SCALE
#
# Example:
# monitor = DP-1, 1920x1080@144, 0x0, 1
# monitor = , preferred, auto, 1
############################################################
${lib.concatStringsSep "\n" monitorConfig}
'';
};
}

View file

@ -0,0 +1,40 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland.special;
in {
config = lib.mkIf (nixosVista.enable && cfg.noHardwareCursor) {
nixosVista.hyprland.fragments.special = ''
############################################################
# Special Settings
############################################################
cursor {
no_hardware_cursors = true
}
############################################################
# Ill make an option for this later:
############################################################
# We have our own wallpapers :) So I'll disable default things.
misc {
force_default_wallpaper = 0
disable_hyprland_logo = true
}
# No need for gestures unless you have a touch display.
# gestures {
# workspace_swipe = false
# }
'';
};
}

View file

@ -0,0 +1,66 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland.startup;
root = nixosVista;
############################################################
# Default Preset (Context Aware)
############################################################
defaultExecOnce = [
"nm-applet"
"waybar"
"hyprpaper"
# "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
"$HOME/.config/eww/start.sh"
];
defaultExec = [];
minimalExecOnce = [];
minimalExec = [];
############################################################
# Select preset
############################################################
presetExecOnce =
if cfg.preset == "default"
then defaultExecOnce
else if cfg.preset == "minimal"
then minimalExecOnce
else [];
presetExec =
if cfg.preset == "default"
then defaultExec
else if cfg.preset == "minimal"
then minimalExec
else [];
############################################################
# Merge user extras
############################################################
finalExecOnce = presetExecOnce ++ cfg.extraExecOnce;
finalExec = presetExec ++ cfg.extraExec;
execOnceLines = map (cmd: "exec-once = ${cmd}") finalExecOnce;
execLines = map (cmd: "exec = ${cmd}") finalExec;
allLines = execOnceLines ++ execLines;
in {
config = lib.mkIf (nixosVista.enable && allLines != []) {
nixosVista.hyprland.fragments.startup = ''
############################################################
# Startup Programs
############################################################
${lib.concatStringsSep "\n" allLines}
'';
};
}

View file

@ -0,0 +1,27 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland.style.animation;
animationLines =
lib.concatStringsSep "\n " cfg.config;
in {
config = lib.mkIf nixosVista.enable {
#warnings = [ ">>> HYPRLAND Animations MODULE ACTIVE <<<" ];
nixosVista.hyprland.fragments.animation = ''
############################################################
# Animations
############################################################
animations {
enabled = ${lib.boolToString cfg.enabled}
${animationLines}
}
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./animation.nix
./style.nix
];
}

View file

@ -0,0 +1,85 @@
{
cfg,
lib,
nixosVista,
...
}: let
enabled = nixosVista.enable && nixosVista.theme.enable;
in {
config = lib.mkIf enabled {
#warnings = [">>> HYPRLAND STYLE MODULE ACTIVE <<<"];
nixosVista.hyprland.fragments.style = ''
# ========
# Credit goes alot to diinki
# Inspiration: https://github.com/diinki/diinki-aero/
# ========
# !!DESIGN!! #
# --------------------------------------------------------------------------------- #
# !!DESIGN!! #
# The gaps between windows, as well as border colors.
# proportional to the taskbar values.
general {
# Inner and Outer gaps between windows.
gaps_in = 5
gaps_out = 10
# I prefer a thin border
border_size = 1
# Border colors.
col.active_border = rgb(18,18,18)
col.inactive_border = rgb(18,18,18)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = true
layout = dwindle
# READ https://wiki.hyprland.org/Configuring/Tearing/ BEFORE TURNING ON!
allow_tearing = false
}
# Window Decorations! Shadow, Blur, etc.
decoration {
# 8px same as taskbar, change if wanted.
rounding = 12
# I want transparancy to not change, since we have the colored border.
active_opacity = 1.0
inactive_opacity = 1
# Window Shadow
shadow:enabled = true
shadow:range = 16
shadow:render_power = 5
shadow:color = rgba(0,0,0,0.35)
# Transparent Window Blur
blur:enabled = true
blur:new_optimizations = true
blur:size = 2
blur:passes = 3
blur:vibrancy = 0.1696
}
# Read https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more info on dwindle layout.
dwindle {
pseudotile = true
preserve_split = true
}
# Read https://wiki.hyprland.org/Configuring/Master-Layout/ for more info on master layout.
master {
new_status = master
}
'';
};
}

View file

@ -0,0 +1,32 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland;
############################################################
# Generate $variables
############################################################
variables =
lib.mapAttrsToList
(name: value: "\$${name} = ${value}")
cfg.variables;
in {
config = lib.mkIf nixosVista.enable {
nixosVista.hyprland.fragments.variables = ''
############################################################
# Hyprland Variables
############################################################
# $terminal = kitty
# $fileManager = caja
# $menu = wofi --show drun
${lib.concatStringsSep "\n" variables}
'';
};
}

View file

@ -0,0 +1,66 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprland.windowRules;
############################################################
# Default Preset
############################################################
defaultPreset = [
# This adds a blur to the background of wofi (our app launcher)
# The reason we can't do this within wofi itself, is because gtk3 doesn't
# have a built-in background blur.
"layerrule = blur none, match:namespace wofi"
"layerrule = ignore_alpha 0.01, match:namespace wofi"
# Add blur to waybar, for same reason as above. Since we have two versions
# of the waybar design, one with translucency.
"layerrule = blur none, match:namespace waybar"
"layerrule = blur_popups on, match:namespace waybar"
"layerrule = ignore_alpha 0.01, match:namespace waybar"
# Add blur to eww widgets
"layerrule = blur none, match:namespace eww"
"layerrule = blur_popups on, match:namespace eww"
"layerrule = ignore_alpha 0.01, match:namespace eww"
# Fix dragging issues with XWayland
"windowrule = no_focus on, match:class ^$, match:title ^$, match:xwayland true, match:float true, match:fullscreen false, match:pin false"
];
minimalPreset = [];
############################################################
# Select preset
############################################################
presetRules =
if cfg.preset == "default"
then defaultPreset
else if cfg.preset == "minimal"
then minimalPreset
else [];
############################################################
# Merge preset + extra
############################################################
finalRules = presetRules ++ cfg.extra;
in {
config = lib.mkIf (nixosVista.enable && finalRules != []) {
nixosVista.hyprland.fragments.windowRules = ''
############################################################
# Window Rules
############################################################
# Here should be the new lines:
${lib.concatStringsSep "\n" finalRules}
'';
};
}

View file

@ -0,0 +1,17 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.hyprpaper;
in {
config = lib.mkIf cfg.enable {
services.hyprpaper = {
enable = true;
# Direct passthrough to official Home Manager option
settings = cfg.settings;
};
};
}

View file

@ -0,0 +1,102 @@
{
config,
lib,
nixosVista,
...
}: let
root = nixosVista;
cfg = root.waybar;
baseSettings = {
layer = "bottom";
spacing = 0;
height = 0;
margin-top = 0;
position = "bottom";
margin-right = 50;
margin-bottom = 8;
margin-left = 50;
modules-left = [
"custom/os_btn"
"hyprland/workspaces"
"wlr/taskbar"
];
modules-center = [
"clock"
];
modules-right = [
"tray"
"network"
"battery"
"pulseaudio"
];
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
tooltip = false;
};
"wlr/taskbar" = {
format = "{icon}";
spacing = 3;
icon-size = 28;
on-click = "activate";
tooltip-format = "{title}";
};
tray = {
spacing = 10;
tooltip = false;
};
clock = {
format = "{:%H:%M - %a | %d %b %Y}";
tooltip = false;
};
network = {
format-wifi = "󰤢 {bandwidthDownBits}";
format-ethernet = "󰤢 {bandwidthDownBits}";
format-disconnected = "󰤠 No Network";
interval = 5;
tooltip = false;
};
pulseaudio = {
scroll-step = 5;
max-volume = 150;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-icons = ["" "" " "];
nospacing = 1;
format-muted = " ";
on-click = "pavucontrol";
tooltip = false;
};
battery = {
format = "{icon} {capacity}%";
interval = 5;
states = {
warning = 20;
critical = 10;
};
format-icons = ["" "" "" "" ""];
tooltip = false;
};
};
finalSettings = baseSettings // cfg.settings.extra;
in {
programs.waybar = lib.mkIf (cfg.enable && cfg.style.preset != "none") {
enable = true;
settings = [finalSettings];
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./style.nix
];
}

View file

@ -0,0 +1,505 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.waybar;
############################################################
# DEFAULT PRESET
############################################################
defaultStyle = ''
@define-color accent_color #20d0fc;
* {
border: none;
border-radius: 8;
min-height: 0;
/* For the taskbar, I prefer simple Noto Sans.*/
font-family: Noto Sans;
font-weight: bold;
font-size: 14px;
padding: 0px;
padding-left: 0px;
padding-right: 0px;
background: transparent;
}
window#waybar {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.25)0%, rgba(0,0,0,0.5)50%, rgba(0,0,0,0.6)50%);
border-radius: 12px;
border-width: 1px;
border-bottom-width: 1px;
padding: 0px;
border-style: solid;
border-color: rgba(255,255,255,0.2);
}
tooltip {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.15)50%, rgba(0,0,0,0.2)50%, rgba(0,0,0,0.3)50%);
color: white;
border-top-style: solid;
border-bottom-style: solid;
border-width: 1px;
border-top-color: rgba(255,255,255,0.4);
border-bottom-color: rgba(255,255,255,0.25);
}
tooltip label {
color: white;
}
#custom-os_btn {
margin-left: 0.5cm;
}
#taskbar {
margin: 4px 8px;
margin-left: 0.25cm;
color: white;
}
#taskbar button {
margin-left: 0.2cm;
margin-right: 0.2cm;
padding: 1px;
border-radius: 4px;
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-width: 1px;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.3);
box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
}
#taskbar button:hover {
background-color: rgba(0,0,0,0);
box-shadow: 0px 0px 5px rgba(0,0,0,0.5);
background-image: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.4));
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-width: 1px;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.3);
}
#taskbar button.active {
background-image: linear-gradient(to bottom, rgba(0,255,255,0.6), rgba(0,100,100,0.1));
}
#battery,
#network,
#clock,
#tray,
#workspaces,
#pulseaudio {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(0,0,0,0.025));
box-shadow: 0px 0px 3px rgba(0,0,0,0.34);
margin: 4px;
padding: 4px 8px;
border-radius: 8px;
color: rgb(220,220,220);
/* Important style feature in order to give a glassy look! */
/* I'm using the top and bottom borders to mimic highlights in highly reflective surfaces, looks good with the glassy-look */
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.45);
border-width: 1px;
}
#tray menu {
background-color: rgba(255,255,255,0.025);
color: rgba(220,220,220, 1);
padding: 4px;
}
#tray menu menuitem {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.15),rgba(0,0,0,0.2),rgba(0,0,0,0.4));
margin: 3px;
color: rgb(220,220,220);
border-radius: 4px;
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.3);
border-width: 1px;
}
#tray menu menuitem:hover {
background-image: linear-gradient(to bottom, rgba(0,255,255,0.15), rgba(0,0,0,0.3), rgba(0,255,255,0.15));
color: @accent_color;
text-shadow: 0px 0px 6px @accent_color;
box-shadow: 0px 0px 4px rgba(0,0,0,0.4);
}
#workspaces button {
transition-duration: 100ms;
all: initial;
min-width: 0;
color: rgb(220,220,220);
margin-right: 0.2cm;
margin-left: 0.2cm;
text-shadow: 0px 0px 4px rgb(135,135,135);
}
#workspaces button.active {
color: @accent_color;
text-shadow: 0px 0px 6px @accent_color;
}
#workspaces button:hover {
transition-duration: 120ms;
color:@accent_color;
text-shadow: 0px 0px 8px @accent_color;
}
#workspaces button.current_output {
color: @accent_color;;
}
#workspaces button.urgent {
color: #e78a4e;
text-shadow: 0px 0px 6px #e78a4e;
}
#battery.warning,
#battery.critical,
#battery.urgent {
color: #fcf520;
}
'';
############################################################
# TRANSLUCENT PRESET
############################################################
translucentStyle = ''
@define-color accent_color #20d0fc;
* {
border: none;
border-radius: 8;
min-height: 0;
/* For the taskbar, I prefer simple Noto Sans.*/
font-family: Noto Sans;
font-weight: bold;
font-size: 14px;
padding: 0px;
padding-left: 0px;
padding-right: 0px;
background: transparent;
}
window#waybar {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.25)0%, rgba(0,0,0,0.5)50%, rgba(0,0,0,0.6)50%);
border-radius: 12px;
border-width: 1px;
border-bottom-width: 1px;
padding: 0px;
border-style: solid;
border-color: rgba(255,255,255,0.2);
}
tooltip {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.15)50%, rgba(0,0,0,0.2)50%, rgba(0,0,0,0.3)50%);
color: white;
border-top-style: solid;
border-bottom-style: solid;
border-width: 1px;
border-top-color: rgba(255,255,255,0.4);
border-bottom-color: rgba(255,255,255,0.25);
}
tooltip label {
color: white;
}
#custom-os_btn {
margin-left: 0.5cm;
}
#taskbar {
margin: 4px 8px;
margin-left: 0.25cm;
color: white;
}
#taskbar button {
margin-left: 0.2cm;
margin-right: 0.2cm;
padding: 1px;
border-radius: 4px;
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-width: 1px;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.3);
box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
}
#taskbar button:hover {
background-color: rgba(0,0,0,0);
box-shadow: 0px 0px 5px rgba(0,0,0,0.5);
background-image: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.4));
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-width: 1px;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.3);
}
#taskbar button.active {
background-image: linear-gradient(to bottom, rgba(0,255,255,0.6), rgba(0,100,100,0.1));
}
#battery,
#network,
#clock,
#tray,
#workspaces,
#pulseaudio {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(0,0,0,0.025));
box-shadow: 0px 0px 3px rgba(0,0,0,0.34);
margin: 4px;
padding: 4px 8px;
border-radius: 8px;
color: rgb(220,220,220);
/* Important style feature in order to give a glassy look! */
/* I'm using the top and bottom borders to mimic highlights in highly reflective surfaces, looks good with the glassy-look */
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.45);
border-width: 1px;
}
#tray menu {
background-color: rgba(255,255,255,0.025);
color: rgba(220,220,220, 1);
padding: 4px;
}
#tray menu menuitem {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.15),rgba(0,0,0,0.2),rgba(0,0,0,0.4));
margin: 3px;
color: rgb(220,220,220);
border-radius: 4px;
border-style: none;
border-bottom-style: solid;
border-top-style: solid;
border-bottom-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.3);
border-width: 1px;
}
#tray menu menuitem:hover {
background-image: linear-gradient(to bottom, rgba(0,255,255,0.15), rgba(0,0,0,0.3), rgba(0,255,255,0.15));
color: @accent_color;
text-shadow: 0px 0px 6px @accent_color;
box-shadow: 0px 0px 4px rgba(0,0,0,0.4);
}
#workspaces button {
transition-duration: 100ms;
all: initial;
min-width: 0;
color: rgb(220,220,220);
margin-right: 0.2cm;
margin-left: 0.2cm;
text-shadow: 0px 0px 4px rgb(135,135,135);
}
#workspaces button.active {
color: @accent_color;
text-shadow: 0px 0px 6px @accent_color;
}
#workspaces button:hover {
transition-duration: 120ms;
color:@accent_color;
text-shadow: 0px 0px 8px @accent_color;
}
#workspaces button.current_output {
color: @accent_color;;
}
#workspaces button.urgent {
color: #e78a4e;
text-shadow: 0px 0px 6px #e78a4e;
}
#battery.warning,
#battery.critical,
#battery.urgent {
color: #fcf520;
}
'';
############################################################
# OPAQUE PRESET
############################################################
opaqueStyle = ''
@define-color accent_color #20d0fc;
* {
border: none;
border-radius: 8;
min-height: 0;
/* For the taskbar, I prefer simple Noto Sans.*/
font-family: Noto Sans;
font-weight: bold;
font-size: 14px;
padding: 0px;
padding-left: 0px;
padding-right: 0px;
}
window#waybar {
background-image: linear-gradient(to bottom, #ffffff, #bbbbbb);
border-radius: 12px;
padding: 0px;
}
tooltip {
background-color: rgb(255,255,255);
color: rgb(135,135,135);
text-shadow: 0px 0px 4px rgb(135,135,135);
}
#custom-os_btn {
margin-left: 0.5cm;
}
#taskbar {
margin: 4px 8px;
margin-left: 0.25cm;
}
#taskbar button {
margin-left: 0.2cm;
margin-right: 0.2cm;
padding: 1px;
border-radius: 4px;
}
#taskbar button:hover {
background-color: rgba(0,0,0,0);
box-shadow: 0px 0px 5px rgb(135,135,135);
}
#taskbar button.active {
box-shadow: 0px 0px 5px rgb(135,135,135);
}
battery
#battery,
#network,
#clock,
#tray,
#pulseaudio {
background-image: linear-gradient(to bottom, #ffffff, #bbbbbb);
box-shadow: 0px 0px 3px rgb(135,135,135);
margin: 4px;
padding: 4px 8px;
border-radius: 8px;
color: rgb(90,90,90);
text-shadow: 0px 0px 4px rgb(135,135,135);
}
#tray menu {
background-color: rgba(255,255,255, 0.5);
color: rgb(90,90,90);
text-shadow: 0px 0px 4px rgb(135,135,135);
padding: 4px;
}
#tray menu menuitem {
background-image: linear-gradient(to bottom, #ffffff, #bbbbbb);
margin: 4px;
border-radius: 4px;
box-shadow: 0px 0px 4px rgba(135,135,135, 0.45);
color: rgb(90,90,90);
}
#tray menu menuitem:hover {
color: @accent_color;
text-shadow: 0px 0px 6px @accent_color;
box-shadow: 0px 0px 6px rgba(135,135,135,1);
}
#workspaces {
background-image: linear-gradient(to bottom, #ffffff, #bbbbbb);
margin: 4px;
padding: 4px 8px;
border-radius: 8px;
box-shadow: 0px 0px 3px rgb(135,135,135);
}
#workspaces button {
transition-duration: 100ms;
all: initial;
min-width: 0;
color: rgb(90,90,90);
margin-right: 0.2cm;
margin-left: 0.2cm;
text-shadow: 0px 0px 4px rgb(135,135,135);
}
#workspaces button.active {
color: @accent_color;
text-shadow: 0px 0px 6px @accent_color;
}
#workspaces button:hover {
transition-duration: 120ms;
color:@accent_color;
text-shadow: 0px 0px 8px @accent_color;
}
#workspaces button.current_output {
color: @accent_color;;
}
#workspaces button.urgent {
color: #e78a4e;
text-shadow: 0px 0px 6px #e78a4e;
}
#battery.warning,
#battery.critical,
#battery.urgent {
color: #cc1a1a;
}
'';
############################################################
# SELECT PRESET
############################################################
selectedStyle =
if cfg.style.preset == "default"
then defaultStyle
else if cfg.style.preset == "translucent"
then translucentStyle
else if cfg.style.preset == "opaque"
then opaqueStyle
else "";
in {
programs.waybar = lib.mkIf (cfg.enable && cfg.style.preset != "none") {
style = selectedStyle;
};
}

View file

@ -0,0 +1,36 @@
{
config,
lib,
nixosVista,
...
}: let
root = nixosVista;
cfg = root.wofi;
############################################################
# Base Configuration
############################################################
baseSettings = {
term = root.terminal.command;
show_all = true;
gtk_dark = false;
location = "center";
insensitive = false;
allow_markup = true;
allow_images = true;
line_wrap = "word";
lines = 8;
width = "30%";
hide_scroll = true;
show = "drun";
};
finalSettings = baseSettings // cfg.settings.extra;
in {
programs.wofi = lib.mkIf (cfg.enable && cfg.style.preset != "none") {
enable = true;
settings = finalSettings;
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./style.nix
];
}

View file

@ -0,0 +1,235 @@
{
config,
lib,
nixosVista,
...
}: let
cfg = nixosVista.wofi;
############################################################
# DEFAULT PRESET
############################################################
defaultStyle = ''
* {
font-family: Noto Sans;
color: #ffffff;
background: transparent;
}
#window {
background: rgba(0,20,20,0.5);
border-radius: 9px;
margin: auto;
padding: 12px;
border-style: solid;
border-color: rgb(0,0,0);
border-width: 1px;
}
#input {
padding: 10px;
border-radius: 8px;
border-style: solid;
border-width: 1px;
border-color: rgb(0,0,0);
margin: 8px;
background-image: linear-gradient(to top, rgba(90,90,90,0.6), rgba(35,35,35,0.8));
box-shadow: inset 0px -5px 8px rgba(0,0,0,0.4);
}
#outer-box {
padding: 0px;
box-shadow inset 0px 0px 8px rgba(0,0,0,1);
}
#inner-box {
padding: 0px;
}
#entry {
border-radius: 10px;
border-width: 1px;
border-style: solid;
border-color: rgba(255,255,255,0.01);
border-bottom-color: rgba(255,255,255,0.25);
border-right-color: rgba(255,255,255,0.25);
padding: 4px;
margin: 4px;
margin-left: 8px;
margin-right: 8px;
background-image: linear-gradient(to bottom, rgba(255,255,255,0.3)0%, rgba(20,20,20,0.2)50%, rgba(0,0,0,0.3)50%);
}
#entry:selected {
background-color: rgba(0,255,255,0.4);
outline: none;
box-shadow: 0px 0px 6px rgba(0,0,0,0.4);
}
#img {
margin-right: 6px;
}
#text {
margin: 2px;
}
'';
############################################################
# TRANSLUCENT PRESET (Real Glass Blur)
############################################################
translucentStyle = ''
* {
font-family: Noto Sans;
color: #ffffff;
background: transparent;
}
#window {
background: rgba(0,20,20,0.5);
border-radius: 9px;
margin: auto;
padding: 12px;
border-style: solid;
border-color: rgb(0,0,0);
border-width: 1px;
}
#input {
padding: 10px;
border-radius: 8px;
border-style: solid;
border-width: 1px;
border-color: rgb(0,0,0);
margin: 8px;
background-image: linear-gradient(to top, rgba(90,90,90,0.6), rgba(35,35,35,0.8));
box-shadow: inset 0px -5px 8px rgba(0,0,0,0.4);
}
#outer-box {
padding: 0px;
box-shadow inset 0px 0px 8px rgba(0,0,0,1);
}
#inner-box {
padding: 0px;
}
#entry {
border-radius: 10px;
border-width: 1px;
border-style: solid;
border-color: rgba(255,255,255,0.01);
border-bottom-color: rgba(255,255,255,0.25);
border-right-color: rgba(255,255,255,0.25);
padding: 4px;
margin: 4px;
margin-left: 8px;
margin-right: 8px;
background-image: linear-gradient(to bottom, rgba(255,255,255,0.3)0%, rgba(20,20,20,0.2)50%, rgba(0,0,0,0.3)50%);
}
#entry:selected {
background-color: rgba(0,255,255,0.4);
outline: none;
box-shadow: 0px 0px 6px rgba(0,0,0,0.4);
}
#img {
margin-right: 6px;
}
#text {
margin: 2px;
}
'';
############################################################
# OPAQUE PRESET
############################################################
opaqueStyle = ''
* {
font-family: Noto Sans;
color: #ffffff;
background: transparent;
}
#window {
background-image: linear-gradient(to bottom, rgb(200,200,200), rgb(160,160,160));
border-radius: 9px;
margin: auto;
padding: 12px;
border-style: solid;
border-color: rgb(0,0,0);
border-width: 1px;
}
#input {
padding: 10px;
border-radius: 8px;
border-style: solid;
border-width: 1px;
border-color: rgb(18,18,18);
margin: 8px;
background-image: linear-gradient(to top, rgb(190,190,190), rgb(130,130,130));
}
#outer-box {
padding: 0px;
box-shadow inset 0px 0px 8px rgba(0,0,0,1);
}
#inner-box {
padding: 0px;
}
#entry {
border-radius: 10px;
padding: 4px;
margin: 4px;
margin-left: 8px;
margin-right: 8px;
background-image: linear-gradient(to bottom, rgba(130,130,130,0.6), rgba(20,20,20,0.8));
border-style: solid;
border-width: 1px;
border-color: rgb(18,18,18);
}
#entry:selected {
background-color: rgba(0,255,255,0.5);
outline: none;
box-shadow: 0px 0px 5px rgba(0,0,0,0.35);
}
#img {
margin-right: 6px;
}
#text {
margin: 2px;
}
'';
############################################################
# SELECT PRESET
############################################################
selectedStyle =
if cfg.style.preset == "default"
then defaultStyle
else if cfg.style.preset == "translucent"
then translucentStyle
else if cfg.style.preset == "opaque"
then opaqueStyle
else "";
in {
programs.wofi = lib.mkIf (cfg.enable && cfg.style.preset != "none") {
style = selectedStyle;
};
}