Files
nixos-blueprint/hosts/sarien/work_user/desktop/jay/main.nix
unexplrd 2e6e28ef32 initial
2025-02-06 00:33:06 +02:00

309 lines
7.8 KiB
Nix

{
config,
pkgs,
...
}: {
home.packages = [pkgs.jay];
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
config.jay = {
default = ["gtk"];
"org.freedesktop.impl.portal.ScreenCast" = ["jay"];
"org.freedesktop.impl.portal.RemoteDesktop" = ["jay"];
"org.freedesktop.impl.portal.Inhibit" = ["none"];
"org.freedesktop.impl.portal.FileChooser" = ["gtk4"];
};
};
programs.i3status-rust = {
enable = true;
package = pkgs.callPackage ./i3status-rust-0-33-2.nix {};
bars = {
default = {
theme = "plain";
blocks = [
{
alert = 10.0;
block = "disk_space";
info_type = "available";
interval = 60;
path = "/";
warning = 20.0;
}
{
block = "memory";
format = " $icon mem_used_percents ";
format_alt = " $icon $swap_used_percents ";
}
{
block = "cpu";
interval = 1;
}
{
block = "load";
format = " $icon $1m ";
interval = 1;
}
{
block = "sound";
}
{
block = "time";
format = " $timestamp.datetime(f:'%a %d/%m %R') ";
interval = 60;
}
];
};
};
};
programs.i3status = {
enable = true;
enableDefault = true;
general = {
output_format = "i3bar";
interval = 1;
};
};
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "${pkgs.wezterm}/bin/wezterm -e";
fields = "filename,name,generic,keywords,categories,exec";
dpi-aware = false;
horizontal-pad = 0;
vertical-pad = 0;
show-actions = true;
match-mode = "fuzzy";
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
};
border = {
width = 3;
radius = 12;
};
};
};
xdg.configFile.jay = {
target = "jay/config.toml";
recursive = true;
source = (pkgs.formats.toml {}).generate "jay-config" {
keymap = ''
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
};
'';
on-graphics-initialized = [
# {
# type = "exec";
# exec = "mako";
# }
{
type = "exec";
exec = "~/wl-tray-bridge/target/release/wl-tray-bridge";
}
];
outputs = [
{
match.connector = "eDP-1";
scale = 1.2;
}
];
vrr = {
mode = "always";
cursor-hz = 75;
};
repeat-rate = {
rate = 50;
delay = 200;
};
theme = {
bg-color = "#${config.lib.stylix.colors.base00}";
bar-bg-color = "#${config.lib.stylix.colors.base00}";
border-color = "#${config.lib.stylix.colors.base0D}";
separator-color = "#${config.lib.stylix.colors.base01}";
bar-status-text-color = "#${config.lib.stylix.colors.base05}";
focused-title-text-color = "#${config.lib.stylix.colors.base07}";
focused-title-bg-color = "#${config.lib.stylix.colors.base00}";
focused-inactive-title-text-color = "#${config.lib.stylix.colors.base03}";
focused-inactive-title-bg-color = "#${config.lib.stylix.colors.base00}";
unfocused-title-text-color = "#${config.lib.stylix.colors.base03}";
unfocused-title-bg-color = "#${config.lib.stylix.colors.base01}";
attention-requested-bg-color = "#${config.lib.stylix.colors.base09}";
font = "${config.stylix.fonts.sansSerif.name}";
border-width = 2;
title-height = 24;
};
status = {
format = "pango";
exec = ["i3status-rs" "config-default"];
};
window-management-key = "Super_L";
shortcuts = let
left = "n";
down = "e";
up = "u";
right = "i";
in {
"logo-${left}" = "focus-left";
"logo-${down}" = "focus-down";
"logo-${up}" = "focus-up";
"logo-${right}" = "focus-right";
"logo-shift-${left}" = "move-left";
"logo-shift-${down}" = "move-down";
"logo-shift-${up}" = "move-up";
"logo-shift-${right}" = "move-right";
logo-d = "split-horizontal";
logo-v = "split-vertical";
logo-t = "toggle-split";
logo-m = "toggle-mono";
logo-shift-m = "toggle-fullscreen";
logo-f = "focus-parent";
logo-q = "close";
logo-shift-f = "toggle-floating";
alt-Return = {
type = "exec";
exec = "wezterm";
};
logo-space = {
type = "exec";
exec = "fuzzel";
};
logo-ctrl-q = "quit";
logo-shift-r = "reload-config-toml";
ctrl-alt-F1 = {
type = "switch-to-vt";
num = 1;
};
ctrl-alt-F2 = {
type = "switch-to-vt";
num = 2;
};
ctrl-alt-F3 = {
type = "switch-to-vt";
num = 3;
};
ctrl-alt-F4 = {
type = "switch-to-vt";
num = 4;
};
ctrl-alt-F5 = {
type = "switch-to-vt";
num = 5;
};
ctrl-alt-F6 = {
type = "switch-to-vt";
num = 6;
};
ctrl-alt-F7 = {
type = "switch-to-vt";
num = 7;
};
ctrl-alt-F8 = {
type = "switch-to-vt";
num = 8;
};
ctrl-alt-F9 = {
type = "switch-to-vt";
num = 9;
};
ctrl-alt-F10 = {
type = "switch-to-vt";
num = 10;
};
ctrl-alt-F11 = {
type = "switch-to-vt";
num = 11;
};
ctrl-alt-F12 = {
type = "switch-to-vt";
num = 12;
};
logo-1 = {
type = "show-workspace";
name = "1";
};
logo-2 = {
type = "show-workspace";
name = "2";
};
logo-3 = {
type = "show-workspace";
name = "3";
};
logo-4 = {
type = "show-workspace";
name = "4";
};
logo-5 = {
type = "show-workspace";
name = "5";
};
logo-6 = {
type = "show-workspace";
name = "6";
};
logo-7 = {
type = "show-workspace";
name = "7";
};
logo-8 = {
type = "show-workspace";
name = "8";
};
logo-9 = {
type = "show-workspace";
name = "9";
};
logo-0 = {
type = "show-workspace";
name = "10";
};
logo-shift-1 = {
type = "move-to-workspace";
name = "1";
};
logo-shift-2 = {
type = "move-to-workspace";
name = "2";
};
logo-shift-3 = {
type = "move-to-workspace";
name = "3";
};
logo-shift-4 = {
type = "move-to-workspace";
name = "4";
};
logo-shift-5 = {
type = "move-to-workspace";
name = "5";
};
logo-shift-6 = {
type = "move-to-workspace";
name = "6";
};
logo-shift-7 = {
type = "move-to-workspace";
name = "7";
};
logo-shift-8 = {
type = "move-to-workspace";
name = "8";
};
logo-shift-9 = {
type = "move-to-workspace";
name = "9";
};
logo-shift-0 = {
type = "move-to-workspace";
name = "10";
};
};
};
};
}