expands hypr config into different parts, makes it cool too
This commit is contained in:
parent
9eacb3d95c
commit
7b32e3330c
9 changed files with 128 additions and 84 deletions
|
|
@ -11,15 +11,20 @@
|
|||
};
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland-contrib = {
|
||||
url = "github:hyprwm/contrib";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, hyprland, ... }:
|
||||
outputs = { nixpkgs, home-manager, hyprland, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."pan" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
hyprland.homeManagerModules.default
|
||||
./home.nix
|
||||
|
|
|
|||
|
|
@ -1,80 +0,0 @@
|
|||
monitor=DP-2,2560x1440@144,0x0,1
|
||||
monitor=DP-1,2560x1440@144,-2560x0,1
|
||||
monitor=HDMI-A-1,disable
|
||||
env = HYPR_MON_PRIMARY, DP-2
|
||||
env = HYPR_MON_SECONDARY, DP-1
|
||||
|
||||
# Primaries
|
||||
workspace=name:home, monitor:DP-2, persistent:true, default:true
|
||||
workspace=name:game, monitor:DP-2, persistent:true
|
||||
workspace=name:etc0, monitor:DP-2, persistent:true
|
||||
# Secondaries
|
||||
workspace=name:chat, monitor:DP-1, persistent:true, default:true
|
||||
workspace=name:misc0, monitor:DP-1, persistent:true
|
||||
# Switches
|
||||
workspace=name:web , monitor:DP-1, persistent:true
|
||||
workspace=name:med , monitor:DP-1, persistent:true
|
||||
|
||||
windowrule = workspace name:web, librewolf
|
||||
windowrulev2 = workspace name:med, librewolf,title:Picture-in-Picture
|
||||
windowrule = workspace name:chat, discord
|
||||
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
|
||||
env = HYPR_WORK_DB,$XDG_CACHE_HOME/hypr/workspace.db
|
||||
exec-once = $XDG_CONFIG_HOME/hypr/scripts/changesecondary.xsh
|
||||
|
||||
exec-once = swww init
|
||||
exec-once = swww img $HOME/med/pix/bg.png
|
||||
|
||||
input {
|
||||
kb_layout = us
|
||||
follow_mouse = 1
|
||||
accel_profile = flat
|
||||
sensitivity = -0.52
|
||||
#sensitivity = 0.2 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
general {
|
||||
gaps_in = 3
|
||||
gaps_out = 3
|
||||
border_size = 2
|
||||
col.active_border = rgb(F5C2E7)
|
||||
col.inactive_border = rgb(1E1D2F)
|
||||
|
||||
layout = master
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding = 2
|
||||
blur {
|
||||
size = 12
|
||||
}
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
animation = windows, 1, 4, default, popin 50%
|
||||
animation = windowsOut, 1, 4, default, popin 50%
|
||||
animation = windowsMove, 1, 3, default
|
||||
animation = border, 1, 3, default
|
||||
animation = fade, 1, 3, default
|
||||
animation = workspaces, 1, 3, default
|
||||
}
|
||||
|
||||
master {
|
||||
no_gaps_when_only = true
|
||||
new_is_master = false
|
||||
}
|
||||
|
||||
Binds {
|
||||
workspace_back_and_forth = true
|
||||
}
|
||||
|
||||
windowrule = opacity 0.9 0.9,^(Alacritty)$
|
||||
windowrule = opacity 0.94 0.94,^(discord)$
|
||||
|
|
@ -1,18 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ inputs, pkgs, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
${builtins.readFile ./default.conf}
|
||||
${builtins.readFile ./window_rules.conf}
|
||||
${builtins.readFile ./settings.conf}
|
||||
${builtins.readFile ./nvidia.conf}
|
||||
${builtins.readFile ./keybinds.conf}
|
||||
${builtins.readFile ./xwaylandvideobridge.conf}
|
||||
'';
|
||||
# wayland.windowManager.hyprland.enableNvidiaPatches = true;
|
||||
home.packages = with pkgs; [
|
||||
socat # For hyprland scripts
|
||||
swww # Wallpaper engine
|
||||
wlr-randr # Xrandr for wayland
|
||||
wl-clipboard # Clipboard manager for wayland
|
||||
xdg-desktop-portal-hyprland # XDP for hyprland
|
||||
hyprpicker # Colorpicker, needed for screenshot tool
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
||||
xwaylandvideobridge # Allows screensharing with xwayland apps
|
||||
];
|
||||
# Hyprland screenshot tool
|
||||
xdg.configFile."hypr-scripts" = {
|
||||
source = rootPath + "/scripts";
|
||||
target = "hypr/scripts";
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ $mainMod = SUPER
|
|||
# Exec programs
|
||||
bind = $mainMod, return, exec, alacritty
|
||||
bind = $mainMod SHIFT, return, exec, rofi -show run
|
||||
bind = $mainMod, P, exec, grimblast --freeze copy area
|
||||
bind = $mainMod SHIFT, P, exec, grimblast --freeze copysave area
|
||||
|
||||
# Hyprland Management
|
||||
bind = $mainMod SHIFT, Q, exit,
|
||||
|
|
@ -24,6 +26,9 @@ bind = $mainMod, 4, exec, $XDG_CONFIG_HOME/hypr/scripts/changeprimary.xsh game
|
|||
binde = $mainMod, 5, exec, $XDG_CONFIG_HOME/hypr/scripts/changeprimary.xsh etc
|
||||
binde = $mainMod, TAB, exec, $XDG_CONFIG_HOME/hypr/scripts/changesecondary.xsh
|
||||
|
||||
bind = $mainMod, m, togglespecialworkspace, mus
|
||||
bind = $mainMod, i, togglespecialworkspace, scratch
|
||||
|
||||
# Window Management
|
||||
bind = $mainMod, C, killactive,
|
||||
|
||||
|
|
|
|||
6
programs/hypr/nvidia.conf
Normal file
6
programs/hypr/nvidia.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Nivida Settings
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
|
|
@ -8,6 +8,6 @@ import shelve
|
|||
with shelve.open($HYPR_WORK_DB) as db:
|
||||
db["primary"] = "home"
|
||||
db["secondary"] = "chat"
|
||||
db["secondaries"] = ["chat", "web"]
|
||||
db["secondaries"] = ["chat", "web", "med"]
|
||||
db["secondary_extras"] = 1
|
||||
db["primary_extras"] = 1
|
||||
|
|
|
|||
59
programs/hypr/settings.conf
Normal file
59
programs/hypr/settings.conf
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# Monitor Settings
|
||||
monitor=DP-2,2560x1440@144,0x0,1
|
||||
monitor=DP-1,2560x1440@144,-2560x0,1
|
||||
monitor=HDMI-A-1,disable
|
||||
|
||||
# Fix screen tearing
|
||||
env = WLR_DRM_NO_ATOMIC,1
|
||||
|
||||
# Inits
|
||||
exec-once = swww init
|
||||
exec-once = swww img $HOME/med/pix/bg.png
|
||||
|
||||
# Settings
|
||||
input {
|
||||
kb_layout = us
|
||||
follow_mouse = 1
|
||||
accel_profile = flat
|
||||
sensitivity = -0.52
|
||||
#sensitivity = 0.2 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
general {
|
||||
gaps_in = 3
|
||||
gaps_out = 3
|
||||
border_size = 2
|
||||
col.active_border = rgb(F5C2E7)
|
||||
col.inactive_border = rgb(1E1D2F)
|
||||
|
||||
layout = master
|
||||
allow_tearing = true
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding = 2
|
||||
blur {
|
||||
enabled = true
|
||||
size = 12
|
||||
passes = 2
|
||||
special = true
|
||||
}
|
||||
dim_special = 0.2
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
animation = windows, 1, 4, default, popin 50%
|
||||
animation = windowsOut, 1, 4, default, popin 50%
|
||||
animation = windowsMove, 1, 3, default
|
||||
animation = border, 1, 3, default
|
||||
animation = fade, 1, 3, default
|
||||
animation = workspaces, 1, 3, default
|
||||
}
|
||||
|
||||
master {
|
||||
no_gaps_when_only = true
|
||||
new_is_master = false
|
||||
mfact = 0.53
|
||||
}
|
||||
36
programs/hypr/window_rules.conf
Normal file
36
programs/hypr/window_rules.conf
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
env = HYPR_MON_PRIMARY, DP-2
|
||||
env = HYPR_MON_SECONDARY, DP-1
|
||||
|
||||
# Primaries
|
||||
workspace=name:home, monitor:DP-2, persistent:true, default:true
|
||||
workspace=name:game, monitor:DP-2, persistent:true
|
||||
workspace=name:etc0, monitor:DP-2, persistent:true
|
||||
# Secondaries
|
||||
workspace=name:chat, monitor:DP-1, persistent:true, default:true
|
||||
workspace=name:misc0, monitor:DP-1, persistent:true
|
||||
# Switches
|
||||
workspace=name:web , monitor:DP-1, persistent:true
|
||||
workspace=name:med , monitor:DP-1, persistent:true
|
||||
# Pseudo
|
||||
workspace=special:mus, persistent:true
|
||||
workspace=special:scratch, on-created-empty: [float; size 50% 50%; center] alacritty
|
||||
|
||||
windowrule = workspace name:web, librewolf
|
||||
windowrulev2 = workspace name:med, librewolf,title:Picture-in-Picture
|
||||
windowrule = workspace name:chat, discord
|
||||
windowrule = workspace name:chat, Beeper
|
||||
windowrule = workspace name:game, lutris
|
||||
windowrule = workspace name:game, explorer.exe
|
||||
windowrule = workspace name:game, leagueclient.exe
|
||||
windowrule = workspace name:game, leagueclientux.exe
|
||||
windowrule = workspace name:game, league of legends.exe
|
||||
windowrule = immediate, league of legends.exe
|
||||
|
||||
windowrule = opacity 0.9 0.9,^(Alacritty)$
|
||||
windowrule = opacity 0.94 0.94,^(discord)$
|
||||
|
||||
env = HYPR_WORK_DB,$XDG_CACHE_HOME/hypr/workspace.db
|
||||
|
||||
exec-once = [workspace special:mus silent;float;size 70% 70%;center] alacritty -e spt
|
||||
exec-once = [workspace name:chat silent] Discord
|
||||
exec-once = [workspace name:chat silent] beeper
|
||||
5
programs/hypr/xwaylandvideobridge.conf
Normal file
5
programs/hypr/xwaylandvideobridge.conf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
|
||||
Loading…
Add table
Add a link
Reference in a new issue