Update hyprland config (gestures and other stuff)
This commit is contained in:
parent
28cc7d2d25
commit
18cc25b3b8
3 changed files with 298 additions and 300 deletions
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [./regreet.nix];
|
||||
}:
|
||||
{
|
||||
imports = [ ./regreet.nix ];
|
||||
|
||||
options = {
|
||||
programs.hyprland.autoLogin.username = lib.mkOption {
|
||||
|
|
@ -21,17 +21,8 @@
|
|||
withUWSM = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
services.greetd.settings.initial_session = let
|
||||
services.greetd.settings.initial_session =
|
||||
let
|
||||
username = config.programs.hyprland.autoLogin.username;
|
||||
in
|
||||
lib.mkIf (!isNull username) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
|
|
@ -10,9 +11,11 @@
|
|||
pkgs.hyprlandPlugins.hyprgrass
|
||||
];
|
||||
|
||||
settings = let
|
||||
settings =
|
||||
let
|
||||
app_menu = "${pkgs.fuzzel}/bin/fuzzel";
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Autostart
|
||||
exec-once = [
|
||||
"uwsm app -- nm-applet"
|
||||
|
|
@ -121,8 +124,7 @@
|
|||
];
|
||||
};
|
||||
|
||||
bind =
|
||||
[
|
||||
bind = [
|
||||
# show keybinds list
|
||||
"$mainMod, F1, exec, show-keybinds"
|
||||
|
||||
|
|
@ -160,17 +162,19 @@
|
|||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
x:
|
||||
let
|
||||
ws =
|
||||
let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
in
|
||||
[
|
||||
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10
|
||||
) 10
|
||||
)
|
||||
)
|
||||
++ [
|
||||
|
|
@ -184,24 +188,40 @@
|
|||
# Window focus, movement and control
|
||||
builtins.concatLists (
|
||||
let
|
||||
keys = ["H" "L" "K" "J"];
|
||||
directions = ["l" "r" "u" "d"];
|
||||
keys = [
|
||||
"H"
|
||||
"L"
|
||||
"K"
|
||||
"J"
|
||||
];
|
||||
directions = [
|
||||
"l"
|
||||
"r"
|
||||
"u"
|
||||
"d"
|
||||
];
|
||||
resize = toString 80; # Change this to change how much a window resizes each keypress
|
||||
resize_list = ["-${resize} 0" "${resize} 0" "0 -${resize}" "0 ${resize}"];
|
||||
resize_list = [
|
||||
"-${resize} 0"
|
||||
"${resize} 0"
|
||||
"0 -${resize}"
|
||||
"0 ${resize}"
|
||||
];
|
||||
in
|
||||
builtins.genList (
|
||||
x: let
|
||||
x:
|
||||
let
|
||||
k = builtins.elemAt keys x;
|
||||
d = builtins.elemAt directions x;
|
||||
r = builtins.elemAt resize_list x;
|
||||
in [
|
||||
in
|
||||
[
|
||||
"$mainMod, ${k}, movefocus, ${d}"
|
||||
"$mainMod SHIFT, ${k}, movewindow, ${d}"
|
||||
"$mainMod CTRL, ${k}, resizeactive, ${r}"
|
||||
"$mainMod ALT, ${k}, moveactive, ${r}"
|
||||
]
|
||||
)
|
||||
4
|
||||
) 4
|
||||
)
|
||||
)
|
||||
++ [
|
||||
|
|
@ -236,6 +256,10 @@
|
|||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
gesture = [
|
||||
"3, horizontal, workspace"
|
||||
];
|
||||
|
||||
# windowrule
|
||||
windowrule = [
|
||||
"float,class:vimiv"
|
||||
|
|
@ -293,14 +317,11 @@
|
|||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_direction_lock = false;
|
||||
};
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
|
||||
plugin = {
|
||||
touch_gestures = {
|
||||
# The default sensitivity is probably too low on tablet screens,
|
||||
|
|
@ -376,12 +397,6 @@
|
|||
", longpress:2, movewindow"
|
||||
", longpress:3, resizewindow"
|
||||
];
|
||||
|
||||
experimental = {
|
||||
# send proper cancel events to windows instead of hacky touch_up events,
|
||||
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
|
||||
send_cancel = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
variables = {
|
||||
NIXOS_OZONE_WL = 1;
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
__GL_GSYNC_ALLOWED = 0;
|
||||
__GL_VRR_ALLOWED = 0;
|
||||
_JAVA_AWT_WM_NONEREPARENTING = 1;
|
||||
DISABLE_QT5_COMPAT = 0;
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
ANKI_WAYLAND = 1;
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
WLR_DRM_NO_ATOMIC = 1;
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = 1;
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
|
|
@ -19,13 +13,11 @@
|
|||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.sessionVariables = variables;
|
||||
|
||||
xdg.configFile."uwsm/env".text = builtins.concatStringsSep "\n" (
|
||||
lib.attrsets.mapAttrsToList (
|
||||
name: value: "export ${name}=\"${builtins.toString value}\""
|
||||
)
|
||||
variables
|
||||
lib.attrsets.mapAttrsToList (name: value: "export ${name}=\"${builtins.toString value}\"") variables
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue