Compare commits
No commits in common. "4500bace9c25b0d6d8bfb63f5f69cfd5599e3847" and "f7307329ab45662ef1312e77abda44d23392592b" have entirely different histories.
4500bace9c
...
f7307329ab
8 changed files with 71 additions and 185 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
./programs/git.nix
|
./programs/git.nix
|
||||||
./programs/lf/.
|
./programs/lf/.
|
||||||
./programs/zsh.nix
|
./programs/zsh.nix
|
||||||
./programs/tmux/.
|
./programs/tmux.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,18 @@
|
||||||
}: let
|
}: let
|
||||||
modifier = config.windowManager.modifierKey;
|
modifier = config.windowManager.modifierKey;
|
||||||
menu = config.programs.menu.dmenuCommand;
|
menu = config.programs.menu.dmenuCommand;
|
||||||
|
lock_cmd = "${config.programs.hyprlock.package}/bin/hyprlock";
|
||||||
|
color = {
|
||||||
|
inherit (config.lib.stylix.colors) yellow red;
|
||||||
|
bg = config.lib.stylix.colors.base00;
|
||||||
|
fg = config.lib.stylix.colors.base07;
|
||||||
|
text = config.lib.stylix.colors.base05;
|
||||||
|
};
|
||||||
|
rgb = color: "rgb(${color})";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(import ../utils/waybar.nix)
|
(import ../utils/waybar.nix)
|
||||||
(import ../utils/display.nix)
|
(import ../utils/display.nix)
|
||||||
(import ../utils/hypridle.nix)
|
|
||||||
../../workstation.nix
|
../../workstation.nix
|
||||||
];
|
];
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
|
|
@ -19,6 +26,64 @@ in {
|
||||||
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr];
|
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
before_sleep_cmd = "rbw lock; hyprlock";
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
ignore_dbus_inhibit = false;
|
||||||
|
lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
on-timeout = "loginctl lock-session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = lib.mkForce {
|
||||||
|
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/
|
||||||
|
general = {
|
||||||
|
hide_cursor = true;
|
||||||
|
grace = 10;
|
||||||
|
ignore_empty_input = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "screenshot";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 8;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = true;
|
||||||
|
outline_thickness = 5;
|
||||||
|
shadow_passes = 2;
|
||||||
|
inner_color = rgb color.bg;
|
||||||
|
outer_color = rgb color.fg;
|
||||||
|
font_color = rgb color.text;
|
||||||
|
fail_color = rgb color.red;
|
||||||
|
check_color = rgb color.yellow;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,6 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
|
||||||
(import ../utils/hypridle.nix)
|
|
||||||
(import ../utils/waybar.nix)
|
|
||||||
../../workstation.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.waybar.settings.mainBar.modules-left = ["niri/workspaces" "niri/window"];
|
|
||||||
|
|
||||||
programs.fuzzel = {
|
programs.fuzzel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -23,18 +15,15 @@
|
||||||
};
|
};
|
||||||
services.hyprpaper.enable = true;
|
services.hyprpaper.enable = true;
|
||||||
systemd.user.services.hyprpaper.Unit.WantedBy = ["niri.service"];
|
systemd.user.services.hyprpaper.Unit.WantedBy = ["niri.service"];
|
||||||
systemd.user.services.waybar.Unit.WantedBy = ["niri.service"];
|
|
||||||
|
|
||||||
home.packages = with pkgs; [brightnessctl];
|
home.packages = with pkgs; [brightnessctl];
|
||||||
|
|
||||||
services.mako.enable = true;
|
services.mako.enable = true;
|
||||||
systemd.user.services.mako.Unit.WantedBy = ["niri.service"];
|
|
||||||
programs.niri = {
|
programs.niri = {
|
||||||
settings = {
|
settings = {
|
||||||
input.keyboard = {
|
input.keyboard = {
|
||||||
xkb.layout = "us";
|
xkb.layout = "us";
|
||||||
xkb.variant = "dvorak";
|
xkb.variant = "dvorak";
|
||||||
xkb.options = "caps:escape";
|
|
||||||
};
|
};
|
||||||
input.mouse = {
|
input.mouse = {
|
||||||
accel-profile = "flat";
|
accel-profile = "flat";
|
||||||
|
|
@ -45,35 +34,8 @@
|
||||||
prefer-no-csd = true;
|
prefer-no-csd = true;
|
||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
{command = [(lib.getExe pkgs.xwayland-satellite)];}
|
{command = [(lib.getExe pkgs.xwayland-satellite)];}
|
||||||
|
{command = [(lib.getExe config.services.mako.package)];}
|
||||||
];
|
];
|
||||||
layout = {
|
|
||||||
preset-column-widths = [
|
|
||||||
{proportion = 1.0;}
|
|
||||||
{proportion = 1.0 / 2.0;}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
DISPLAY = ":1";
|
|
||||||
};
|
|
||||||
outputs."DP-3" = {
|
|
||||||
mode = {
|
|
||||||
width = 1920;
|
|
||||||
height = 1080;
|
|
||||||
refresh = 143.855;
|
|
||||||
};
|
|
||||||
variable-refresh-rate = true;
|
|
||||||
scale = 1.0;
|
|
||||||
};
|
|
||||||
outputs."HDMI-A-1" = {
|
|
||||||
mode = {
|
|
||||||
width = 3840;
|
|
||||||
height = 2160;
|
|
||||||
refresh = 120.0;
|
|
||||||
};
|
|
||||||
variable-refresh-rate = true;
|
|
||||||
scale = 2.5;
|
|
||||||
};
|
|
||||||
binds = with config.lib.niri.actions; {
|
binds = with config.lib.niri.actions; {
|
||||||
"Mod+Return".action.spawn = [(lib.getExe config.programs.terminal)];
|
"Mod+Return".action.spawn = [(lib.getExe config.programs.terminal)];
|
||||||
"Mod+O".action.spawn = [(lib.getExe pkgs.cosmic-files)];
|
"Mod+O".action.spawn = [(lib.getExe pkgs.cosmic-files)];
|
||||||
|
|
@ -85,14 +47,12 @@
|
||||||
"Mod+Ctrl+WheelScrollRight".action = move-column-right;
|
"Mod+Ctrl+WheelScrollRight".action = move-column-right;
|
||||||
|
|
||||||
"Mod+Right".action = focus-column-right;
|
"Mod+Right".action = focus-column-right;
|
||||||
"Mod+Ctrl+Right".action = move-column-right;
|
|
||||||
"Mod+L".action = focus-column-right;
|
"Mod+L".action = focus-column-right;
|
||||||
"Mod+Ctrl+L".action = move-column-right;
|
"Mod+Ctrl+L".action = move-column-right;
|
||||||
|
|
||||||
"Mod+WheelScrollLeft".action = focus-column-left;
|
"Mod+WheelScrollLeft".action = focus-column-left;
|
||||||
"Mod+Ctrl+WheelScrollLeft".action = move-column-left;
|
"Mod+Ctrl+WheelScrollLeft".action = move-column-left;
|
||||||
"Mod+Left".action = focus-column-left;
|
"Mod+Left".action = focus-column-left;
|
||||||
"Mod+Ctrl+Left".action = move-column-left;
|
|
||||||
"Mod+H".action = focus-column-left;
|
"Mod+H".action = focus-column-left;
|
||||||
"Mod+Ctrl+H".action = move-column-left;
|
"Mod+Ctrl+H".action = move-column-left;
|
||||||
|
|
||||||
|
|
@ -102,28 +62,16 @@
|
||||||
"Mod+Comma".action = consume-or-expel-window-left;
|
"Mod+Comma".action = consume-or-expel-window-left;
|
||||||
"Mod+Period".action = consume-or-expel-window-right;
|
"Mod+Period".action = consume-or-expel-window-right;
|
||||||
|
|
||||||
"Mod+F".action = fullscreen-window;
|
|
||||||
"Mod+Q".action = close-window;
|
"Mod+Q".action = close-window;
|
||||||
|
|
||||||
"Mod+Shift+Escape".action = quit;
|
"Mod+Shift+Escape".action = quit;
|
||||||
"Mod+Escape".action.spawn = lib.getExe config.programs.hyprlock.package;
|
|
||||||
|
|
||||||
"Mod+WheelScrollDown".action = focus-workspace-down;
|
"Mod+WheelScrollDown".action = focus-workspace-down;
|
||||||
"Mod+WheelScrollUp".action = focus-workspace-up;
|
"Mod+WheelScrollUp".action = focus-workspace-up;
|
||||||
"Mod+Ctrl+WheelScrollDown".action = move-column-to-workspace-down;
|
"Mod+Ctrl+WheelScrollDown".action = move-column-to-workspace-down;
|
||||||
"Mod+Ctrl+WheelScrollUp".action = move-column-to-workspace-up;
|
"Mod+Ctrl+WheelScrollUp".action = move-column-to-workspace-up;
|
||||||
|
|
||||||
"Mod+J".action = focus-workspace-down;
|
"Mod+M".action = maximize-column;
|
||||||
"Mod+K".action = focus-workspace-up;
|
|
||||||
"Mod+Ctrl+J".action = move-column-to-workspace-down;
|
|
||||||
"Mod+Ctrl+K".action = move-column-to-workspace-up;
|
|
||||||
|
|
||||||
"Mod+Down".action = focus-workspace-down;
|
|
||||||
"Mod+Up".action = focus-workspace-up;
|
|
||||||
"Mod+Ctrl+Down".action = move-column-to-workspace-down;
|
|
||||||
"Mod+Ctrl+Up".action = move-column-to-workspace-up;
|
|
||||||
|
|
||||||
"Mod+M".action = switch-preset-column-width;
|
|
||||||
"Mod+G".action = toggle-window-floating;
|
"Mod+G".action = toggle-window-floating;
|
||||||
|
|
||||||
"Print".action = screenshot;
|
"Print".action = screenshot;
|
||||||
|
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
rgb = color: "rgb(${color})";
|
|
||||||
lock_cmd = "${config.programs.hyprlock.package}/bin/hyprlock";
|
|
||||||
color = {
|
|
||||||
inherit (config.lib.stylix.colors) yellow red;
|
|
||||||
bg = config.lib.stylix.colors.base00;
|
|
||||||
fg = config.lib.stylix.colors.base07;
|
|
||||||
text = config.lib.stylix.colors.base05;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
services.hypridle = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
before_sleep_cmd = "rbw lock; hyprlock";
|
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
||||||
ignore_dbus_inhibit = false;
|
|
||||||
lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}";
|
|
||||||
};
|
|
||||||
|
|
||||||
listener = [
|
|
||||||
{
|
|
||||||
timeout = 300;
|
|
||||||
on-timeout = "loginctl lock-session";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 1200;
|
|
||||||
on-timeout = "hyprctl dispatch dpms off";
|
|
||||||
on-resume = "hyprctl dispatch dpms on";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.hyprlock = {
|
|
||||||
enable = true;
|
|
||||||
settings = lib.mkForce {
|
|
||||||
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/
|
|
||||||
general = {
|
|
||||||
hide_cursor = true;
|
|
||||||
grace = 10;
|
|
||||||
ignore_empty_input = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
background = [
|
|
||||||
{
|
|
||||||
path = "screenshot";
|
|
||||||
blur_passes = 3;
|
|
||||||
blur_size = 8;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
input-field = [
|
|
||||||
{
|
|
||||||
dots_center = true;
|
|
||||||
fade_on_empty = true;
|
|
||||||
outline_thickness = 5;
|
|
||||||
shadow_passes = 2;
|
|
||||||
inner_color = rgb color.bg;
|
|
||||||
outer_color = rgb color.fg;
|
|
||||||
font_color = rgb color.text;
|
|
||||||
fail_color = rgb color.red;
|
|
||||||
check_color = rgb color.yellow;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -7,24 +7,9 @@
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
position = "top";
|
position = "top";
|
||||||
height = 36;
|
height = 36;
|
||||||
modules-right = ["mpris" "power-profiles-daemon" "cpu" "idle_inhibitor" "pulseaudio" "clock" "tray" "battery"];
|
modules-right = ["mpris" "idle_inhibitor" "pulseaudio" "clock" "tray" "battery"];
|
||||||
"cpu" = {
|
|
||||||
"format" = "{icon}";
|
|
||||||
"format-icons" = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
|
||||||
};
|
|
||||||
"power-profiles-daemon" = {
|
|
||||||
"format" = "{icon}";
|
|
||||||
"tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
|
|
||||||
"tooltip" = true;
|
|
||||||
"format-icons" = {
|
|
||||||
"default" = "";
|
|
||||||
"performance" = "";
|
|
||||||
"balanced" = "";
|
|
||||||
"power-saver" = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
clock = {
|
clock = {
|
||||||
format = "📅 {:%a %b-%d, %I:%M %p}";
|
format = "📅 {:%a %b-%d %I:%M %p}";
|
||||||
};
|
};
|
||||||
idle_inhibitor = {
|
idle_inhibitor = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
sessionizer = lib.getExe (pkgs.writeShellScriptBin "tmux-sessionizer" (lib.readFile ./sessionizer.sh));
|
|
||||||
in {
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
baseIndex = 1;
|
baseIndex = 1;
|
||||||
|
|
@ -31,12 +25,8 @@ in {
|
||||||
bind -n M-u copy-mode
|
bind -n M-u copy-mode
|
||||||
bind -n M-p previous-window
|
bind -n M-p previous-window
|
||||||
bind -n M-n next-window
|
bind -n M-n next-window
|
||||||
bind-key -r f run-shell "tmux neww ${sessionizer}"
|
|
||||||
|
|
||||||
set-option -g renumber-windows on
|
set-option -g renumber-windows on
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
programs.zsh.initContent = ''
|
|
||||||
bindkey -s ^f "${sessionizer}\n"
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [[ $# -eq 1 ]]; then
|
|
||||||
selected=$1
|
|
||||||
else
|
|
||||||
selected=$(find ~/Documents/code ~/Documents/infra -mindepth 1 -maxdepth 1 -type d | fzf)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $selected ]]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
selected_name=$(basename "$selected" | tr . _)
|
|
||||||
tmux_running=$(pgrep tmux)
|
|
||||||
|
|
||||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
|
||||||
tmux new-session -s $selected_name -c $selected
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! tmux has-session -t=$selected_name 2> /dev/null; then
|
|
||||||
tmux new-session -ds $selected_name -c $selected
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $TMUX ]]; then
|
|
||||||
tmux attach -t $selected_name
|
|
||||||
else
|
|
||||||
tmux switch-client -t $selected_name
|
|
||||||
fi
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
playerctl
|
playerctl
|
||||||
quickemu
|
quickemu
|
||||||
devenv
|
devenv
|
||||||
bottles
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.udiskie = {
|
services.udiskie = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue