Reorganize files, use less extra options on Sway, move session commands to home-manager
|
@ -16,6 +16,4 @@
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.sway.extraSessionCommands = lib.mkForce "WLR_RENDERER=gles2";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./files
|
|
||||||
./programs
|
./programs
|
||||||
./services
|
./services
|
||||||
./settings
|
./settings
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./impermanence ];
|
|
||||||
|
|
||||||
home.file = lib.mkIf config.home.desktop.enable {
|
|
||||||
".assets/wallpapers".source = ./wallpapers;
|
|
||||||
".assets/lockscreen".source = ./lockscreen;
|
|
||||||
".alsoftrc".text = "drivers=pulse";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -7,6 +7,7 @@
|
||||||
./environment
|
./environment
|
||||||
./fonts
|
./fonts
|
||||||
./gtk
|
./gtk
|
||||||
|
./impermanence
|
||||||
./locale
|
./locale
|
||||||
./nix
|
./nix
|
||||||
./qt
|
./qt
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
tower4 = "Samsung Electric Company SAMSUNG Unknown";
|
tower4 = "Samsung Electric Company SAMSUNG Unknown";
|
||||||
|
|
||||||
estradiol1 = "Dell Inc. DELL P2214H KW14V4965YKS";
|
estradiol1 = "Dell Inc. DELL P2214H KW14V4965YKS";
|
||||||
estradiol2 = "Toshiba America Info Systems Inc TOSHIBA-TV 0x01010101";
|
estradiol2 = "HannStar Display Corp iP192A 051AW1WY03797";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
{
|
{
|
||||||
criteria = config.displays.estradiol2;
|
criteria = config.displays.estradiol2;
|
||||||
position = "1920,0";
|
position = "1920,0";
|
||||||
|
scale = 0.85;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
criteria = "eDP-1";
|
criteria = "eDP-1";
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./makotoggle
|
|
||||||
];
|
|
||||||
|
|
||||||
services.mako = {
|
services.mako = {
|
||||||
enable = config.home.desktop.enable;
|
enable = config.home.desktop.enable;
|
||||||
borderColor = "#${config.look.colors.accent}";
|
borderColor = "#${config.look.colors.accent}";
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; lib.mkIf config.services.mako.enable [
|
|
||||||
(pkgs.writeScriptBin "makotoggle" ''
|
|
||||||
mode_output=$(makoctl mode)
|
|
||||||
|
|
||||||
# Extract the second line after "default"
|
|
||||||
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
|
|
||||||
|
|
||||||
if [[ "$mode_line" == "do-not-disturb" ]]; then
|
|
||||||
makoctl mode -r do-not-disturb
|
|
||||||
notify-send 'Notifications Enabled'
|
|
||||||
else
|
|
||||||
notify-send 'Notifications Disabled'
|
|
||||||
sleep 2
|
|
||||||
makoctl mode -a do-not-disturb
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -14,7 +14,7 @@
|
||||||
case $POWER in
|
case $POWER in
|
||||||
Shutdown) poweroff;;
|
Shutdown) poweroff;;
|
||||||
Reboot) reboot;;
|
Reboot) reboot;;
|
||||||
Lock) swaylock;;
|
Sleep) systemctl suspend;;
|
||||||
Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
|
Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
|
||||||
esac
|
esac
|
||||||
'')
|
'')
|
||||||
|
|
|
@ -1,53 +1,34 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
with pkgs; let
|
||||||
lockcommand = "${pkgs.swaylock-effects}/bin/swaylock --daemonize";
|
lockCommand = "${swaylock-effects}/bin/swaylock --daemonize";
|
||||||
unlockcommand = "pkill -SIGUSR1 swaylock";
|
sleepCommand = "${systemd}/bin/systemctl suspend";
|
||||||
timeoutcommand = "${pkgs.sway}/bin/swaymsg \"output * dpms off\"";
|
|
||||||
resumecommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\"";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.home.desktop.enable {
|
config = lib.mkIf config.home.desktop.enable {
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
enable = config.home.desktop.enable;
|
enable = true;
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = lockcommand;
|
command = lockCommand;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "lock";
|
event = "lock";
|
||||||
command = lockcommand;
|
command = lockCommand;
|
||||||
}
|
|
||||||
{
|
|
||||||
event = "unlock";
|
|
||||||
command = unlockcommand;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
event = "after-resume";
|
|
||||||
command = resumecommand;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
|
timeout = 900; # 15m
|
||||||
|
command = lockCommand;
|
||||||
|
}
|
||||||
|
{
|
||||||
timeout = 1800; # 30m
|
timeout = 1800; # 30m
|
||||||
command = "${pkgs.libnotify}/bin/notify-send \"Locking in 30 seconds\"";
|
command = sleepCommand;
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 1830;
|
|
||||||
command = lockcommand;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 3600; # 1h
|
|
||||||
command = timeoutcommand;
|
|
||||||
resumeCommand = resumecommand;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 3605;
|
|
||||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [ sway-audio-idle-inhibit ];
|
home.packages = with pkgs; [ wayland-pipewire-idle-inhibit ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ in {
|
||||||
package = pkgs.swaylock-effects;
|
package = pkgs.swaylock-effects;
|
||||||
settings = {
|
settings = {
|
||||||
clock = true;
|
clock = true;
|
||||||
image = "~/.assets/lockscreen/lock.png";
|
image = builtins.toString ./lock.png;
|
||||||
font = config.look.fonts.main;
|
font = config.look.fonts.main;
|
||||||
font-size = 30;
|
font-size = 30;
|
||||||
timestr = "%I:%M%p";
|
timestr = "%I:%M%p";
|
||||||
|
|
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 314 KiB |
|
@ -157,14 +157,11 @@
|
||||||
|
|
||||||
notificationModule = {
|
notificationModule = {
|
||||||
exec = pkgs.writeScript "notificationScript" ''
|
exec = pkgs.writeScript "notificationScript" ''
|
||||||
# Run makoctl mode and store the output in a variable
|
|
||||||
mode_output=$(makoctl mode)
|
|
||||||
|
|
||||||
# Extract the second line after "default"
|
# Extract the second line after "default"
|
||||||
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
|
mode=$(echo "$(makoctl mode)" | sed -n '/default/{n;p}')
|
||||||
|
|
||||||
# Print the notification status with the tooltip
|
# Print the notification status with the tooltip
|
||||||
if [[ "$mode_line" == "do-not-disturb" ]]; then
|
if [[ "$mode" == "do-not-disturb" ]]; then
|
||||||
printf '{"text":" Off","class":"disabled","tooltip":"Notifications Disabled."}'
|
printf '{"text":" Off","class":"disabled","tooltip":"Notifications Disabled."}'
|
||||||
else
|
else
|
||||||
printf '{"text":" On","tooltip":"Notifications Enabled."}';
|
printf '{"text":" On","tooltip":"Notifications Enabled."}';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config = {
|
wayland.windowManager.sway.config = {
|
||||||
bars = [{ command = "waybar"; }];
|
bars = [{ command = "waybar"; }];
|
||||||
|
@ -10,7 +10,11 @@
|
||||||
{ command = "foot -a sound -T Sound pulsemixer"; }
|
{ command = "foot -a sound -T Sound pulsemixer"; }
|
||||||
|
|
||||||
# Daemons and tray
|
# Daemons and tray
|
||||||
{ command = "sway-audio-idle-inhibit"; }
|
{
|
||||||
|
command = "kanshictl reload";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
{ command = "wayland-pipewire-idle-inhibit"; }
|
||||||
|
|
||||||
# Foreground
|
# Foreground
|
||||||
{ command = "thunderbird"; }
|
{ command = "thunderbird"; }
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./autostart
|
./autostart
|
||||||
|
./extra
|
||||||
./hotkeys
|
./hotkeys
|
||||||
./inputs
|
./inputs
|
||||||
./outputs
|
./outputs
|
||||||
|
@ -11,15 +12,12 @@
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = config.home.desktop.enable;
|
enable = config.home.desktop.enable;
|
||||||
package = null;
|
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
checkConfig = false;
|
checkConfig = false;
|
||||||
extraConfig = ''
|
extraOptions = [ "--unsupported-gpu" ];
|
||||||
default_floating_border pixel ${config.look.border.string}
|
extraSessionCommands = ''
|
||||||
hide_edge_borders --i3 smart
|
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
||||||
titlebar_padding 10 1
|
export WLR_RENDERER=vulkan
|
||||||
primary_selection disabled
|
|
||||||
mouse_warping container
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
7
modules/home/wms/sway/extra/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
wayland.windowManager.sway.extraConfig = ''
|
||||||
|
titlebar_padding 10 1
|
||||||
|
primary_selection disabled
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config = let
|
wayland.windowManager.sway.config = let
|
||||||
# Set default modifier and variables
|
# Set default modifier and variables
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
## Miscellaneous
|
## Miscellaneous
|
||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
"${primeMod}+n" = ''exec makotoggle'';
|
"${primeMod}+n" = ''exec makoctl mode -t do-not-disturb'';
|
||||||
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
||||||
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
# HID devices
|
# HID devices
|
||||||
wayland.windowManager.sway.config.input = {
|
wayland.windowManager.sway.config.input = {
|
||||||
|
@ -8,9 +8,6 @@
|
||||||
"9639:64097:Compx_2.4G_Receiver_Mouse" = {
|
"9639:64097:Compx_2.4G_Receiver_Mouse" = {
|
||||||
pointer_accel = "-0.82";
|
pointer_accel = "-0.82";
|
||||||
};
|
};
|
||||||
"1452:627:bcm5974" = {
|
|
||||||
scroll_factor = "0.3";
|
|
||||||
};
|
|
||||||
"*" = {
|
"*" = {
|
||||||
accel_profile = "flat";
|
accel_profile = "flat";
|
||||||
dwt = "disabled";
|
dwt = "disabled";
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config = {
|
wayland.windowManager.sway.config = {
|
||||||
defaultWorkspace = "1:${config.ws.w1}";
|
defaultWorkspace = "workspace 1:${config.ws.w1}";
|
||||||
|
|
||||||
|
focus = {
|
||||||
|
mouseWarping = "container";
|
||||||
|
wrapping = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
workspaceAutoBackAndForth = true;
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
titlebar = false;
|
titlebar = false;
|
||||||
|
@ -66,6 +73,5 @@
|
||||||
];
|
];
|
||||||
"44:${config.ws.w4a}" = [{ app_id = "com.obsproject.Studio"; }];
|
"44:${config.ws.w4a}" = [{ app_id = "com.obsproject.Studio"; }];
|
||||||
};
|
};
|
||||||
focus.newWindow = "focus";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,21 +31,31 @@
|
||||||
childBorder = "#${config.look.colors.urgent}";
|
childBorder = "#${config.look.colors.urgent}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
names = [ config.look.fonts.main ];
|
names = [ config.look.fonts.main ];
|
||||||
size = 10.5;
|
size = 10.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
border = config.look.border.int;
|
border = config.look.border.int;
|
||||||
|
hideEdgeBorders = "smart";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
floating.border = config.look.border.int;
|
||||||
|
|
||||||
gaps = {
|
gaps = {
|
||||||
inner = 5;
|
inner = 5;
|
||||||
smartGaps = true;
|
smartGaps = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
"*".bg = "~/.assets/wallpapers/1.png fill";
|
"*".bg = "${builtins.toString ./wallpapers/1.png} fill";
|
||||||
"${config.displays.tower2}".bg = "~/.assets/wallpapers/2.png fill";
|
|
||||||
"${config.displays.tower3}".bg = "~/.assets/wallpapers/3.png fill";
|
"${config.displays.tower2}".bg = "${builtins.toString ./wallpapers/2.png} fill";
|
||||||
|
"${config.displays.tower3}".bg = "${builtins.toString ./wallpapers/3.png} fill";
|
||||||
|
|
||||||
|
"${config.displays.estradiol2}".bg = "${builtins.toString ./wallpapers/2.png} fill";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 2 MiB After Width: | Height: | Size: 2 MiB |
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
@ -1,15 +1,7 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.system.desktop.enable {
|
config = lib.mkIf config.system.desktop.enable {
|
||||||
programs.sway = {
|
programs.sway.enable = true;
|
||||||
enable = true;
|
|
||||||
extraOptions = [ "--unsupported-gpu" ];
|
|
||||||
extraSessionCommands = ''
|
|
||||||
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
|
||||||
export WLR_RENDERER=vulkan
|
|
||||||
'';
|
|
||||||
wrapperFeatures.gtk = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
|
|