Finish nixification

The nixification is now complete.
This commit is contained in:
Donovan Glover 2023-05-12 01:48:25 -04:00
parent ad3090d161
commit ce39f9f6d9
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 167 additions and 188 deletions

167
home.nix
View File

@ -12,6 +12,173 @@
home.packages = [ pkgs.httpie ];
home.stateVersion = "22.11";
xdg = { userDirs = { enable = true; }; };
xdg.configFile."hypr/hyprland.conf".text = ''
env=XCURSOR_SIZE,24
env=BROWSER,librewolf
env=GTK_IM_MODULE,fcitx
env=QT_IM_MODULE,fcitx
env=XMODIFIERS,@im=fcitx
env=SDL_IM_MODULE,fcitx
env=GLFW_IM_MODULE,ibus
monitor=,preferred,auto,1
exec-once = swaybg --mode fill --image "$(fd -d 1 wallpaper.png /nix/store/)"
exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 20%
exec-once = sleep 0.5 && waybar
exec-once = fcitx5 # Japanese input support
exec-once = mullvad-vpn
exec-once = wl-paste -p --watch wl-copy -pc # Disable middle click paste
exec-once = udiskie # Auto-mount drives
input {
kb_layout = us
accel_profile = flat
follow_mouse = 1
sensitivity = 0
touchpad {
natural_scroll = yes
disable_while_typing = no
}
}
general {
gaps_in = 0
gaps_out = 0
border_size = 1
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = master
resize_on_border = yes
}
decoration {
rounding = 0
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = yes
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
animation = specialWorkspace, 1, 6, default
}
dwindle {
preserve_split = yes
no_gaps_when_only = yes
special_scale_factor = 0.95
}
master {
new_is_master = yes
new_on_top = yes
mfact = 0.65
special_scale_factor = 0.95
no_gaps_when_only = yes
}
gestures {
workspace_swipe = yes
}
device:synps/2-synaptics-touchpad {
sensitivity = 0.75
accel_profile = flat
natural_scroll = yes
disable_while_typing = no
}
device:tpps/2-elan-trackpoint {
sensitivity = 0.5
accel_profile = flat
}
bind = SUPER_SHIFT, Return, exec, kitty
bind = SUPER, Tab, workspace, e+1
bind = SUPER_SHIFT, Tab, workspace, e-1
bind = SUPER, Q, killactive,
bind = SUPER, P, exec, grim -g "$(slurp)"
bind = , Print, exec, grim && dunstify Screenshot Captured.
bind = SUPER_ALT, delete, exit
bind = SUPER, V, togglefloating,
bind = SUPER, V, centerwindow,
bind = SUPER, O, exec, killall -SIGUSR1 .waybar-wrapped
bind = SUPER, X, pin
bind = SUPER, F, fullscreen, 1
bind = SUPER_SHIFT, F, fullscreen
bind = SUPER, bracketright, changegroupactive, f
bind = SUPER, bracketleft, changegroupactive, b
bind = SUPER, S, togglespecialworkspace
bind = SUPER_SHIFT, S, movetoworkspace, special
bind = SUPER_SHIFT, S, togglespecialworkspace
bind = SUPER, Return, exec, ~/.config/hypr/swapmaster.sh
bind = SUPER, backslash, exec, ~/.config/hypr/focusmaster.sh
bind = SUPER, J, layoutmsg, cyclenext
bind = SUPER, K, layoutmsg, cycleprev
bind = SUPER_SHIFT, J, layoutmsg, swapnext
bind = SUPER_SHIFT, K, layoutmsg, swapprev
bind = SUPER, left, layoutmsg, orientationleft
bind = SUPER, right, layoutmsg, orientationright
bind = SUPER, up, layoutmsg, orientationtop
bind = SUPER, down, layoutmsg, orientationbottom
bind = SUPER, C, layoutmsg, orientationcenter
bind = SUPER, H, layoutmsg, addmaster
bind = SUPER, L, layoutmsg, removemaster
bind = SUPER_SHIFT, H, splitratio, -0.05
bind = SUPER_SHIFT, L, splitratio, +0.05
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER_SHIFT, 1, movetoworkspace, 1
bind = SUPER_SHIFT, 2, movetoworkspace, 2
bind = SUPER_SHIFT, 3, movetoworkspace, 3
bind = SUPER_SHIFT, 4, movetoworkspace, 4
bind = SUPER_SHIFT, 5, movetoworkspace, 5
bind = SUPER_CTRL, 1, exec, ~/.config/hypr/tags.sh 1
bind = SUPER_CTRL, 2, exec, ~/.config/hypr/tags.sh 2
bind = SUPER_CTRL, 3, exec, ~/.config/hypr/tags.sh 3
bind = SUPER_CTRL, 4, exec, ~/.config/hypr/tags.sh 4
bind = SUPER_CTRL, 5, exec, ~/.config/hypr/tags.sh 5
layerrule = blur,waybar
# Scroll through existing workspaces with super + scroll
bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/resize windows with super + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# Change volume with keys
# TODO: Change notification once at 0/100%
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
misc {
disable_hyprland_logo = yes
animate_mouse_windowdragging = yes
}
'';
home.file.".icons/default/index.theme".text = ''
[icon theme]
Inherits=phinger-cursors

View File

@ -1,167 +0,0 @@
env=XCURSOR_SIZE,24
env=BROWSER,librewolf
env=GTK_IM_MODULE,fcitx
env=QT_IM_MODULE,fcitx
env=XMODIFIERS,@im=fcitx
env=SDL_IM_MODULE,fcitx
env=GLFW_IM_MODULE,ibus
monitor=,preferred,auto,1
exec-once = swaybg --mode fill --image "$(fd -d 1 wallpaper.png /nix/store/)"
exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 20%
exec-once = sleep 0.5 && waybar
exec-once = fcitx5 # Japanese input support
exec-once = mullvad-vpn
exec-once = wl-paste -p --watch wl-copy -pc # Disable middle click paste
exec-once = udiskie # Auto-mount drives
input {
kb_layout = us
accel_profile = flat
follow_mouse = 1
sensitivity = 0
touchpad {
natural_scroll = yes
disable_while_typing = no
}
}
general {
gaps_in = 0
gaps_out = 0
border_size = 1
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = master
resize_on_border = yes
}
decoration {
rounding = 0
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = yes
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
animation = specialWorkspace, 1, 6, default
}
dwindle {
preserve_split = yes
no_gaps_when_only = yes
special_scale_factor = 0.95
}
master {
new_is_master = yes
new_on_top = yes
mfact = 0.65
special_scale_factor = 0.95
no_gaps_when_only = yes
}
gestures {
workspace_swipe = yes
}
device:synps/2-synaptics-touchpad {
sensitivity = 0.75
accel_profile = flat
natural_scroll = yes
disable_while_typing = no
}
device:tpps/2-elan-trackpoint {
sensitivity = 0.5
accel_profile = flat
}
bind = SUPER_SHIFT, Return, exec, kitty
bind = SUPER, Tab, workspace, e+1
bind = SUPER_SHIFT, Tab, workspace, e-1
bind = SUPER, Q, killactive,
bind = SUPER, P, exec, grim -g "$(slurp)"
bind = , Print, exec, grim && dunstify Screenshot Captured.
bind = SUPER_ALT, delete, exit
bind = SUPER, V, togglefloating,
bind = SUPER, V, centerwindow,
bind = SUPER, O, exec, killall -SIGUSR1 .waybar-wrapped
bind = SUPER, X, pin
bind = SUPER, F, fullscreen, 1
bind = SUPER_SHIFT, F, fullscreen
bind = SUPER, bracketright, changegroupactive, f
bind = SUPER, bracketleft, changegroupactive, b
bind = SUPER, S, togglespecialworkspace
bind = SUPER_SHIFT, S, movetoworkspace, special
bind = SUPER_SHIFT, S, togglespecialworkspace
bind = SUPER, Return, exec, ~/.config/hypr/swapmaster.sh
bind = SUPER, backslash, exec, ~/.config/hypr/focusmaster.sh
bind = SUPER, J, layoutmsg, cyclenext
bind = SUPER, K, layoutmsg, cycleprev
bind = SUPER_SHIFT, J, layoutmsg, swapnext
bind = SUPER_SHIFT, K, layoutmsg, swapprev
bind = SUPER, left, layoutmsg, orientationleft
bind = SUPER, right, layoutmsg, orientationright
bind = SUPER, up, layoutmsg, orientationtop
bind = SUPER, down, layoutmsg, orientationbottom
bind = SUPER, C, layoutmsg, orientationcenter
bind = SUPER, H, layoutmsg, addmaster
bind = SUPER, L, layoutmsg, removemaster
bind = SUPER_SHIFT, H, splitratio, -0.05
bind = SUPER_SHIFT, L, splitratio, +0.05
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER_SHIFT, 1, movetoworkspace, 1
bind = SUPER_SHIFT, 2, movetoworkspace, 2
bind = SUPER_SHIFT, 3, movetoworkspace, 3
bind = SUPER_SHIFT, 4, movetoworkspace, 4
bind = SUPER_SHIFT, 5, movetoworkspace, 5
bind = SUPER_CTRL, 1, exec, ~/.config/hypr/tags.sh 1
bind = SUPER_CTRL, 2, exec, ~/.config/hypr/tags.sh 2
bind = SUPER_CTRL, 3, exec, ~/.config/hypr/tags.sh 3
bind = SUPER_CTRL, 4, exec, ~/.config/hypr/tags.sh 4
bind = SUPER_CTRL, 5, exec, ~/.config/hypr/tags.sh 5
layerrule = blur,waybar
# Scroll through existing workspaces with super + scroll
bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/resize windows with super + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# Change volume with keys
# TODO: Change notification once at 0/100%
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
misc {
disable_hyprland_logo = yes
animate_mouse_windowdragging = yes
}
# vim:syn=bash

View File

@ -1,21 +0,0 @@
# Hyprland
[Hyprland][hyprland] is a new tiling Wayland compositor written in C++.
## Use Cases
Hyprland can be used to:
- Take advantage of Wayland, without having to resort to the i3-like Sway
- Use a Wayland compositor that opens windows in a similar vein to bspwm
- Have dynamic workspaces out of the box, with no configuration necessary.
- Have instantaneous partial scaling support and monitors with different refresh rates
- Have live multi-monitor support without having to deal with xrandr/arandr.
- Have gestures without having to worry about bugs in `libinput-gestures`
- Drag and drop windows across monitors and switch focus between them, unlike bspwm
You should not use hyprland if:
- You should use hyprland.
[hyprland]: https://github.com/hyprwm/Hyprland