hyprland rice in full swing

This commit is contained in:
atagen 2023-03-23 19:59:35 +11:00
parent c3a0f09a41
commit bc72aada53
19 changed files with 2278 additions and 145 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
@ -6,174 +6,82 @@ let
hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
}).defaultNix;
wlogout_style_base = dots/wlogout/style.css;
wlogout_style = pkgs.runCommandLocal "wlogout_style_base" {wlogpath = lib.strings.escape ["/"] "${pkgs.wlogout}";} ''
cp ${wlogout_style_base} $out
sed -i "s/\/usr\/share\/wlogout/$wlogpath\/share\/wlogout/g" $out
sed -i "s/\/etc\/wlogout/$wlogpath\/etc\/wlogout/g" $out
'';
in {
imports = [
hyprland.homeManagerModules.default
../foreign/dotfiles/home/programs/eww/default.nix
../foreign/dotfiles/modules/regreet.nix
];
nixpkgs.overlays = [
(self: super: {
kwin-system76-scheduler-integration = pkgs.libsForQt5.callPackage ../system/syspkgs/kwin-system76-scheduler-integration.nix {};
hyprland-s76 = (pkgs.callPackage ../system/syspkgs/hyprland-system76-scheduler-integration.nix {});
hyprland-s76 = pkgs.callPackage ../system/syspkgs/hyprland-system76-scheduler-integration.nix {};
swayosd = pkgs.callPackage ./homepkgs/swayosd.nix {};
})
];
programs.eww-hyprland = {
enable = true;
colors = builtins.readFile dots/eww/colors.scss;
};
home.username = "bolt";
home.homeDirectory = "/home/bolt";
home.packages = with pkgs; [
cmus
zellij
xonotic
nicotine-plus
glib # for gsettings
fuzzel
grim
slurp
mako
swaybg
wlogout
wf-recorder
libnotify
waybar
xorg.xrdb
swayidle
swaynotificationcenter
swayosd
pulseaudio
playerctl
];
wayland.windowManager.sway = {
enable = true;
config = rec {
modifier = "Mod4";
terminal = "kitty";
gaps = {
inner = 15;
outer = 30;
};
};
wrapperFeatures = {
base = true;
gtk= true;
};
xdg.configFile = builtins.mapAttrs (name: value: { enable=true; text=builtins.readFile value; })
{
"wlogout/layout" = dots/wlogout/layout;
"wlogout/style.css" = wlogout_style;
"swaync/config.json" = dots/swaync/config.json;
"swaync/configSchema.json" = dots/swaync/configSchema.json;
"swaync/style.css" = dots/swaync/style.css;
"fuzzel/fuzzel.ini" = dots/fuzzel/fuzzel.ini;
};
wayland.windowManager.hyprland = {
enable = true;
systemdIntegration = true;
nvidiaPatches = true;
extraConfig = ''
exec-once = waybar
exec-once = keepassxc
exec-once = mako
exec-once = ckb-next -c -b
exec-once = swaybg -i $HOME/Downloads/00026.png
exec-once = xrdb $HOME/.Xresources
input {
kb_layout=us
kb_options=caps:escape,escape:caps
}
general {
no_border_on_floating=true
layout=dwindle
border_size=3
gaps_in=10
gaps_out=20
}
dwindle {
preserve_split=true
pseudotile=true
use_active_for_splits=true
}
decoration {
rounding=8
blur=0
}
animations {
enabled=1
bezier=overshot,0.05,0.9,0.1,1.1
bezier=smooth,0.06,0.94,0.1,1.0
bezier=slosmooth,0.1,0.89,0.14,0.96
animation=windows,1,6,overshot,popin
animation=workspaces,1,6,smooth,slidevert
animation=specialWorkspace,1,6,overshot,slide
}
misc {
disable_hyprland_logo=true
disable_splash_rendering=true
}
monitor=,highrr,auto,1
bind=SUPER,Return,exec,kitty
bind=SUPER,E,exec,kitty,joshuto
bind=SUPER,F,exec,firefox
bind=SUPER,D,exec,fuzzel
bind=SUPER_SHIFT,Q,killactive
bind=SUPER_SHIFT,space,fullscreen,0
bind=SUPER,space,togglefloating
bind=SUPER,h,movefocus,l
bind=SUPER,l,movefocus,r
bind=SUPER,j,movefocus,d
bind=SUPER,k,movefocus,u
bind=SUPER_SHIFT,h,movewindow,l
bind=SUPER_SHIFT,l,movewindow,r
bind=SUPER_SHIFT,j,movewindow,d
bind=SUPER_SHIFT,k,movewindow,u
bind=SUPER,s,togglesplit
bind=SUPER,1,workspace,1
bind=SUPER,2,workspace,2
bind=SUPER,3,workspace,3
bind=SUPER,4,workspace,4
bind=SUPER_SHIFT,1,movetoworkspacesilent,1
bind=SUPER_SHIFT,2,movetoworkspacesilent,2
bind=SUPER_SHIFT,3,movetoworkspacesilent,3
bind=SUPER_SHIFT,4,movetoworkspacesilent,4
bind=SUPER_CTRL,h,resizeactive,-40 0
bind=SUPER_CTRL,l,resizeactive,40 0
bind=SUPER_CTRL,j,resizeactive,0 -40
bind=SUPER_CTRL,k,resizeactive,0 40
bind=SUPER,minus,togglespecialworkspace
bind=SUPER_SHIFT,minus,movetoworkspace,special
bind=SUPER_SHIFT,S,exec,grim -g "$(slurp)" -t png -o "$HOME/Pictures/$(date +%F_%H-%m-%S).png" && notify-send "Screenshot taken."
bind=SUPER_SHIFT_CTRL,S,exec,wf-recorder -a -f "$HOME/Videos/recording_($date +%F_%H-%m-%S).mp4" && notify-send "Recording desktop.."
bind=SUPER_SHIFT,E,exec,wlogout
bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send "Audio" "Mute $(if [ $(pactl get-sink-mute @DEFAULT_SINK@ | rg yes >
bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send "Audio" "Volume at $(pactl get-sink-volume @DEFAULT_SINK@ | c>
bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send "Audio" "Volume at $(pactl get-sink-volume @DEFAULT_SINK@ | c>
bind=,XF86AudioStop,exec,cmus-remote -s && notify-send "Music" "Playback stopped."
bind=,XF86AudioPlay,exec,cmus-remote -u && notify-send "Music" "Playback status: $(cmus-remote -Q | head -n 1 | cut -d' ' -f 2)"
bind=,XF86AudioPrev,exec,cmus-remote -r && notify-send "Music" "Now playing:\n$(cmus-remote -Q | rg -e 'artist|title' | cut -d' ' -f 3-)"
bind=,XF86AudioNext,exec,cmus-remote -n && notify-send "Music" "Now playing:\n$(cmus-remote -Q | rg -e 'artist|title' | cut -d' ' -f 3-)"
'';
xwayland = {
enable = true;
hidpi = false;
};
recommendedEnvironment = true;
extraConfig = builtins.readFile dots/hyprland/hyprland.conf;
};
services.mako = {
enable = true;
anchor = "bottom-right";
borderRadius = 8;
borderSize = 2;
defaultTimeout = 3500;
ignoreTimeout = true;
font = "Visby Regular 14";
};
systemd.user.startServices = true;
systemd.user.services."com.system76.Scheduler.dbusproxy" = {
Unit = {