I am batman
This commit is contained in:
236
modules/hyprland/config.nix
Normal file
236
modules/hyprland/config.nix
Normal file
@@ -0,0 +1,236 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = [ ",preferred,auto,auto" ];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.swww}/bin/swww-daemon &"
|
||||
"networkmanagerapplet --indicator &"
|
||||
"$HOME/.local/share/bin/set-wallpaper.sh &"
|
||||
"${pkgs.procps}/bin/pkill -f '/bin/stash watch' || true"
|
||||
"${pkgs.pyprland}/bin/pypr &"
|
||||
];
|
||||
|
||||
env = [
|
||||
"PATH,$PATH:$HOME/.local/share/bin"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us,us";
|
||||
kb_variant = ",dvorak";
|
||||
kb_options = "grp:alt_shift_toggle";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
force_no_accel = 1;
|
||||
numlock_by_default = true;
|
||||
touchpad.natural_scroll = false;
|
||||
};
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "epic mouse V1";
|
||||
sensitivity = -0.5;
|
||||
}
|
||||
];
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
single_window_aspect_ratio = "1 1";
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 4;
|
||||
border_size = 2;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 4;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"myBezier, 0.05, 0.9, 0.1, 1.05"
|
||||
"dropdownCurve, 0.34, 1.56, 0.64, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 2, default"
|
||||
"windowsMove, 1, 2, dropdownCurve"
|
||||
];
|
||||
};
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
|
||||
xwayland.force_zero_scaling = true;
|
||||
|
||||
bindm = [
|
||||
# "SUPER, mouse_down, exec, $HOME/.local/share/bin/switch-workspace.sh down"
|
||||
# "SUPER, mouse_up, exec, $HOME/.local/share/bin/switch-workspace.sh up"
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, Z, movewindow"
|
||||
"SUPER, X, resizewindow"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"SUPER, Q, exec, $HOME/.local/share/bin/dontkillsteam.sh"
|
||||
"ALT, F4, exec, $HOME/.local/share/bin/dontkillsteam.sh"
|
||||
"SUPER, Delete, exit"
|
||||
"SUPER, W, togglefloating"
|
||||
"SUPER, G, togglegroup"
|
||||
"ALT, Return, fullscreen"
|
||||
"SUPER, L, exec, hyprlock"
|
||||
"SUPER+SHIFT, F, exec, $HOME/.local/share/bin/windowpin.sh"
|
||||
"SUPER, Backspace, exec, wlogout"
|
||||
"SUPER+CTRL+ALT, Backspace, exec, $HOME/.local/share/bin/center-window.sh"
|
||||
|
||||
"SUPER, T, exec, kitty"
|
||||
"SUPER, return, exec, kitty"
|
||||
"SUPER, E, exec, kitty -e yazi"
|
||||
"SUPER, C, exec, kitty -e nvim"
|
||||
"SUPER, F, exec, firefox"
|
||||
"SUPER+ALT, T, exec, pypr toggle term"
|
||||
|
||||
|
||||
"SUPER, A, exec, pkill -x rofi || $HOME/.local/share/bin/rofilaunch.sh d"
|
||||
"SUPER, Tab, exec, pkill -x rofi || $HOME/.local/share/bin/rofilaunch.sh w"
|
||||
"SUPER+SHIFT, E, exec, pkill -x rofi || $HOME/.local/share/bin/rofilaunch.sh f"
|
||||
|
||||
"SUPER, V, exec, $HOME/.dotfiles/scripts/cliphist-paste.sh"
|
||||
"CTRL SHIFT, ESCAPE, exec, kitty -e btop -t"
|
||||
|
||||
"SUPER, B, exec, sh -c 'systemctl --user is-active waybar && systemctl --user stop waybar || systemctl --user start waybar'"
|
||||
|
||||
"SUPER, K, exec, $HOME/.local/share/bin/keybinds_hint.sh"
|
||||
|
||||
"SUPER+ALT, A, exec, android-emulator"
|
||||
|
||||
"SUPER, N, exec, swaync-client -t"
|
||||
|
||||
", F10, exec, $HOME/.local/share/bin/volumecontrol.sh -o m"
|
||||
", F11, exec, $HOME/.local/share/bin/volumecontrol.sh -o d"
|
||||
", F12, exec, $HOME/.local/share/bin/volumecontrol.sh -o i"
|
||||
|
||||
", XF86AudioMute, exec, $HOME/.local/share/bin/volumecontrol.sh -o m"
|
||||
", XF86AudioLowerVolume, exec, $HOME/.local/share/bin/volumecontrol.sh -o d"
|
||||
", XF86AudioRaiseVolume, exec, $HOME/.local/share/bin/volumecontrol.sh -o i"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
|
||||
", XF86MonBrightnessUp, exec, $HOME/.local/share/bin/brightnesscontrol.sh i"
|
||||
", XF86MonBrightnessDown, exec, $HOME/.local/share/bin/brightnesscontrol.sh d"
|
||||
|
||||
"SUPER, P, exec, $HOME/.local/share/bin/screenshot.sh s"
|
||||
"SUPER+CTRL, P, exec, $HOME/.local/share/bin/screenshot.sh sf"
|
||||
"SUPER+ALT, P, exec, $HOME/.local/share/bin/screenshot.sh m"
|
||||
", Print, exec, $HOME/.local/share/bin/screenshot.sh p"
|
||||
|
||||
"SUPER+ALT, G, exec, $HOME/.local/share/bin/gamemode.sh"
|
||||
"SUPER+ALT, Right, exec, $HOME/.local/share/bin/set-wallpaper.sh next"
|
||||
"SUPER+ALT, Left, exec, $HOME/.local/share/bin/set-wallpaper.sh prev"
|
||||
"SUPER+SHIFT, W, exec, $HOME/.local/share/bin/set-wallpaper.sh rofi"
|
||||
|
||||
"SUPER, Left, movefocus, l"
|
||||
"SUPER, Right, movefocus, r"
|
||||
"SUPER, Up, movefocus, u"
|
||||
"SUPER, Down, movefocus, d"
|
||||
"ALT, <Tab>, movefocus, d"
|
||||
|
||||
"SUPER+Ctrl, Down, workspace, empty"
|
||||
|
||||
"SUPER+Shift, Right, resizeactive, 30 0"
|
||||
"SUPER+Shift, Left, resizeactive, -30 0"
|
||||
"SUPER+Shift, Up, resizeactive, 0 -30"
|
||||
"SUPER+Shift, Down, resizeactive, 0 30"
|
||||
"SUPER+Shift, minus, resizeactive, -30% -30%"
|
||||
"SUPER+Shift, equal, resizeactive, 30% 30%"
|
||||
|
||||
|
||||
"SUPER+SHIFT+CTRL, left, exec, $HOME/.local/share/bin/move-floating.sh l"
|
||||
"SUPER+SHIFT+CTRL, right, exec, $HOME/.local/share/bin/move-floating.sh r"
|
||||
"SUPER+SHIFT+CTRL, up, exec, $HOME/.local/share/bin/move-floating.sh u"
|
||||
"SUPER+SHIFT+CTRL, down, exec, $HOME/.local/share/bin/move-floating.sh d"
|
||||
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
"SUPER, 4, workspace, 4"
|
||||
"SUPER, 5, workspace, 5"
|
||||
"SUPER, 6, workspace, 6"
|
||||
"SUPER, 7, workspace, 7"
|
||||
"SUPER, 8, workspace, 8"
|
||||
"SUPER, 9, workspace, 9"
|
||||
"SUPER, 0, workspace, 10"
|
||||
|
||||
"SUPER+SHIFT, 1, movetoworkspace, 1"
|
||||
"SUPER+SHIFT, 2, movetoworkspace, 2"
|
||||
"SUPER+SHIFT, 3, movetoworkspace, 3"
|
||||
"SUPER+SHIFT, 4, movetoworkspace, 4"
|
||||
"SUPER+SHIFT, 5, movetoworkspace, 5"
|
||||
"SUPER+SHIFT, 6, movetoworkspace, 6"
|
||||
"SUPER+SHIFT, 7, movetoworkspace, 7"
|
||||
"SUPER+SHIFT, 8, movetoworkspace, 8"
|
||||
"SUPER+SHIFT, 9, movetoworkspace, 9"
|
||||
"SUPER+SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
"SUPER+Alt, S, movetoworkspacesilent, special"
|
||||
"SUPER, S, togglespecialworkspace"
|
||||
|
||||
"SUPER, J, togglesplit"
|
||||
|
||||
"SUPER+Alt, 1, movetoworkspacesilent, 1"
|
||||
"SUPER+Alt, 2, movetoworkspacesilent, 2"
|
||||
"SUPER+Alt, 3, movetoworkspacesilent, 3"
|
||||
"SUPER+Alt, 4, movetoworkspacesilent, 4"
|
||||
"SUPER+Alt, 5, movetoworkspacesilent, 5"
|
||||
"SUPER+Alt, 6, movetoworkspacesilent, 6"
|
||||
"SUPER+Alt, 7, movetoworkspacesilent, 7"
|
||||
"SUPER+Alt, 8, movetoworkspacesilent, 8"
|
||||
"SUPER+Alt, 9, movetoworkspacesilent, 9"
|
||||
"SUPER+Alt, 0, movetoworkspacesilent, 10"
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
source = ~/.cache/wal/colors-hyprland.conf
|
||||
|
||||
general {
|
||||
col.active_border = $color4
|
||||
col.inactive_border = $color8
|
||||
}
|
||||
'';
|
||||
};
|
||||
systemd.user.services.cliphist-watcher = {
|
||||
Unit = {
|
||||
Description = "Wayland clipboard watcher for cliphist";
|
||||
PartOf = [ "hyprland-session.target" ];
|
||||
After = [ "hyprland-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "/run/current-system/sw/bin/wl-paste --watch /run/current-system/sw/bin/cliphist store";
|
||||
Restart = "always";
|
||||
RestartSec = 1;
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "hyprland-session.target" ];
|
||||
};
|
||||
}
|
||||
10
modules/hyprland/default.nix
Normal file
10
modules/hyprland/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
# ./hypridle.nix
|
||||
./config.nix
|
||||
./pyprland.nix
|
||||
];
|
||||
}
|
||||
26
modules/hyprland/hypridle.nix
Normal file
26
modules/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{...}: {
|
||||
services = {
|
||||
hypridle = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/hyprland/hyprland.nix
Normal file
23
modules/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
# hyprpicker
|
||||
# wofi
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
# hidpi = true;
|
||||
};
|
||||
# enableNvidiaPatches = false;
|
||||
# systemd.enable = true;
|
||||
};
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
source = ~/.config/hypr/monitors.conf
|
||||
source = ~/.config/hypr/workspaces.conf
|
||||
'';
|
||||
|
||||
}
|
||||
71
modules/hyprland/hyprlock.nix
Normal file
71
modules/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 10;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
# Wallpaper path will be managed by set-wallpaper.sh script
|
||||
# which symlinks the current wallpaper to this location
|
||||
path = "$HOME/.cache/hyprlock_wallpaper";
|
||||
blur_passes = 3;
|
||||
blur_size = 3;
|
||||
}
|
||||
];
|
||||
image = [
|
||||
{
|
||||
path = "$HOME/.dotfiles/modules/fastfetch/me.png";
|
||||
size = 150;
|
||||
border_size = 4;
|
||||
# Border color will use color4 from pywal
|
||||
border_color = "rgb(142, 115, 113)";
|
||||
rounding = -1; # Negative means circle
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
label = [
|
||||
{
|
||||
# Media player information
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] $HOME/.local/share/bin/media-player-info.sh";
|
||||
text_align = "center";
|
||||
font_size = 12;
|
||||
font_family = "Monospace";
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
color = "rgb(205, 188, 187)";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
# Foreground color from pywal
|
||||
font_color = "rgb(205, 188, 187)";
|
||||
# Color2 from pywal for inner color
|
||||
inner_color = "rgb(118, 96, 95)";
|
||||
# Background from pywal for outer color
|
||||
outer_color = "rgb(10, 10, 10)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/hyprland/pyprland.nix
Normal file
17
modules/hyprland/pyprland.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [pyprland];
|
||||
|
||||
home.file.".config/hypr/pyprland.toml".text = ''
|
||||
[pyprland]
|
||||
plugins = ["scratchpads"]
|
||||
|
||||
[scratchpads.term]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class floating-term"
|
||||
class = "floating-term"
|
||||
size = "60% 60%"
|
||||
position = "center"
|
||||
on_open = "move cursor 0 0"
|
||||
lazy = true
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user