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YE6RP4IWE3AB5V3DYGO4YJU7PBTMQAC
OAVCY7YYCDLYL4V3LMWSFEFIRVNV4XDIIFKAEZBLHUHZTW7QNIGQC
TG3BV5E5KFMDDZQUFFRUQPGWEJTQ2D3SMKDAQYDQIU3W4LHCGARAC
EKNR3UNTAR2MCROCKAYF3UUJBG56ZV2AUJD4BMQYGQJ3KUZT4GKQC
COUSBBHL5XPZC5KWCYFFAE554D4VFFO55QOD726ODWIRZGWOUSUAC
HH6WAMVTZDJY4VHUQOTEAWVFOXYRLFK6LZTAPY53UZYDSCOJFSFQC
FFSRZG2H5B4VXDWNYCB46S2HGDEORNTI5SWRHXOO3NWLODAZPXOQC
XIONTGEMTEHAUZ2RBBF7L5EOHEC2Y2ZQSTOJCL6I2IHI5527QRBAC
ZH6EAGFIDERASR6IRHMOHY3RFYDIXB6SXBQZHA36X6NOENM6W43QC
5PKY2AL3ELY7NERTVH2K2SNF64ZINHWKSOJCUQTL25RJHUXSTLBQC
HUGEVM5JE52YM6XEQFPLVVZ6XAGS6DUTE4WD4ECQO2XUAWFCRPFQC
V35VSNOB6RFO6F3GDIVMZVNTUCZPYCNA4LGDBGW4HYGLFMIIOB4AC
MLRHVC6KVWGVDIQMAUMNAGWYBB6AQAJCEJY7MKDGN72JRC74VT6AC
7UWOMG432IHX7BGGN7PPQUGSSUP6CCQNBXOO7TKNMKMK2R2WFOGAC
V5HNZGTFYNRMKUU2HXDGKAPVZ35JZAQZKXSGZ337HKTDYJLQ6D2QC
JDPDRPPDSMGQSNUUIALW5ZJEUI4IUYOBBTIHQHURK36BVQFBF2WAC
{
config,
pkgs,
lib,
...
}: let
displayOn = ''${pkgs.sway}/bin/swaymsg "output * dpms on"'';
displayOff = ''${pkgs.sway}/bin/swaymsg "output * dpms off"'';
{pkgs, ...}: let
# displayOn = ''${pkgs.sway}/bin/swaymsg "output * dpms on"'';
# displayOff = ''${pkgs.sway}/bin/swaymsg "output * dpms off"'';
# ExecStart = ''
# ${pkgs.swayidle}/bin/swayidle -w \
# timeout 240 '${displayOff}' \
# resume '${displayOn}' \
# timeout 180 '${displayLock}' \
# resume 'swaymsg "${displayOn}"' \
# timeout 1200 'systemctl suspend'\
# resume 'swaymsg "${displayOn}"' \
# before-sleep '${displayLock}'
# '';
{
config,
pkgs,
lib,
...
}: {
config = lib.mkIf config.wayland.windowManager.sway.enable {
{pkgs, ...}: {
config = {
bind = $mainMod, Q, killactive,
bind = $mainMod + SHIFT, Q, exit,
bind = $mainMod + SHIFT, F, togglefloating,
bind = $mainMod, F, fullscreen,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, j, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, l, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
{...}: {
{
config,
pkgs,
lib,
...
}: let
cfg = config.dotfiles.gui.hyprland;
in {
options.dotfiles.gui.hyprland = {
enable = lib.mkEnableOption "Enable configured hyprland.";
};
imports = [
../sway/screenshots.nix
../sway/swayidle.nix
];
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
inherit (cfg) enable;
xwayland.enable = true;
systemdIntegration = true;
plugins = [];
settings = {
env = [
"GDK_BACKEND,wayland"
"XCURSOR_SIZE,24"
];
exec-once = [
"firefox & signal"
];
monitor = [
",preferred,auto,auto"
];
input = {
kb_layout = "us";
follow_mouse = 1;
natural_scroll = "yes";
sensitivity = 0.0;
numlock_by_default = true;
touchpad = {
natural_scroll = "yes";
scroll_factor = 0.5;
middle_button_emulation = true;
clickfinger_behavior = true;
};
};
general = {
gaps_in = 3;
gaps_out = 3;
border_size = 1;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
cursor_inactive_timeout = 5;
resize_on_border = true;
layout = "dwindle";
};
decoration = {
rounding = 5;
blur = {
enabled = true;
size = 3;
passes = 1;
};
active_opacity = 1.0;
inactive_opacity = 0.9825;
fullscreen_opacity = 1.0;
dim_inactive = true;
dim_strength = 0.25;
drop_shadow = "yes";
shadow_range = 4;
shadow_render_power = 3;
"col.shadow" = "rgba(1a1a1aee)";
};
animations = {
enabled = "yes";
bezier = ["windowBezier, 0.05, 0.9, 0.1, 1.05"];
animation = [
"windows, 1, 7, windowBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
master = {
new_is_master = true;
};
gestures = {
workspace_swipe = "on";
};
misc = {
animate_manual_resizes = true;
disable_hyprland_logo = false;
vrr = 2;
};
"$mainMod" = "SUPER";
bind = let
term = with config.dotfiles.gui; "${terminal}/bin/${terminal.pname}";
in [
"$mainMod, T, exec, ${term}"
"$mainMod, R, exec, ${pkgs.wofi}/bin/wofi --show drun"
];
};
extraConfig = builtins.readFile ./hyprland.conf;
};
# programs.waybar.enable = lib.mkDefault cfg.enable;
# notifications daemon
services.mako = {
enable = lib.mkDefault true;
anchor = lib.mkDefault "top-center";
defaultTimeout = lib.mkDefault 2750;
};
services.blueman-applet.enable = lib.mkDefault true;
services.gammastep = {
enable = lib.mkDefault true;
latitude = "36.174465";
longitude = "-86.767960";
};
home.packages = with pkgs; [
imv
libnotify
mpv
pavucontrol
playerctl
pulseaudio
ranger
swaylock-effects
wl-clipboard
wofi
];
};
type = types.str; # TODO maybe this should be a package instead, that would be nicer.
default = "${config.programs.alacritty.package}/bin/alacritty";
example = "/path/to/some/terminal/emulator/bin";
type = types.package;
default = config.programs.alacritty.package;
if config.programs.darktable.enable
then [signal-desktop]
if config.programs.signal.enable
then [
(signal-desktop.overrideAttrs (o: {
preFixup =
o.preFixup
+ ''
gappsWrapperArgs+=(
--add-flags "--enable-features=UseOzonePlatform"
--add-flags "--ozone-platform=wayland"
--add-flags "--enable-features=WaylandWindowDecorations"
)
'';
}))
]
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": [
"helix",
"flake-utils"
],
"nixpkgs": [
"helix",
"nixpkgs"
],
"rust-overlay": [
"helix",
"rust-overlay"
]
},
"locked": {
"lastModified": 1688772518,
"narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e",
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"locked": {
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"type": "github"
}
},
"helix": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1692458478,
"narHash": "sha256-5RUwagfeoPbPaXKyup6SwcrfT+/SyT52HCiNRVJj0XA=",
"owner": "helix-editor",
"repo": "helix",
"rev": "01a1e5ec2a8c5b81da1360746dad0a96cd88ae8e",
"nixpkgs_sirula": {
"locked": {
"lastModified": 1682879489,
"narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"helix",
"flake-utils"
],
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1690424156,
"narHash": "sha256-Bpml+L280tHTQpwpC5/BJbU4HSvEzMvW8IZ4gAXimhE=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f335a0213504c7e6481c359dc1009be9cf34432c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {