mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
hypr setup start
This commit is contained in:
parent
6adc5e377c
commit
d6749cf605
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
environment.sessionVariables = {
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
environment.etc."wireplumber/main.lua.d/99-enable-soft-mixer.lua".text = ''
|
||||
|
|
@ -164,6 +164,7 @@
|
|||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
linuxKernel.packages.linux_zen.acpi_call
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.activate-window-by-title
|
||||
gnomeExtensions.unite
|
||||
|
|
|
|||
101
home.nix
101
home.nix
|
|
@ -12,92 +12,27 @@
|
|||
size = 16;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
||||
(final: prev: {
|
||||
discordtmp = prev.discord.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
};
|
||||
})
|
||||
|
||||
(final: prev: let
|
||||
commandLineArgs = toString [
|
||||
"--enable-accelerated-mjpeg-decode"
|
||||
"--enable-accelerated-video"
|
||||
"--enable-accelerated-video-decode"
|
||||
"--enable-zero-copy"
|
||||
"--use-gl=desktop"
|
||||
#"--enable-features=UseOzonePlatform,WaylandWindowDecorations,VaapiVideoDecodeLinuxGL"
|
||||
"--enable-features=UseOzonePlatform,WaylandWindowDecorations,VaapiVideoDecodeLinuxGL,VaapiVideoEncoder"
|
||||
"--ozone-platform=wayland"
|
||||
"--no-sandbox"
|
||||
"\"$@\""
|
||||
];
|
||||
|
||||
gpuCommandLineArgs = " " + toString [
|
||||
"--ignore-gpu-blacklist"
|
||||
"--enable-native-gpu-memory-buffers"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-native-gpu-memory-buffers"
|
||||
"--enable-gpu-compositing"
|
||||
"--enable-raw-draw"
|
||||
"--use-vulkan"
|
||||
"--enable-oop-rasterization"
|
||||
"--canvas-oop-rasterization"
|
||||
] + " " + commandLineArgs;
|
||||
|
||||
#mkDiscord = args: pkgs.symlinkJoin {
|
||||
# name = "discord";
|
||||
# paths = [
|
||||
# #prev.discord
|
||||
# (pkgs.writeShellScriptBin "discord" "exec ${prev.discordtmp}/bin/discord ${args}")
|
||||
# (pkgs.writeShellScriptBin "Discord" "exec ${prev.discordtmp}/bin/Discord ${args}")
|
||||
# ];
|
||||
#};
|
||||
mkDiscord = args: pkgs.symlinkJoin {
|
||||
name = "discord";
|
||||
paths = let
|
||||
aliases = ["discord" "Discord" "disc" "dis"];
|
||||
in
|
||||
map (alias: pkgs.writeShellScriptBin alias "exec ${prev.discordtmp}/bin/discord ${args}") aliases;
|
||||
};
|
||||
|
||||
in {
|
||||
discord = mkDiscord commandLineArgs;
|
||||
discord-gpu = mkDiscord gpuCommandLineArgs;
|
||||
})
|
||||
|
||||
# VSCODIUM ###############
|
||||
(final: prev: let
|
||||
commandLineArgs = toString [
|
||||
"--enable-features=UseOzonePlatform"
|
||||
"--ozone-platform=wayland"
|
||||
"--no-sandbox"
|
||||
"\"$@\""
|
||||
];
|
||||
|
||||
mkVscode = args: pkgs.symlinkJoin {
|
||||
name = "vscode";
|
||||
paths = let
|
||||
aliases = ["code" "codium" "vscodium" "vscode"];
|
||||
in
|
||||
map (alias: pkgs.writeShellScriptBin alias "exec ${prev.vscodium}/bin/codium ${args}") aliases;
|
||||
};
|
||||
|
||||
in {
|
||||
vscodium = mkVscode commandLineArgs;
|
||||
})
|
||||
imports = [
|
||||
#hyprland.homeManagerModules.default
|
||||
#./environment
|
||||
./programs
|
||||
#./scripts
|
||||
#./themes
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
package = unstable.vscodium;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
git
|
||||
firefox
|
||||
rustdesk
|
||||
#unstable.firefox
|
||||
#unstable.curl
|
||||
#unstable.egl-wayland
|
||||
unstable.chromium
|
||||
unstable.foot
|
||||
wl-clipboard
|
||||
wl-clipboard-x11
|
||||
|
|
@ -189,11 +124,11 @@
|
|||
'';
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
#plugins =
|
||||
|
||||
};
|
||||
# wayland.windowManager.hyprland = {
|
||||
# enable = true;
|
||||
# #plugins =
|
||||
#
|
||||
# };
|
||||
|
||||
|
||||
xdg.dataFile."run" = {
|
||||
|
|
|
|||
220
programs/hypr/default.nix
Normal file
220
programs/hypr/default.nix
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
#imports = [
|
||||
# ./hyprland-environment.nix
|
||||
#];
|
||||
|
||||
#home.packages = with pkgs; [
|
||||
# waybar
|
||||
# swww
|
||||
#];
|
||||
|
||||
#test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemdIntegration = true;
|
||||
#nvidiaPatches = true;
|
||||
extraConfig = ''
|
||||
|
||||
# Monitor
|
||||
monitor=DP-1,1920x1080@165,auto,1
|
||||
|
||||
# Fix slow startup
|
||||
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
# Autostart
|
||||
|
||||
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
||||
exec-once = dunst
|
||||
|
||||
source = /home/enzo/.config/hypr/colors
|
||||
exec = pkill waybar & sleep 0.5 && waybar
|
||||
exec-once = swww init & sleep 0.5 && exec wallpaper_random
|
||||
# exec-once = wallpaper_random
|
||||
|
||||
# Set en layout at startup
|
||||
|
||||
# Input config
|
||||
input {
|
||||
kb_layout = br,us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
general {
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
border_size = 2
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
|
||||
rounding = 10
|
||||
blur = true
|
||||
blur_size = 3
|
||||
blur_passes = 1
|
||||
blur_new_optimizations = true
|
||||
|
||||
drop_shadow = true
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
bezier = ease,0.4,0.02,0.21,1
|
||||
|
||||
animation = windows, 1, 3.5, ease, slide
|
||||
animation = windowsOut, 1, 3.5, ease, slide
|
||||
animation = border, 1, 6, default
|
||||
animation = fade, 1, 3, ease
|
||||
animation = workspaces, 1, 3.5, ease
|
||||
}
|
||||
|
||||
dwindle {
|
||||
pseudotile = yes
|
||||
preserve_split = yes
|
||||
}
|
||||
|
||||
master {
|
||||
new_is_master = yes
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
windowrule=float,^(kitty)$
|
||||
windowrule=float,^(pavucontrol)$
|
||||
windowrule=center,^(kitty)$
|
||||
windowrule=float,^(blueman-manager)$
|
||||
windowrule=size 600 500,^(kitty)$
|
||||
windowrule=size 934 525,^(mpv)$
|
||||
windowrule=float,^(mpv)$
|
||||
windowrule=center,^(mpv)$
|
||||
#windowrule=pin,^(firefox)$
|
||||
|
||||
$mainMod = SUPER
|
||||
bind = $mainMod, G, fullscreen,
|
||||
|
||||
|
||||
#bind = $mainMod, RETURN, exec, cool-retro-term-zsh
|
||||
bind = $mainMod, RETURN, exec, kitty
|
||||
bind = $mainMod, B, exec, opera --no-sandbox
|
||||
bind = $mainMod, L, exec, firefox
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, F, exec, nautilus
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, w, exec, wofi --show drun
|
||||
bind = $mainMod, R, exec, rofiWindow
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Switch Keyboard Layouts
|
||||
bind = $mainMod, SPACE, exec, hyprctl switchxkblayout teclado-gamer-husky-blizzard next
|
||||
|
||||
bind = , Print, exec, grim -g "$(slurp)" - | wl-copy
|
||||
bind = SHIFT, Print, exec, grim -g "$(slurp)"
|
||||
|
||||
# Functional keybinds
|
||||
bind =,XF86AudioMicMute,exec,pamixer --default-source -t
|
||||
bind =,XF86MonBrightnessDown,exec,light -U 20
|
||||
bind =,XF86MonBrightnessUp,exec,light -A 20
|
||||
bind =,XF86AudioMute,exec,pamixer -t
|
||||
bind =,XF86AudioLowerVolume,exec,pamixer -d 10
|
||||
bind =,XF86AudioRaiseVolume,exec,pamixer -i 10
|
||||
bind =,XF86AudioPlay,exec,playerctl play-pause
|
||||
bind =,XF86AudioPause,exec,playerctl play-pause
|
||||
|
||||
# to switch between windows in a floating workspace
|
||||
bind = SUPER,Tab,cyclenext,
|
||||
bind = SUPER,Tab,bringactivetotop,
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, 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
|
||||
bindm = ALT, mouse:272, resizewindow
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".config/hypr/colors".text = ''
|
||||
$background = rgba(1d192bee)
|
||||
$foreground = rgba(c3dde7ee)
|
||||
|
||||
$color0 = rgba(1d192bee)
|
||||
$color1 = rgba(465EA7ee)
|
||||
$color2 = rgba(5A89B6ee)
|
||||
$color3 = rgba(6296CAee)
|
||||
$color4 = rgba(73B3D4ee)
|
||||
$color5 = rgba(7BC7DDee)
|
||||
$color6 = rgba(9CB4E3ee)
|
||||
$color7 = rgba(c3dde7ee)
|
||||
$color8 = rgba(889aa1ee)
|
||||
$color9 = rgba(465EA7ee)
|
||||
$color10 = rgba(5A89B6ee)
|
||||
$color11 = rgba(6296CAee)
|
||||
$color12 = rgba(73B3D4ee)
|
||||
$color13 = rgba(7BC7DDee)
|
||||
$color14 = rgba(9CB4E3ee)
|
||||
$color15 = rgba(c3dde7ee)
|
||||
'';
|
||||
}
|
||||
23
programs/hypr/hyprland-environment.nix
Normal file
23
programs/hypr/hyprland-environment.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "lvim";
|
||||
BROWSER = "librewolf";
|
||||
TERMINAL = "kitty";
|
||||
GBM_BACKEND= "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME= "nvidia";
|
||||
LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration
|
||||
__GL_VRR_ALLOWED="1";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
WLR_RENDERER = "vulkan";
|
||||
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue