dotfiles/home/modules/hyprland.nix
Chris Cochrun a1a62a54c1 updating to make hyprland use eww now that eww can use a systray
Also including tokei and scc to count code in my projects
2024-04-10 06:29:02 -05:00

278 lines
8.5 KiB
Nix

{ config, lib, pkgs, ... }:
let
laptop = builtins.readFile "/etc/hostname" == "syl\n";
in
{
home.file.".config/hypr/hyprpaper.conf" = {
source = if laptop then /home/chris/.dotfiles/.config/hypr/hyprpaper.conf else /home/chris/.dotfiles/.config/hypr/hyprpaper.conf;
};
# home.file.".config/hypr/hyprsome" = {
# source = if laptop then /home/chris/.dotfiles/.config/hypr/hyprsome else /home/chris/.dotfiles/.config/hypr/hyprsome;
# };
wayland.windowManager.hyprland = {
enable = true;
settings = {
monitor = [
"eDP-1,2256x1504@60,0x0,1.566667"
"HDMI-A-1,preferred,0x0,1"
"DP-1,preferred,1080x0,1.5"
"DP-2,preferred,3640x0,1"
"HDMI-A-1,transform,1"
];
workspace = [
"1,monitor:eDP-1,1,default:true"
"2,monitor:HDMI-A-1,2,default:true"
"9,monitor:DP-2,9,gapsout:0,default:true"
"1,monitor:DP-1,1,default:true"
"special,monitor:DP-1,1,default:true"
];
input = {
repeat_rate = 140;
repeat_delay = 180;
natural_scroll = 0;
sensitivity = 0.75;
accel_profile = "adaptive";
follow_mouse = 2;
float_switch_override_focus = 0;
touchpad = {
natural_scroll = 1;
clickfinger_behavior = 1;
};
};
general = {
gaps_in = 15;
gaps_out = 20;
border_size = 0;
"col.active_border" = "0x66ee1111";
"col.inactive_border" = "0x66333333";
#damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer
layout = "master";
no_cursor_warps = false;
};
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 3;
};
decoration = {
rounding = 18;
# multisample_edges=true
active_opacity = 0.97;
inactive_opacity = 0.75;
fullscreen_opacity = 1.0;
blur = {
enabled = true;
size = 10; # minimum 1;
passes = 3; # minimum 1, more passes = more resource intensive.;
new_optimizations = true;
ignore_opacity = false;
special = false;
};
drop_shadow = true;
shadow_range = 15;
shadow_offset = "5 5";
shadow_scale = 0.99;
shadow_render_power = 1;
"col.shadow" = "rgba(000000cc)";
dim_inactive = false;
dim_strength = 0.2;
dim_special = 0;
};
bezier = "snapslide,0.07,0.66,0.04,1.02";
animations = {
enabled = 1;
animation = [
"windows,1,2,snapslide"
"fadeIn,1,2,snapslide"
"workspaces,1,2,snapslide"
"specialWorkspace,1,2,snapslide,slidevert"
];
};
dwindle = {
pseudotile = 0; # enable pseudotiling on dwindle
};
master = {
special_scale_factor = 0.8;
mfact = 0.65;
new_is_master = false;
new_on_top = false;
};
# misc:disable_autoreload = true
misc = {
focus_on_activate = true;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
disable_hyprland_logo = true;
};
# example window rules
# for windows named/classed as abc and xyz
windowrule = [
"opaque,firefox"
# if !laptop then "workspace 1,mpv"
"float,dolphin"
"float,nm-tray"
"size 60% 60%,dolphin"
"float,mpv"
"size ${if laptop then "90% 76%" else "85% 85%"},mpv"
"${if laptop then "workspace 1,idk #dummy rule" else "workspace 1,mpv"}"
"center,mpv"
"opaque,mpv"
"float,pulsemixer"
"workspace ${if laptop then "2" else "1"},firefox"
"workspace ${if laptop then "1" else "2"},emacs"
"float,btop"
"size 70% 70%,btop"
"center,btop"
"float,lumina"
"size 80% 80%,lumina"
"center,lumina"
"opaque,lumina"
"workspace ${if laptop then "1" else "3"},title:presentation-window"
];
# example binds
bind = [
"SUPER,RETURN,exec,alacritty"
"SUPER,C,killactive,"
"SUPERSHIFT,Q,exit,"
"SUPERSHIFT,D,exec,dolphin"
"SUPERSHIFT,F,togglefloating,"
"SUPER,w,exec,/home/chris/bin/window.sh"
"SUPER,E,exec,/home/chris/bin/emacslof"
"SUPER,d,exec,emacsclient -c -e '(dired-jump)'"
"SUPER,v,exec,cliphist list | rofi -p '󱃔 ' -dmenu -theme ~/.config/rofi/launchers-git/laptop-rbw-wayland.rasi | cliphist decode | wl-copy"
"SUPER,B,exec,/home/chris/bin/fflof"
"SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer"
"SUPERCTRL,i,exec,alacritty --class btop -e btm"
",Print,exec,screenshot"
"SUPERSHIFT,mouse_down,exec,zoomin in"
"SUPERSHIFT,mouse_up,exec,zoomin out"
"SUPER,P,exec,/home/chris/bin/rbw.sh"
"SUPER,M,fullscreen,1"
"SUPER,F,fullscreen,0"
"SUPER,h,movefocus,l"
"SUPER,l,movefocus,r"
"SUPER,k,layoutmsg,cycleprev"
"SUPER,j,layoutmsg,cyclenext"
"SUPERSHIFT,h,movewindow,l"
"SUPERSHIFT,l,movewindow,r"
"SUPERSHIFT,k,layoutmsg,swapprev"
"SUPERSHIFT,j,layoutmsg,swapnext"
"SUPERCTRL,l,splitratio,+0.05"
"SUPERCTRL,h,splitratio,-0.05"
"SUPERSHIFT,c,centerwindow"
"ALTCTRL,l,moveintogroup,right"
"ALTCTRL,h,moveintogroup,left"
"ALTCTRL,k,moveintogroup,up"
"ALTCTRL,j,moveintogroup,down"
"SUPERALT,g,togglegroup"
"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"
"SUPERALT,l,workspace,m+1"
"SUPERALT,h,workspace,m-1"
"SUPERSHIFT,1,movetoworkspace,1"
"SUPERSHIFT,2,movetoworkspace,2"
"SUPERSHIFT,3,movetoworkspace,3"
"SUPERSHIFT,4,movetoworkspace,4"
"SUPERSHIFT,5,movetoworkspace,5"
"SUPERSHIFT,6,movetoworkspace,6"
"SUPERSHIFT,7,movetoworkspace,7"
"SUPERSHIFT,8,movetoworkspace,8"
"SUPERSHIFT,9,movetoworkspace,9"
"SUPERSHIFT,0,movetoworkspace,10"
"SUPER,o,movewindow,mon:l"
"SUPER,y,togglespecialworkspace"
"SUPER,i,movewindow,left"
"SUPERSHIFT,p,pin"
"SUPER,n,movetoworkspace,special"
"SUPERALT,a,movetoworkspace,special:agenda"
"SUPER,g,togglespecialworkspace,agenda"
"SUPERSHIFT,g,exec,waybar.sh"
"SUPERALT,n,exec,eww update rightside=true"
];
binde = [
", XF86AudioMute, exec, pamixer -t"
", XF86AudioRaiseVolume, exec, /home/chris/bin/volup"
", XF86AudioLowerVolume, exec, /home/chris/bin/voldown"
",F1, exec, pamixer -t"
",F3, exec, /home/chris/bin/volup"
",F2, exec, /home/chris/bin/voldown"
", XF86MonBrightnessUp, exec, brightnessctl s +10%"
", XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
bindr = [
"SUPER,Super_L,exec,/home/chris/bin/launcher.sh"
"ALT,Alt_R,exec,/home/chris/bin/window.sh"
];
bindm = [
"SUPER,mouse:272,movewindow"
"SUPER,mouse:273,resizewindow"
];
# Blur waybar
# blurls = "gtk-layer-shell";
# blurls=notifications
exec-once = [
"kwalletd5"
"eww daemon"
"swww-daemon --format xrgb"
"eww open bar0"
"dunst"
"rbw-agent"
"/home/chris/bin/startup.sh"
"hyprctl dispatch --batch 'splitratio 1; splitration -0.35'"
"dbus-update-activation-environment --systemd --all"
"batmon.lisp"
"/usr/lib/kdeconnectd"
"nm-tray"
"systemctl --user stop jellyfin-mpv-shim"
"systemctl --user stop emacs"
"systemctl --user stop nextcloud-client"
"emacs --daemon"
"jellyfin-mpv-shim"
"nextcloud"
"kdeconnect-indicator"
"wl-paste --watch cliphist store"
"hyprctl setcursor phinger-cursors-light 24"
"swayidle -w timeout 300 'swaylock -S --effect-blur 20x3 --fade-in 1 --effect-vignette 0.5:1 --grace 60' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -S --effect-blur 20x3 --effect-vignette 0.5:1'"
"sleep 3 && swww img /home/chris/pics/wallpapers/nixorange.jpeg -t grow --transition-bezier .14,0,.14,.99"
];
};
};
}