hyprland: more improvements

This commit is contained in:
Leonardo Eugênio 2024-01-21 01:24:23 -03:00
parent f3ef679499
commit fb323ec227
7 changed files with 64 additions and 10 deletions

View file

@ -7,6 +7,12 @@
''; '';
}; };
wayland.windowManager.hyprland.extraConfig = ''
exec-once = thunderbird
exec-once = webcord
exec-once = telegram-desktop
'';
home.packages = with pkgs; [ home.packages = with pkgs; [
tdesktop tdesktop
webcord webcord

View file

@ -172,6 +172,13 @@
exec nicotine exec nicotine
''; '';
wayland.windowManager.hyprland.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") ''
exec-once = steam
exec-once = obs --startreplaybuffer
exec-once = deluge-gtk
exec-once = nicotine
'';
systemd.user.services.rm-target = { systemd.user.services.rm-target = {
Unit = { Unit = {
Description = "Remove directories named 'target'"; Description = "Remove directories named 'target'";

View file

@ -1,4 +1,8 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }:
let
inherit (pkgs.uservars) theme;
in
{
imports = [ imports = [
../sway/kanshi.nix ../sway/kanshi.nix
../sway/mako.nix ../sway/mako.nix
@ -11,11 +15,19 @@
]; ];
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") { config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
services.mako.enable = true;
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = false; enable = true;
extraConfig = lib.readFile ./hyprland.conf; extraConfig = ''
source = /home/lelgenio/projects/nixos-config/user/hyprland/hyprland.conf
'';
systemd.enable = true; systemd.enable = true;
}; };
home.file.".config/hypr/hyprpaper.conf".text = ''
preload = ${theme.background}
wallpaper = ,${theme.background}
'';
# home.file.".config/eww".source = ./eww; # home.file.".config/eww".source = ./eww;
packages.firefox.hideTitleBar = true; packages.firefox.hideTitleBar = true;

View file

@ -14,12 +14,12 @@ OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto monitor=,preferred,auto,auto
monitor=DP-1,1920x1080@144,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch # Execute your favorite apps at launch
exec-once = waybar & hyprpaper & firefox exec-once = hyprpaper & firefox
# Source a file (multi-file configs) # Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf # source = ~/.config/hypr/myColors.conf
@ -99,7 +99,7 @@ dwindle {
master { master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true new_is_master = false
no_gaps_when_only = 1 no_gaps_when_only = 1
} }
@ -164,6 +164,9 @@ bind = $mainMod, X, killactive,
# bind = $mainMod, M, exit, # bind = $mainMod, M, exit,
bind = $mainMod Control, Return, exec, thunar bind = $mainMod Control, Return, exec, thunar
bind = $mainMod Shift, Space, togglefloating, bind = $mainMod Shift, Space, togglefloating,
bind = $mainMod Control, z, exec, swaylock & systemctl suspend
bind = $mainMod, R, exec, wofi --show drun bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, J, togglesplit, # dwindle
@ -213,6 +216,9 @@ bindm = $mainMod, mouse:273, resizewindow
bind = $mainMod, S, exec, wlauncher bind = $mainMod, S, exec, wlauncher
bind = $mainMod, B, layoutmsg, swapwithmaster bind = $mainMod, B, layoutmsg, swapwithmaster
bind = $mainMod Shift, E, layoutmsg, swapnext
bind = $mainMod Shift, I, layoutmsg, swapprev
bind=$mainMod,f,fullscreen bind=$mainMod,f,fullscreen
bind=$mainMod,n,movefocus,l bind=$mainMod,n,movefocus,l
@ -252,3 +258,25 @@ bind = $mainMod, B, layoutmsg, swapwithmaster
bind=$mainMod,mouse_down,workspace,e-1 bind=$mainMod,mouse_down,workspace,e-1
bind=$mainMod,mouse_up,workspace,e+1 bind=$mainMod,mouse_up,workspace,e+1
# Music mode
bind=$mainMod,M,submap,music
submap=music
binde=,Space,exec,mpc toggle
binde=,U,exec,volumesh -i 10
binde=,Y,exec,volumesh -d 10
binde=,O,exec,mpc next
binde=,N,exec,mpc prev
binde=,I,exec,volumesh --mpd -i 10
binde=,E,exec,volumesh --mpd -d 10
binde=,s,exec,pulse_sink
# use reset to go back to the global submap
bind=,escape,submap,reset
# will reset the submap, meaning end the current one and return to the global one
submap=reset

View file

@ -1,11 +1,12 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
inherit (pkgs.uservars) key accent font theme; inherit (pkgs.uservars) key accent font theme desktop;
inherit (theme) color; inherit (theme) color;
in in
{ {
services.mako = { services.mako = {
borderSize = 2; borderSize = 2;
borderRadius = if desktop == "sway" then 0 else 5;
padding = "5"; padding = "5";
margin = "15"; margin = "15";
layer = "overlay"; layer = "overlay";

View file

@ -128,7 +128,7 @@ rec {
pass = "disroot.org"; pass = "disroot.org";
}; };
dmenu = "bmenu"; dmenu = "rofi";
desktop = "hyprland"; desktop = "hyprland";
browser = "firefox"; browser = "firefox";
editor = "kakoune"; editor = "kakoune";

View file

@ -1,6 +1,6 @@
{ config, osConfig, pkgs, lib, font, ... }: { config, osConfig, pkgs, lib, font, ... }:
let let
inherit (pkgs.uservars) key theme accent font; inherit (pkgs.uservars) key theme accent font desktop;
inherit (theme) color; inherit (theme) color;
in in
{ {
@ -8,7 +8,7 @@ in
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
systemd.target = "sway-session.target"; systemd.target = "${desktop}-session.target";
settings = [{ settings = [{
layer = "top"; layer = "top";
modules-left = [ modules-left = [