fixing emacs and using nix to configure hyprland

This commit is contained in:
Chris Cochrun 2024-03-20 09:32:26 -05:00
parent 52c1a79d2e
commit 40293e1c71
2 changed files with 177 additions and 164 deletions

View file

@ -16,17 +16,17 @@ in
settings = { settings = {
monitor = [ monitor = [
"eDP-1,2256x1504@60,0x0,1.566667" "eDP-1,2256x1504@60,0x0,1.566667"
HDMI-A-1,preferred,0x0,1 "HDMI-A-1,preferred,0x0,1"
DP-1,preferred,1080x0,1.5 "DP-1,preferred,1080x0,1.5"
DP-2,preferred,3640,1 "DP-2,preferred,3640,1"
HDMI-A-1,transform,1 "HDMI-A-1,transform,1"
]; ];
workspace = [ workspace = [
1,monitor:eDP-1,1,default:true "1,monitor:eDP-1,1,default:true"
2,monitor:HDMI-A-1,2,default:true "2,monitor:HDMI-A-1,2,default:true"
9,monitor:DP-2,9,gapsout:0,default:true "9,monitor:DP-2,9,gapsout:0,default:true"
1,monitor:DP-1,1,default:true "1,monitor:DP-1,1,default:true"
special,monitor:DP-1,1,default:true "special,monitor:DP-1,1,default:true"
]; ];
input = { input = {
repeat_rate = 140; repeat_rate = 140;
@ -34,7 +34,7 @@ in
natural_scroll = 0; natural_scroll = 0;
sensitivity = 0.75; sensitivity = 0.75;
accel_profile = adaptive; accel_profile = "adaptive";
follow_mouse = 2; follow_mouse = 2;
float_switch_override_focus = 0; float_switch_override_focus = 0;
@ -49,11 +49,11 @@ in
gaps_in = 15; gaps_in = 15;
gaps_out = 20; gaps_out = 20;
border_size = 0; border_size = 0;
col.active_border = 0x66ee1111; "col.active_border" = "0x66ee1111";
col.inactive_border = 0x66333333; "col.inactive_border" = "0x66333333";
#damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer #damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer
layout = master; layout = "master";
no_cursor_warps = false; no_cursor_warps = false;
}; };
@ -71,8 +71,8 @@ in
blur = { blur = {
enabled = true; enabled = true;
size = 10 # minimum 1; size = 10; # minimum 1;
passes = 3 # minimum 1, more passes = more resource intensive.; passes = 3; # minimum 1, more passes = more resource intensive.;
new_optimizations = true; new_optimizations = true;
ignore_opacity = false; ignore_opacity = false;
special = false; special = false;
@ -80,24 +80,25 @@ in
drop_shadow = true; drop_shadow = true;
shadow_range = 15; shadow_range = 15;
shadow_offset = 5 5; shadow_offset = "5 5";
shadow_scale = 0.99; shadow_scale = 0.99;
shadow_render_power = 1; shadow_render_power = 1;
col.shadow = rgba(000000cc); "col.shadow" = "rgba(000000cc)";
dim_inactive = true; dim_inactive = true;
dim_strength = 0.2; dim_strength = 0.2;
dim_special = 0; dim_special = 0;
}; };
bezier = snapslide,0.07,0.66,0.04,1.02; bezier = "snapslide,0.07,0.66,0.04,1.02";
animations = { animations = {
enabled = 1; enabled = 1;
animation = windows,1,2,snapslide; animation = [
# animation=borders,1,10,default "windows,1,2,snapslide"
animation = fadeIn,1,2,snapslide; "fadeIn,1,2,snapslide"
animation = workspaces,1,2,snapslide; "workspaces,1,2,snapslide"
animation = specialWorkspace,1,2,snapslide,slidevert; "specialWorkspace,1,2,snapslide,slidevert"
];
}; };
dwindle = { dwindle = {
@ -121,140 +122,152 @@ in
# example window rules # example window rules
# for windows named/classed as abc and xyz # for windows named/classed as abc and xyz
windowrule = opaque,firefox; windowrule = [
windowrule = float,dolphin; "opaque,firefox"
windowrule = float,nm-tray; # if !laptop then "workspace 1,mpv"
windowrule = size 60% 60%,dolphin; "float,dolphin"
${if !laptop then windowrule = workspace 1,mpv;} "float,nm-tray"
windowrule = float,mpv; "size 60% 60%,dolphin"
windowrule = size ${if laptop then "90% 76%" else "85% 85%"},mpv; "float,mpv"
windowrule = center,mpv; "size ${if laptop then "90% 76%" else "85% 85%"},mpv"
windowrule = opaque,mpv; "center,mpv"
# windowrule=pin,mpv "opaque,mpv"
windowrule = float,pulsemixer; "float,pulsemixer"
windowrule = workspace ${if laptop then "2" else "1"},firefox; "workspace ${if laptop then "2" else "1"},firefox"
windowrule = workspace ${if laptop then "1" else "2"},emacs; "workspace ${if laptop then "1" else "2"},emacs"
windowrule = float,btop; "float,btop"
windowrule = size 70% 70%,btop; "size 70% 70%,btop"
windowrule = center,btop; "center,btop"
windowrule = float,lumina; "float,lumina"
windowrule = size 80% 80%,lumina; "size 80% 80%,lumina"
windowrule = center,lumina; "center,lumina"
windowrule = workspace ${if laptop then "1" else "3"},title:presentation-window; "workspace ${if laptop then "1" else "3"},title:presentation-window"
];
# example binds # example binds
bind = SUPER,RETURN,exec,alacritty; bind = [
bind = SUPER,C,killactive,; "SUPER,RETURN,exec,alacritty"
bind = SUPERSHIFT,Q,exit,; "SUPER,C,killactive,"
bind = SUPERSHIFT,D,exec,dolphin; "SUPERSHIFT,Q,exit,"
bind = SUPERSHIFT,F,togglefloating,; "SUPERSHIFT,D,exec,dolphin"
bindr = SUPER,Super_L,exec,/home/chris/bin/launcher.sh; "SUPERSHIFT,F,togglefloating,"
bindr = ALT,Alt_R,exec,/home/chris/bin/window.sh; "SUPER,w,exec,/home/chris/bin/window.sh"
bind = SUPER,w,exec,/home/chris/bin/window.sh; "SUPER,E,exec,/home/chris/bin/emacslof"
bind = SUPER,E,exec,/home/chris/bin/emacslof; "SUPER,d,exec,emacsclient -c -e '(dired-jump)'"
bind = 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"
bind = 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"
bind = SUPER,B,exec,/home/chris/bin/fflof; "SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer"
bind = SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer; "SUPERCTRL,i,exec,alacritty --class btop -e btm"
bind = SUPERCTRL,i,exec,alacritty --class btop -e btm; ",Print,exec,screenshot"
bind = ,Print,exec,screenshot; "SUPERSHIFT,mouse_down,exec,zoomin in"
bind = SUPERSHIFT,mouse_down,exec,zoomin in; "SUPERSHIFT,mouse_up,exec,zoomin out"
bind = SUPERSHIFT,mouse_up,exec,zoomin out;
bind = SUPER,P,exec,/home/chris/bin/rbw.sh; "SUPER,P,exec,/home/chris/bin/rbw.sh"
bind = SUPER,M,fullscreen,1; "SUPER,M,fullscreen,1"
bind = SUPER,F,fullscreen,0; "SUPER,F,fullscreen,0"
bind = SUPER,h,movefocus,l; "SUPER,h,movefocus,l"
bind = SUPER,l,movefocus,r; "SUPER,l,movefocus,r"
bind = SUPER,k,layoutmsg,cycleprev; "SUPER,k,layoutmsg,cycleprev"
bind = SUPER,j,layoutmsg,cyclenext; "SUPER,j,layoutmsg,cyclenext"
bind = SUPERSHIFT,h,movewindow,l; "SUPERSHIFT,h,movewindow,l"
bind = SUPERSHIFT,l,movewindow,r; "SUPERSHIFT,l,movewindow,r"
bind = SUPERSHIFT,k,layoutmsg,swapprev; "SUPERSHIFT,k,layoutmsg,swapprev"
bind = SUPERSHIFT,j,layoutmsg,swapnext; "SUPERSHIFT,j,layoutmsg,swapnext"
bind = SUPERCTRL,l,splitratio,+0.05; "SUPERCTRL,l,splitratio,+0.05"
bind = SUPERCTRL,h,splitratio,-0.05; "SUPERCTRL,h,splitratio,-0.05"
bind = SUPERSHIFT,c,centerwindow; "SUPERSHIFT,c,centerwindow"
bind = ALTCTRL,l,moveintogroup,right; "ALTCTRL,l,moveintogroup,right"
bind = ALTCTRL,h,moveintogroup,left; "ALTCTRL,h,moveintogroup,left"
bind = ALTCTRL,k,moveintogroup,up; "ALTCTRL,k,moveintogroup,up"
bind = ALTCTRL,j,moveintogroup,down; "ALTCTRL,j,moveintogroup,down"
bind = SUPERALT,g,togglegroup; "SUPERALT,g,togglegroup"
bind = SUPER,1,workspace,1; "SUPER,1,workspace,1"
bind = SUPER,2,workspace,2; "SUPER,2,workspace,2"
bind = SUPER,3,workspace,3; "SUPER,3,workspace,3"
bind = SUPER,4,workspace,4; "SUPER,4,workspace,4"
bind = SUPER,5,workspace,5; "SUPER,5,workspace,5"
bind = SUPER,6,workspace,6; "SUPER,6,workspace,6"
bind = SUPER,7,workspace,7; "SUPER,7,workspace,7"
bind = SUPER,8,workspace,8; "SUPER,8,workspace,8"
bind = SUPER,9,workspace,9; "SUPER,9,workspace,9"
bind = SUPER,0,workspace,10; "SUPER,0,workspace,10"
bind = SUPERALT,l,workspace,m+1; "SUPERALT,l,workspace,m+1"
bind = SUPERALT,h,workspace,m-1; "SUPERALT,h,workspace,m-1"
bind = SUPERSHIFT,1,movetoworkspace,1; "SUPERSHIFT,1,movetoworkspace,1"
bind = SUPERSHIFT,2,movetoworkspace,2; "SUPERSHIFT,2,movetoworkspace,2"
bind = SUPERSHIFT,3,movetoworkspace,3; "SUPERSHIFT,3,movetoworkspace,3"
bind = SUPERSHIFT,4,movetoworkspace,4; "SUPERSHIFT,4,movetoworkspace,4"
bind = SUPERSHIFT,5,movetoworkspace,5; "SUPERSHIFT,5,movetoworkspace,5"
bind = SUPERSHIFT,6,movetoworkspace,6; "SUPERSHIFT,6,movetoworkspace,6"
bind = SUPERSHIFT,7,movetoworkspace,7; "SUPERSHIFT,7,movetoworkspace,7"
bind = SUPERSHIFT,8,movetoworkspace,8; "SUPERSHIFT,8,movetoworkspace,8"
bind = SUPERSHIFT,9,movetoworkspace,9; "SUPERSHIFT,9,movetoworkspace,9"
bind = SUPERSHIFT,0,movetoworkspace,10; "SUPERSHIFT,0,movetoworkspace,10"
bind = SUPER,o,movewindow,mon:l; "SUPER,o,movewindow,mon:l"
bind = SUPER,y,togglespecialworkspace; "SUPER,y,togglespecialworkspace"
bind = SUPER,i,movewindow,left; "SUPER,i,movewindow,left"
bind = SUPERSHIFT,p,pin; "SUPERSHIFT,p,pin"
bind = SUPER,n,movetoworkspace,special; "SUPER,n,movetoworkspace,special"
bind = SUPERALT,a,movetoworkspace,special:agenda; "SUPERALT,a,movetoworkspace,special:agenda"
bind = SUPER,g,togglespecialworkspace,agenda; "SUPER,g,togglespecialworkspace,agenda"
binde = , XF86AudioMute, exec, pamixer -t; "SUPERSHIFT,g,exec,waybar.sh"
binde = , XF86AudioRaiseVolume, exec, /home/chris/bin/volup; "SUPERALT,n,exec,eww update rightside=true"
binde = , XF86AudioLowerVolume, exec, /home/chris/bin/voldown; ];
binde = ,F1, exec, pamixer -t;
binde = ,F3, exec, /home/chris/bin/volup;
binde = ,F2, exec, /home/chris/bin/voldown;
binde = , XF86MonBrightnessUp, exec, brightnessctl s +10%;
binde = , XF86MonBrightnessDown, exec, brightnessctl s 10%-;
bind = SUPERSHIFT,g,exec,waybar.sh; binde = [
bind = SUPERALT,n,exec,eww update rightside=true; ", 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%-"
];
bindm = SUPER,mouse:272,movewindow; bindr = [
bindm = SUPER,mouse:273,resizewindow; "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 # Blur waybar
blurls = gtk-layer-shell; blurls = "gtk-layer-shell";
# blurls=notifications # blurls=notifications
exec-once = kwalletd5; exec-once = [
exec-once = swww init; "kwalletd5"
exec-once = waybar; "swww init"
exec-once = dunst; "waybar"
exec-once = rbw-agent; "dunst"
# exec-once = /home/chris/bin/startup.sh "rbw-agent"
exec-once = hyprctl dispatch --batch "splitratio 1; splitration -0.35"; "/home/chris/bin/startup.sh"
exec-once = dbus-update-activation-environment --systemd --all; "hyprctl dispatch --batch 'splitratio 1; splitration -0.35'"
exec-once = jellyfin-mpv-shim; "dbus-update-activation-environment --systemd --all"
exec-once = batmon.lisp; "jellyfin-mpv-shim"
exec-once = /usr/lib/kdeconnectd; "batmon.lisp"
exec-once = nm-tray; "/usr/lib/kdeconnectd"
exec-once = systemctl --user restart jellyfin-mpv-shim; "nm-tray"
exec-once = systemctl --user restart emacs; "systemctl --user restart jellyfin-mpv-shim"
exec-once = systemctl --user stop nextcloud-client; "systemctl --user restart emacs"
exec-once = nextcloud; "systemctl --user stop nextcloud-client"
exec-once = kdeconnect-indicator; "nextcloud"
exec-once = wl-paste --watch cliphist store; "kdeconnect-indicator"
exec-once = hyprctl setcursor phinger-cursors-light 24; "wl-paste --watch cliphist store"
exec-once = 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'; "hyprctl setcursor phinger-cursors-light 24"
exec-once = sleep 3 && swww img /home/chris/pics/wallpapers/nixorange.jpeg -t grow --transition-bezier .14,0,.14,.99; "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"
];
}; };
}; };

View file

@ -2,7 +2,7 @@
with lib; with lib;
{ {
services.emacs = { services.emacs = {
enable = false; enable = true;
package = with pkgs; ((emacsPackagesFor pkgs.emacs-pgtk).emacsWithPackages package = with pkgs; ((emacsPackagesFor pkgs.emacs-pgtk).emacsWithPackages
(epkgs: with epkgs; [ (epkgs: with epkgs; [
vterm vterm