This commit is contained in:
Andrea Ciceri 2023-05-11 10:41:03 +02:00
parent fcfd36c63b
commit 202611d0b8
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
18 changed files with 174 additions and 63 deletions

View file

@ -5,12 +5,10 @@
...
}: {
imports = [
./waybar.nix
./idle.nix
./mako.nix
./gammastep.nix
# ../foot
# ../alacritty
../waybar
../swayidle
../mako
../gammastep
../kitty
];
config = {
@ -36,8 +34,6 @@
};
};
services.swayidle.enable = true;
wayland = {
windowManager.sway = let
modifier = "Mod4";

View file

@ -1,8 +0,0 @@
{
services.gammastep = {
enable = true;
latitude = "45.4";
longitude = "9.1";
tray = true;
};
}

View file

@ -1,52 +0,0 @@
{pkgs, ...}: {
services.swayidle = let
# Downgraded due to
# https://github.com/mortie/swaylock-effects/issues/95
swaylock-effects = pkgs.swaylock-effects.overrideAttrs (_: {
version = "jirutka-master";
src = pkgs.fetchFromGitHub {
owner = "jirutka";
repo = "swaylock-effects";
rev = "a7691b86dabe5241c7292c7b8d0551d579ba1848";
sha256 = "sha256-GN+cxzC11Dk1nN9wVWIyv+rCrg4yaHnCePRYS1c4JTk=";
};
});
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
${swaylock-effects}/bin/swaylock \
--daemonize \
--screenshots \
--clock \
--indicator \
--indicator-radius 100 \
--indicator-thickness 7 \
--effect-blur 7x5 \
--effect-vignette 0.5:0.5 \
--ring-color bb00cc \
--key-hl-color 880033 \
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--grace 2 \
--fade-in 0.2
'';
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
in {
enable = true;
events = [
{
event = "before-sleep";
command = swaylockCommand;
}
{
event = "lock";
command = "lock";
}
];
timeouts = [
{
timeout = 600;
command = swaylockCommand;
}
];
};
}

View file

@ -1,6 +0,0 @@
{
services.mako = {
enable = true;
defaultTimeout = 5000;
};
}

View file

@ -1,43 +0,0 @@
* {
border: none;
border-radius: 0;
min-height: 0;
font-family: Fira Code;
}
window#waybar {
background: rgba(255, 255, 255, 0.05);
color: white;
font-size: 1.2rem;
}
#workspaces button {
padding: 0 10px;
background: transparent;
color: white;
font-size: 2rem;
}
#workspaces button.focused, #workspaces button.focused, #workspaces button:hover {
background: transparent;
box-shadow: inset 0 -5px white;
/* color: @theme_fg_color; */
}
#workspaces button.urgent {
/* background: @theme_fg_color; */
/* color: @theme_selected_bg_color; */
}
#mode {
margin: 0 4px;
padding: 0 4px;
/* background: @theme_fg_color; */
/* color: @unfocused_borders; */
}
#pulseaudio, #network, #cpu, #memory, #disk, #temperature, #battery, #language, #clock, #tray {
margin: 0 4px;
padding: 0 2px;
}

View file

@ -1,112 +0,0 @@
{pkgs, ...}: {
programs.waybar = {
package = pkgs.waybar.overrideAttrs (old: {
mesonFlags = old.mesonFlags ++ ["-Dexperimental=true"];
patchPhase = ''
sed -i -e 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp
'';
});
enable = true;
style = builtins.readFile ./style.css;
settings = {
mainBar = {
ipc = true;
layer = "top";
position = "top";
height = 30;
modules-left = [
"wlr/mode"
"wlr/workspaces"
];
modules-center = ["wlr/window"];
modules-right = [
"tray"
"pulseaudio"
"network"
"cpu"
"memory"
"temperature"
"battery"
"clock"
];
"wlr/workspaces" = {
all-outputs = true;
disable-scroll-wraparound = true;
active-only = true;
format = "{icon}";
on-click = "activate";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"9" = "";
urgent = "";
};
sort-by-number = true;
};
"wlr/mode" = {tooltip = false;};
"wlr/window" = {max_length = 50;};
tray = {
spacing = 10;
};
battery = {
format = "{capacity}% {icon}";
format-alt = "{time} {icon}";
format-charging = "{capacity}% ";
format-icons = ["" "" "" "" ""];
format-plugged = "{capacity}% ";
states = {
critical = 15;
warning = 30;
};
};
clock = {
format-alt = "{:%Y-%m-%d}";
tooltip-format = "{:%Y-%m-%d | %H:%M}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = {format = "{}% ";};
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";
format-disconnected = "Disconnected ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits} down: {bandwidthDownBits}";
format-linked = "{ifname} (No IP) ";
format-wifi = "{essid} ({signalStrength}%) ";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-icons = {
car = "";
default = ["" "" ""];
handsfree = "";
headphones = "";
headset = "";
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
"wlr/mode" = {format = ''<span style="italic">{}</span>'';};
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = ["" "" ""];
hwmon-path = "/sys/class/thermal/thermal_zone4/temp";
};
};
};
};
}