basic sway

This commit is contained in:
k 2024-09-25 16:37:56 -04:00
parent 5f4da82057
commit 235b382535
5 changed files with 133 additions and 1 deletions

View File

@ -13,6 +13,7 @@
userName = "k";
userEmail = "markers711@gmail.com";
};
tmux = {enable = true;};
starship.enable = true;
zsh = {
enable = true;

45
hosts/home/sway.nix Normal file
View File

@ -0,0 +1,45 @@
{ config, pkgs, inputs, ... }:
{
imports = [./waybar.nix];
wayland.windowManager.sway = {
enable = true;
config = {
modifier = "Mod4";
floating.border = 0;
window.border = 1;
window.titlebar = false;
terminal = "${pkgs.foot}/bin/foot";
menu = "${pkgs.rofi}/bin/rofi -show drun -modi drun";
bars = [{ "command" = "${pkgs.waybar}/bin/waybar"; }];
gaps = {
inner = 10;
outer = 5;
};
};
};
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
MOZ_USE_XINPUT2 = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
_JAVA_AWT_WM_NONREPARENTING = 1;
};
services = {
mako = { enable = true; };
swayidle = { enable = true; };
};
home.packages = with pkgs; [ rofi alacritty waybar swaylock ];
programs = {
rofi = { enable = true; };
mako = { enable = true; };
alacritty = {enable = true; };
foot = {enable = true; };
};
}

78
hosts/home/waybar.nix Normal file
View File

@ -0,0 +1,78 @@
{ config, pkgs, ... }:
{
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "bottom";
position = "bottom";
output = [
"eDP-1"
];
modules-left = ["sway/workspaces" "sway/mode"];
modules-center = ["clock"];
modules-right = ["pulseaudio" "network" "battery"];
cpu = {
interval = 15;
format = " {}%";
max-length = 15;
};
memory = {
interval = 30;
format = " {}%";
max-length = 15;
};
"pulseaudio" = {
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}";
format-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["" ""];
};
scroll-step = 1;
on-click = "pavucontrol";
};
backlight = {
tooltip = false;
format = " {}%";
interval = 1;
on-scroll-up = "brightnessctl s 1515";
on-scroll-down = "brightnessctl s 1";
};
network = {
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰊗";
format-disconnected = "󰤮";
tooltip-format = "{ifname} via {gwaddr} 󰊗";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
battery = {
format = "{capacity}% {icon}";
"format-icons" = ["" "" "" "" ""];
};
clock = {
"format-alt" = "{:%a, %d. %b %H:%M}";
};
};
};
};
}

View File

@ -56,13 +56,16 @@
stylix = {
enable = true;
autoEnable = true;
polarity = "light";
image = ./wallpaper.png;
base16Scheme = "${pkgs.base16-schemes}/share/themes/brushtrees.yaml";
opacity = {
terminal = .85;
popups = .75;
desktop = .75;
};
cursor = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";

View File

@ -4,9 +4,9 @@
imports = [
../home/home_common.nix
../home/gnome.nix
../home/sway.nix
];
stylix.enable = true;
nixpkgs.config.allowUnfree = true;
@ -46,4 +46,9 @@
defaultEditor = true;
};
};
stylix = {
enable = true;
autoEnable = true;
};
}