Add some RICE

This commit is contained in:
fleaz 2024-05-07 19:09:51 +02:00
parent 9e5ad4f304
commit 9960cd491a
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083
4 changed files with 82 additions and 77 deletions

View file

@ -5,6 +5,7 @@ in
{ {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
package = pkgs.swayfx;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
config = { config = {
@ -41,19 +42,59 @@ in
}; };
}; };
gaps = { inner = 8; }; gaps = { inner = 10; };
window.border = 0; window.border = 2;
window.hideEdgeBorders = "smart";
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
terminal = "foot"; terminal = "foot";
colors = {
focused = {
border = "#4c7899";
background = "#285577";
text = "#ffffff";
indicator = "#2e9ef4";
childBorder = "#285577";
};
focusedInactive = {
border = "#333333";
background = "#5f676a";
text = "#ffffff";
indicator = "#484e50";
childBorder = "#5f676a";
};
unfocused = {
border = "#333333";
background = "#222222";
text = "#888888";
indicator = "#292d2e";
childBorder = "#900000";
};
urgent = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
indicator = "#900000";
childBorder = "#900000";
};
placeholder = {
border = "#000000";
background = "#0c0c0c";
text = "#ffffff";
indicator = "#000000";
childBorder = "#0c0c0c";
};
};
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
startup = [ startup = [
{ {
command = ''${pkgs.swayidle}/bin/swayidle -w \ command = ''${pkgs.swayidle}/bin/swayidle -w \
timeout 600 "${lockCmd}" \ timeout 600 "${lockCmd}" \
timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \ timeout 900 "${pkgs.swayfx}/bin/swaymsg output * dpms off" \
resume "${pkgs.sway}/bin/swaymsg output * dpms on" \ resume "${pkgs.swayfx}/bin/swaymsg output * dpms on" \
before-sleep "${lockCmd}"''; before-sleep "${lockCmd}"'';
} }
]; ];
@ -145,6 +186,13 @@ in
}; };
}; };
extraConfig = ''
blur enable
blur_radius 10
default_dim_inactive 0.2
corner_radius 15
'';
}; };
} }

View file

@ -1,11 +1,3 @@
/* =============================================================================
*
* Waybar configuration
*
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
*
* =========================================================================== */
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Keyframes * Keyframes
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
@ -55,22 +47,34 @@
@define-color teal #8ec07c; @define-color teal #8ec07c;
@define-color gray #928374; @define-color gray #928374;
/* Reset all styles */
* { * {
border: none; border: none;
border-radius: 0; font-family: Inconsolata, Inconsolata Nerd Font, FiraCode Nerd Font Mono;
min-height: 0; font-weight: bold;
margin: 0; font-size: 14pt;
padding: 0; color: @light;
border-radius: 20px;
background: transparent;
} }
/* The whole bar */ /*-----module groups----*/
#waybar { .modules-right {
background: @dark; padding: 3px;
color: @light; background-color: @dark;
font-family: Inconsolata, Inconsolata Nerd Font, FiraCode Nerd Font Mono; margin: 5px;
font-size: 14pt; border-radius: 10px;
font-weight: bold; }
.modules-center {
padding: 3px;
background-color: @dark;
margin: 5px;
border-radius: 10px;
}
.modules-left {
padding: 3px;
margin: 5px;
background-color: @dark;
border-radius: 10px;
} }
/* All modules */ /* All modules */
@ -132,7 +136,6 @@
animation-duration: 3s; animation-duration: 3s;
} }
/* And now modules themselves in their respective order */
/* Workspaces stuff */ /* Workspaces stuff */
#workspaces button { #workspaces button {
@ -144,60 +147,14 @@
} }
#workspaces button.focused { #workspaces button.focused {
border-bottom: 2px solid @orange; border: 1px solid @orange;
} }
#workspaces button.visible:not(.focused) { #workspaces button.visible:not(.focused) {
border-bottom: 2px solid @gray; border: 1px solid @gray;
} }
#workspaces button.urgent { #workspaces button.urgent {
color: @orange; color: @orange;
} }
#mode { /* Shows current Sway mode (resize etc.) */
padding-left: 10px;
color: @light;
background: @red;
}
#window {
margin-right: 30px;
margin-left: 30px;
}
#pulseaudio {
border-bottom: 2px solid @red;
}
#network {
border-bottom: 2px solid @orange;
}
#memory {
border-bottom: 2px solid @yellow;
}
#cpu {
border-bottom: 2px solid @green;
}
#temperature {
border-bottom: 2px solid @teal;
}
#battery {
border-bottom: 2px solid @blue;
}
#tray {
}
#clock {
border-bottom: 2px solid @light;
}
#pulseaudio.muted {
/* No styles */
}

View file

@ -7,9 +7,9 @@
height = 28; height = 28;
modules-left = [ modules-left = [
"sway/workspaces" "sway/workspaces"
"sway/window"
]; ];
modules-center = [ modules-center = [
"clock"
]; ];
modules-right = [ modules-right = [
"disk" "disk"
@ -20,7 +20,6 @@
"temperature" "temperature"
"battery" "battery"
"tray" "tray"
"clock"
]; ];
modules = { modules = {
"battery" = { "battery" = {
@ -28,7 +27,7 @@
warning = 20; warning = 20;
critical = 10; critical = 10;
}; };
format = " {capacity}%"; format = " {capacity}%";
format-discharging = "{icon} {capacity}%"; format-discharging = "{icon} {capacity}%";
format-icons = [ format-icons = [
"" ""

View file

@ -1,6 +1,7 @@
{ {
# enable sway, so we have a swaylock pam config # enable sway, so we have a swaylock pam config
programs.sway.enable = true; programs.sway.enable = true;
programs.sway.package = null;
# autologin # autologin
services.greetd = { services.greetd = {