feat(binto): switch to hyprland
This commit is contained in:
parent
9f42bec4bb
commit
625cbc91c5
5 changed files with 253 additions and 27 deletions
126
devices/binto/config/hypr/main.conf
Normal file
126
devices/binto/config/hypr/main.conf
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
# Hypr vars
|
||||||
|
$mainMod = SUPER
|
||||||
|
|
||||||
|
|
||||||
|
# Monitors
|
||||||
|
monitor=desc:Acer Technologies Acer K212HQL T3EAA0014201, 1920x1080@60, 840x1000, 1, transform, 3
|
||||||
|
monitor=desc:BOE 0x0964, 1920x1200@60, 0x2920, 1
|
||||||
|
monitor=desc:Samsung Electric Company C27JG5x HTOM100586, 2560x1440@60, 1920x120, 1
|
||||||
|
# Desc of monitor has comma, so force its default on everything and specify everything else
|
||||||
|
monitor=, 2560x1440@165, 1920x1560, 1
|
||||||
|
|
||||||
|
|
||||||
|
# Important stuff at launch
|
||||||
|
exec-once = gnome-keyring-daemon --start --components=secrets
|
||||||
|
exec-once = wl-paste --watch cliphist store
|
||||||
|
## fix fullscreen game resolution
|
||||||
|
exec-once = xrandr --output DP-5 --primary
|
||||||
|
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
exec-once = hyprctl setcursor Dracula-cursors 24
|
||||||
|
|
||||||
|
|
||||||
|
# Autostart programs
|
||||||
|
exec-once = bash -c "sleep 10; tmux new-session -s gsr -d 'bash -c $HOME/.config/gsr.sh'"
|
||||||
|
# TODO: add gpu-save-replay bind
|
||||||
|
exec-once = bash -c "sleep 5; kdeconnect-indicator"
|
||||||
|
exec-once = bash -c "sleep 6; nextcloud --background"
|
||||||
|
|
||||||
|
# Special window apps
|
||||||
|
exec-once = [workspace special:thunder silent] thunderbird
|
||||||
|
windowrule = workspace special:thunder silent,^(thunderbird)$
|
||||||
|
bind = $mainMod, T, togglespecialworkspace, thunder
|
||||||
|
|
||||||
|
exec-once = [workspace special:spot silent] spotify
|
||||||
|
windowrule = workspace special:spot silent,^(Spotify)$
|
||||||
|
bind = $mainMod, S, togglespecialworkspace, spot
|
||||||
|
|
||||||
|
|
||||||
|
# Input settings
|
||||||
|
input {
|
||||||
|
kb_layout = ca
|
||||||
|
kb_variant = multix
|
||||||
|
kb_model =
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = yes
|
||||||
|
}
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
}
|
||||||
|
|
||||||
|
device:razer-razer-naga-pro {
|
||||||
|
sensitivity = -0.5
|
||||||
|
accel_profile = "flat"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Binds
|
||||||
|
bind = $mainMod, Q, exec, alacritty
|
||||||
|
bind = $mainMod, C, killactive,
|
||||||
|
bind = $mainMod SHIFT, SPACE, togglefloating,
|
||||||
|
bind = $mainMod, J, togglesplit,
|
||||||
|
bind = SUPER, F, fullscreen
|
||||||
|
bind = Alt Shift, Tab, cyclenext
|
||||||
|
bind = $mainMod, V, exec, killall -r wofi || cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||||
|
bind =, Print, exec, bash -c 'grim -g "$(slurp)" - | swappy -f -'
|
||||||
|
bind = $mainMod SHIFT, C, exec, wl-color-picker
|
||||||
|
|
||||||
|
# Volume control
|
||||||
|
binde =, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
|
binde =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||||
|
|
||||||
|
bind =, XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
bind =, XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
|
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
bind = $mainMod, 2, workspace, 2
|
||||||
|
bind = $mainMod, 3, workspace, 3
|
||||||
|
bind = $mainMod, 4, workspace, 4
|
||||||
|
bind = $mainMod, 5, workspace, 5
|
||||||
|
bind = $mainMod, 6, workspace, 6
|
||||||
|
bind = $mainMod, 7, workspace, 7
|
||||||
|
bind = $mainMod, 8, workspace, 8
|
||||||
|
bind = $mainMod, 9, workspace, 9
|
||||||
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
|
||||||
|
# Rules
|
||||||
|
windowrule = tile,^(firefox)$
|
||||||
|
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo = true
|
||||||
|
disable_splash_rendering = true
|
||||||
|
vfr = true
|
||||||
|
}
|
||||||
|
|
||||||
|
xwayland {
|
||||||
|
force_zero_scaling = true
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../modules/audio.nix
|
../../modules/audio.nix
|
||||||
|
../../modules/greetd
|
||||||
../../modules/kmscon.nix
|
../../modules/kmscon.nix
|
||||||
../../modules/printer.nix
|
../../modules/printer.nix
|
||||||
../../modules/proton-bridge.nix
|
../../modules/proton-bridge.nix
|
||||||
|
@ -16,7 +17,8 @@
|
||||||
|
|
||||||
services.device-vars = {
|
services.device-vars = {
|
||||||
username = "matt";
|
username = "matt";
|
||||||
fontSize = 10.0;
|
configDir = "/home/matt/.nix/devices/binto/config";
|
||||||
|
fontSize = 12.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.matt = {
|
users.users.matt = {
|
||||||
|
@ -37,7 +39,10 @@
|
||||||
../../home/alacritty.nix
|
../../home/alacritty.nix
|
||||||
../../home/dconf.nix
|
../../home/dconf.nix
|
||||||
../../home/firefox
|
../../home/firefox
|
||||||
|
../../home/theme.nix
|
||||||
|
../../home/wofi
|
||||||
|
|
||||||
|
./home/hyprland.nix
|
||||||
./home/packages.nix
|
./home/packages.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
74
devices/binto/home/hyprland.nix
Normal file
74
devices/binto/home/hyprland.nix
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{ pkgs, config, hyprland, osConfig, ... }: let
|
||||||
|
configDir = config.services.device-vars.configDir;
|
||||||
|
symlink = config.lib.file.mkOutOfStoreSymlink;
|
||||||
|
|
||||||
|
polkit = pkgs.plasma5Packages.polkit-kde-agent;
|
||||||
|
in {
|
||||||
|
# FIXME: steam flicker issues
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
enableNvidiaPatches = true;
|
||||||
|
package = hyprland.packages.x86_64-linux.default;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
# Nvidia stuff
|
||||||
|
env = [
|
||||||
|
"LIBVA_DRIVER_NAME, nvidia"
|
||||||
|
"XDG_SESSION_TYPE, wayland"
|
||||||
|
"GBM_BACKEND, nvidia-drm"
|
||||||
|
"__GLX_VENDOR_LIBRARY_NAME, nvidia"
|
||||||
|
"WLR_NO_HARDWARE_CURSORS, 1"
|
||||||
|
];
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"${polkit}/libexec/polkit-kde-authentication-agent-1"
|
||||||
|
"${osConfig.programs.kdeconnect.package}/libexec/kdeconnectd"
|
||||||
|
"swww init --no-cache && swww img -t none ${pkgs.dracula-theme}/wallpapers/waves.png"
|
||||||
|
];
|
||||||
|
|
||||||
|
source = [ "~/.config/hypr/main.conf" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"hypr/main.conf".source = symlink "${configDir}/hypr/main.conf";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
libnotify
|
||||||
|
playerctl
|
||||||
|
bluez-tools
|
||||||
|
brightnessctl
|
||||||
|
pulseaudio
|
||||||
|
libinput
|
||||||
|
|
||||||
|
## gui
|
||||||
|
pavucontrol # TODO: replace with ags widget
|
||||||
|
networkmanagerapplet # TODO: replace with ags widget
|
||||||
|
blueberry # TODO: replace with ags widget
|
||||||
|
|
||||||
|
|
||||||
|
# Hyprland
|
||||||
|
swww
|
||||||
|
xclip
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
|
||||||
|
## gui
|
||||||
|
gtklock
|
||||||
|
wl-color-picker
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
swappy
|
||||||
|
|
||||||
|
## libs
|
||||||
|
qt5.qtwayland
|
||||||
|
qt6.qtwayland
|
||||||
|
xorg.xrandr
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
libayatana-appindicator
|
||||||
|
xdg-utils
|
||||||
|
evtest
|
||||||
|
glib
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,18 +1,23 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
# Disable compositor in X11 for best performance
|
# Disable compositor in X11 for best performance
|
||||||
# TODO: add mic sound
|
# TODO: add mic sound
|
||||||
xdg.configFile."gpu-screen-recorder.env".text = ''
|
xdg.configFile."gsr.sh" = {
|
||||||
WINDOW=focused
|
executable = true;
|
||||||
CONTAINER=mp4
|
text = ''
|
||||||
QUALITY=very_high
|
export WINDOW=DP-5
|
||||||
CODEC=auto
|
export CONTAINER=mkv
|
||||||
AUDIO_CODEC=opus
|
export QUALITY=very_high
|
||||||
FRAMERATE=60
|
export CODEC=auto
|
||||||
REPLAYDURATION=1200
|
export AUDIO_CODEC=aac
|
||||||
OUTPUTDIR=/home/matt/Videos/Replay
|
export FRAMERATE=60
|
||||||
MAKEFOLDERS=yes
|
export REPLAYDURATION=1200
|
||||||
ADDITIONAL_ARGS="-s 2560x1440"
|
export OUTPUTDIR=/home/matt/Videos/Replay
|
||||||
'';
|
export MAKEFOLDERS=yes
|
||||||
|
# export ADDITIONAL_ARGS=
|
||||||
|
|
||||||
|
exec /bin/sh -c 'AUDIO="''${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" -mf $MAKEFOLDERS $ADDITIONAL_ARGS'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
xdg.desktopEntries."com.github.iwalton3.jellyfin-media-player" = {
|
xdg.desktopEntries."com.github.iwalton3.jellyfin-media-player" = {
|
||||||
name = "Jellyfin Media Player";
|
name = "Jellyfin Media Player";
|
||||||
|
|
|
@ -1,28 +1,52 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
hyprland,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
displayManager = {
|
||||||
|
sessionPackages = [
|
||||||
|
hyprland.packages.x86_64-linux.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
libinput.enable = true;
|
||||||
displayManager.sddm.enable = true;
|
|
||||||
desktopManager.plasma5.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
greetd = {
|
||||||
|
settings = {
|
||||||
|
initial_session = {
|
||||||
|
command = "${hyprland.packages.x86_64-linux.default}/bin/Hyprland";
|
||||||
|
user = "matt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
p7zip # for reshade
|
p7zip # for reshade
|
||||||
xclip
|
xclip
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
vlc
|
|
||||||
|
# FIXME: vlc stutters
|
||||||
|
mpv
|
||||||
flat-remix-icon-theme
|
flat-remix-icon-theme
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
libreoffice-qt
|
libreoffice-qt
|
||||||
|
@ -42,12 +66,4 @@
|
||||||
bluej
|
bluej
|
||||||
xournalpp
|
xournalpp
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.plasma5.excludePackages = with pkgs.libsForQt5; [
|
|
||||||
elisa
|
|
||||||
oxygen
|
|
||||||
khelpcenter
|
|
||||||
konsole
|
|
||||||
plasma-browser-integration
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue