2023-06-12 22:32:34 +00:00
|
|
|
{ config, lib, pkgs, ... }: {
|
2022-09-26 22:50:43 +00:00
|
|
|
home.username = "opdavies";
|
|
|
|
home.homeDirectory = "/home/opdavies";
|
|
|
|
|
|
|
|
home.stateVersion = "22.05";
|
|
|
|
|
|
|
|
programs.home-manager.enable = true;
|
2023-06-12 07:43:37 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
services.swayidle = {
|
|
|
|
enable = true;
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
events = [
|
|
|
|
{
|
|
|
|
event = "before-sleep";
|
|
|
|
command = "${pkgs.swaylock}/bin/swaylock --daemonize --image ~/.config/wallpaper/wallpaper.jpg";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
|
|
|
services.swayidle.timeouts = [
|
|
|
|
{
|
2023-06-15 18:00:45 +00:00
|
|
|
timeout = 300;
|
2023-06-12 22:32:34 +00:00
|
|
|
command = "${pkgs.swaylock}/bin/swaylock --daemonize --image ~/.config/wallpaper/wallpaper.jpg";
|
|
|
|
}
|
2023-06-15 18:00:45 +00:00
|
|
|
|
2023-06-12 22:32:34 +00:00
|
|
|
{
|
2023-06-15 18:00:45 +00:00
|
|
|
timeout = 600;
|
2023-06-12 22:32:34 +00:00
|
|
|
command = "swaymsg 'output * dpms off'";
|
|
|
|
resumeCommand = "swaymsg 'output * dpms on'";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
programs.swaylock = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
daemonize = true;
|
|
|
|
image = "~/.config/wallpaper/wallpaper.jpg";
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
};
|
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
wayland.windowManager.sway = {
|
|
|
|
enable = true;
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
config = {
|
|
|
|
assigns = {
|
|
|
|
"1" = [{ app_id = "firefox"; }];
|
|
|
|
"2" = [{ app_id = "Alacritty"; }];
|
|
|
|
"3" = [{ class = "vlc"; }];
|
|
|
|
"10" = [
|
|
|
|
{ class = "Slack"; }
|
|
|
|
{ class = "discord"; }
|
|
|
|
];
|
|
|
|
# Get app_id with swaymsg -t get_tree
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
bars = [
|
|
|
|
{
|
|
|
|
colors = {
|
|
|
|
background = "#323232";
|
|
|
|
focusedWorkspace = {
|
|
|
|
background = "#ffffff";
|
|
|
|
border = "#ffffff";
|
|
|
|
text = "#333333";
|
|
|
|
};
|
|
|
|
statusline = "#ffffff";
|
2023-06-12 22:32:34 +00:00
|
|
|
};
|
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
fonts = {
|
|
|
|
names = [ "DejaVu Sans Mono" ];
|
|
|
|
size = 16.0;
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
statusCommand = "i3status-rs ~/.config/i3status-rust/config-default.toml";
|
|
|
|
trayPadding = 10;
|
|
|
|
}
|
|
|
|
];
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
gaps = {
|
|
|
|
inner = 10;
|
|
|
|
smartBorders = "on";
|
|
|
|
smartGaps = true;
|
2023-06-12 22:32:34 +00:00
|
|
|
};
|
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
input = {
|
|
|
|
"*" = {
|
|
|
|
xkb_layout = "gb";
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
"type:touchpad" = {
|
|
|
|
dwt = "enabled";
|
|
|
|
tap = "enabled";
|
|
|
|
};
|
2023-06-13 18:51:56 +00:00
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
keybindings =
|
|
|
|
let modifier = config.wayland.windowManager.sway.config.modifier;
|
|
|
|
in lib.mkOptionDefault {
|
|
|
|
"${modifier}+Escape" = "exec swaylock --daemonize";
|
|
|
|
"${modifier}+Shift+b" = "exec firefox";
|
|
|
|
"${modifier}+tab" = "workspace back_and_forth";
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
menu = "wofi --show run";
|
|
|
|
modifier = "Mod4";
|
|
|
|
|
|
|
|
output = {
|
|
|
|
"*" = {
|
|
|
|
bg = "~/.config/wallpaper/wallpaper.jpg fill";
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
eDP-1 = {
|
|
|
|
scale = "1.0";
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
};
|
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
terminal = "alacritty";
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
window.border = 3;
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
extraConfig = ''
|
|
|
|
set $laptop eDP-1
|
|
|
|
bindswitch --reload --locked lid:on output $laptop disable
|
|
|
|
bindswitch --reload --locked lid:off output $laptop enable
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
|
|
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-15 18:00:45 +00:00
|
|
|
for_window [class="vlc"] inhibit_idle fullscreen
|
|
|
|
'';
|
|
|
|
};
|
2023-06-12 22:32:34 +00:00
|
|
|
|
2023-06-12 07:43:37 +00:00
|
|
|
programs.i3status-rust = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
bars = {
|
|
|
|
default = {
|
|
|
|
blocks = [
|
|
|
|
{
|
|
|
|
block = "net";
|
|
|
|
format = " $ip ";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "battery";
|
|
|
|
format = " $icon $percentage $time ";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "cpu";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "memory";
|
|
|
|
format = " $icon $mem_total_used_percents.eng(w:2) ";
|
|
|
|
format_alt = " $icon_swap $swap_used_percents.eng(w:2) ";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "disk_space";
|
|
|
|
path = "/";
|
|
|
|
info_type = "available";
|
|
|
|
alert_unit = "GB";
|
|
|
|
interval = 20;
|
|
|
|
warning = 20.0;
|
|
|
|
alert = 10.0;
|
|
|
|
format = " $icon $available.eng(w:2) ";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "time";
|
|
|
|
interval = 1;
|
|
|
|
format = " $timestamp.datetime(f:'%F %T') ";
|
|
|
|
}
|
|
|
|
];
|
2023-06-12 22:32:34 +00:00
|
|
|
|
|
|
|
settings = {
|
|
|
|
theme = {
|
|
|
|
theme = "plain";
|
|
|
|
overrides = {
|
2023-06-30 23:13:51 +00:00
|
|
|
critical_bg = "#333333";
|
2023-06-12 22:32:34 +00:00
|
|
|
good_bg = "#333333";
|
|
|
|
good_fg = "#ffffff";
|
|
|
|
idle_bg = "#333333";
|
|
|
|
idle_fg = "#ffffff";
|
|
|
|
info_bg = "#333333";
|
|
|
|
info_fg = "#ffffff";
|
|
|
|
separator_bg = "#333333";
|
|
|
|
warning_bg = "#333333";
|
|
|
|
warning_fg = "#ffffff";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-06-12 07:43:37 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-09-26 22:50:43 +00:00
|
|
|
}
|