feat: reenable xorg for vr
This commit is contained in:
parent
f190614f61
commit
d7eb08fa98
|
@ -222,7 +222,7 @@ in
|
||||||
systems.oauth2.netbird = {
|
systems.oauth2.netbird = {
|
||||||
public = true;
|
public = true;
|
||||||
displayName = "Netbird";
|
displayName = "Netbird";
|
||||||
originUrl = "https://netbird.${config.secrets.secrets.global.domains.web}/";
|
originUrl = "https://netbird.${config.secrets.secrets.global.domains.web}/#callback";
|
||||||
originLanding = "https://netbird.${config.secrets.secrets.global.domains.web}/";
|
originLanding = "https://netbird.${config.secrets.secrets.global.domains.web}/";
|
||||||
preferShortUsername = true;
|
preferShortUsername = true;
|
||||||
enableLocalhostRedirects = true;
|
enableLocalhostRedirects = true;
|
||||||
|
|
|
@ -1,14 +1,60 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
home.packages = [
|
pkgs,
|
||||||
|
lib,
|
||||||
|
minimal,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.optionalAttrs (!minimal) {
|
||||||
|
hm.home.packages = [
|
||||||
pkgs.xclip
|
pkgs.xclip
|
||||||
pkgs.xdragon
|
pkgs.xdragon
|
||||||
];
|
];
|
||||||
imports = [
|
imports = [
|
||||||
../.
|
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
];
|
];
|
||||||
#xsession.wallpapers.enable = true;
|
#xsession.wallpapers.enable = true;
|
||||||
home.file.".xinitrc".source = ./xinitrc;
|
hm.home.file.".xinitrc".source = ./xinitrc;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.startx.enable = true;
|
||||||
|
autoRepeatDelay = 235;
|
||||||
|
autoRepeatInterval = 60;
|
||||||
|
videoDrivers = [ "modesetting" ];
|
||||||
|
};
|
||||||
|
services.libinput = {
|
||||||
|
enable = true;
|
||||||
|
mouse = {
|
||||||
|
accelSpeed = "0.5";
|
||||||
|
accelProfile = "flat";
|
||||||
|
middleEmulation = false;
|
||||||
|
};
|
||||||
|
touchpad = {
|
||||||
|
accelProfile = "flat";
|
||||||
|
accelSpeed = "1";
|
||||||
|
naturalScrolling = true;
|
||||||
|
disableWhileTyping = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.udev.extraRules =
|
||||||
|
let
|
||||||
|
exe = pkgs.writeShellScript "set-key-repeat" ''
|
||||||
|
if [ -d "/tmp/.X11-unix" ]; then
|
||||||
|
for D in /tmp/.X11-unix/*; do
|
||||||
|
file=$(${pkgs.coreutils}/bin/basename $D)
|
||||||
|
export DISPLAY=":''${file:1}"
|
||||||
|
user=$(${pkgs.coreutils}/bin/stat -c '%U' "$D")
|
||||||
|
# sleep to give X time to access the keyboard
|
||||||
|
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
|
||||||
|
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
''
|
||||||
|
ACTION=="add", SUBSYSTEM=="input", ATTRS{bInterfaceClass}=="03", RUN+="${exe}"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,103 +1,106 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# import shared sway config
|
# import shared sway config
|
||||||
imports = [ ../sway3.nix ];
|
imports = [ ./sway3.nix ];
|
||||||
systemd.user.services = {
|
|
||||||
flameshot.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
|
|
||||||
};
|
|
||||||
stylix.targets.i3.enable = true;
|
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
hm =
|
||||||
enable = true;
|
{ config, ... }:
|
||||||
enableSystemdTarget = true;
|
{
|
||||||
config = {
|
systemd.user.services = {
|
||||||
startup = [
|
flameshot.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
|
||||||
{
|
};
|
||||||
command = "${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --rate 60.00 --output DP-4 --mode 2560x1440 --pos 1920x720 --primary --rate 144 --output HDMI-0 --pos 0x1080 --rate 60.00";
|
stylix.targets.i3.enable = true;
|
||||||
}
|
xsession.windowManager.i3 = {
|
||||||
];
|
enable = true;
|
||||||
menu = "rofi -show drun";
|
enableSystemdTarget = true;
|
||||||
keybindings =
|
config = {
|
||||||
let
|
startup = [
|
||||||
cfg = config.xsession.windowManager.i3.config;
|
{
|
||||||
maim = "${pkgs.maim}/bin/maim -qs -b 1 --hidecursor";
|
command = "${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --rate 60.00 --output DP-4 --mode 2560x1440 --pos 1920x720 --primary --rate 144 --output HDMI-0 --pos 0x1080 --rate 60.00";
|
||||||
in
|
}
|
||||||
{
|
];
|
||||||
"Menu" = "exec ${cfg.menu}";
|
menu = "rofi -show drun";
|
||||||
"Ctrl+F9" = "exec ${config.xsession.wallpapers.script}";
|
keybindings =
|
||||||
"${cfg.modifier}+F12" =
|
|
||||||
"exec "
|
|
||||||
+ toString (
|
|
||||||
pkgs.writeShellScript "clipboard-screenshot" ''
|
|
||||||
${maim} | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
|
|
||||||
''
|
|
||||||
);
|
|
||||||
"${cfg.modifier}+F11" =
|
|
||||||
"exec "
|
|
||||||
+ toString (
|
|
||||||
pkgs.writeShellScript "clipboard-screenshot" ''
|
|
||||||
out="screenshot-$(date +"%Y-%m-%dT%H:%M:%S%:z")"
|
|
||||||
${maim} | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
|
|
||||||
''
|
|
||||||
);
|
|
||||||
"${cfg.modifier}+F10" =
|
|
||||||
let
|
let
|
||||||
nsend = ''
|
cfg = config.xsession.windowManager.i3.config;
|
||||||
${pkgs.libnotify}/bin/notify-send \
|
maim = "${pkgs.maim}/bin/maim -qs -b 1 --hidecursor";
|
||||||
-h string:category:Screenshot\
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
"exec "
|
{
|
||||||
+ toString (
|
"Menu" = "exec ${cfg.menu}";
|
||||||
pkgs.writeShellScript "clipboard-qr-screenshot" ''
|
"Ctrl+F9" = "exec ${config.xsession.wallpapers.script}";
|
||||||
set -euo pipefail
|
"${cfg.modifier}+F12" =
|
||||||
if qr=$(${maim} | ${pkgs.zbar}/bin/zbarimg -q --raw -); then
|
"exec "
|
||||||
return=$?
|
+ toString (
|
||||||
else
|
pkgs.writeShellScript "clipboard-screenshot" ''
|
||||||
return=$?
|
${maim} | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
|
||||||
fi
|
''
|
||||||
case "$return" in
|
);
|
||||||
"0")
|
"${cfg.modifier}+F11" =
|
||||||
${nsend} "Copied qr to clipboard"
|
"exec "
|
||||||
${pkgs.xclip}/bin/xclip -selection clipboard -f <<< ''${qr%"''${qr##*[![:space:]]}"}
|
+ toString (
|
||||||
exit 0
|
pkgs.writeShellScript "clipboard-screenshot" ''
|
||||||
;;
|
out="screenshot-$(date +"%Y-%m-%dT%H:%M:%S%:z")"
|
||||||
"4")
|
${maim} | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
|
||||||
${nsend} "No qr found"
|
''
|
||||||
;;
|
);
|
||||||
*)
|
"${cfg.modifier}+F10" =
|
||||||
${nsend} "Failure scanning qr"
|
let
|
||||||
;;
|
nsend = ''
|
||||||
esac
|
${pkgs.libnotify}/bin/notify-send \
|
||||||
''
|
-h string:category:Screenshot\
|
||||||
);
|
'';
|
||||||
"${cfg.modifier}+F9" =
|
in
|
||||||
"exec "
|
"exec "
|
||||||
+ toString (
|
+ toString (
|
||||||
pkgs.writeShellScript "clipboard-ocr-screenshot" ''
|
pkgs.writeShellScript "clipboard-qr-screenshot" ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
qr=$(${maim} | ${pkgs.zbar}/bin/zbarimg -q --raw -) || true
|
if qr=$(${maim} | ${pkgs.zbar}/bin/zbarimg -q --raw -); then
|
||||||
case "$?" in
|
return=$?
|
||||||
0)
|
else
|
||||||
${pkgs.libnotify}/bin/notify-send -h string:category:"Screenshot" "Copied qr to clipboard"
|
return=$?
|
||||||
${pkgs.xclip}/bin/xclip -selection clipboard -f <<< ''${qr%"''${qr##*[![:space:]]}"}
|
fi
|
||||||
exit 0
|
case "$return" in
|
||||||
;;
|
"0")
|
||||||
4)
|
${nsend} "Copied qr to clipboard"
|
||||||
${pkgs.libnotify}/bin/notify-send -h string:category:"Screenshot" "No qr found"
|
${pkgs.xclip}/bin/xclip -selection clipboard -f <<< ''${qr%"''${qr##*[![:space:]]}"}
|
||||||
;;
|
exit 0
|
||||||
*)
|
;;
|
||||||
${pkgs.libnotify}/bin/notify-send -h string:category:"Screenshot" "Failure scanning qr"
|
"4")
|
||||||
;;
|
${nsend} "No qr found"
|
||||||
esac
|
;;
|
||||||
''
|
*)
|
||||||
);
|
${nsend} "Failure scanning qr"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
''
|
||||||
|
);
|
||||||
|
"${cfg.modifier}+F9" =
|
||||||
|
"exec "
|
||||||
|
+ toString (
|
||||||
|
pkgs.writeShellScript "clipboard-ocr-screenshot" ''
|
||||||
|
set -euo pipefail
|
||||||
|
qr=$(${maim} | ${pkgs.zbar}/bin/zbarimg -q --raw -) || true
|
||||||
|
case "$?" in
|
||||||
|
0)
|
||||||
|
${pkgs.libnotify}/bin/notify-send -h string:category:"Screenshot" "Copied qr to clipboard"
|
||||||
|
${pkgs.xclip}/bin/xclip -selection clipboard -f <<< ''${qr%"''${qr##*[![:space:]]}"}
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
4)
|
||||||
|
${pkgs.libnotify}/bin/notify-send -h string:category:"Screenshot" "No qr found"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
${pkgs.libnotify}/bin/notify-send -h string:category:"Screenshot" "Failure scanning qr"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
''
|
||||||
|
);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
stylix.targets.rofi.enable = true;
|
hm.stylix.targets.rofi.enable = true;
|
||||||
programs.rofi = {
|
hm.programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
matching = "fuzzy";
|
matching = "fuzzy";
|
||||||
|
|
|
@ -113,14 +113,6 @@ in
|
||||||
"x"
|
"x"
|
||||||
"p"
|
"p"
|
||||||
];
|
];
|
||||||
"gojo" = output "eDP-1" [
|
|
||||||
"1"
|
|
||||||
"2"
|
|
||||||
"3"
|
|
||||||
"4"
|
|
||||||
"5"
|
|
||||||
"6"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
.${nixConfig.node.name} or [ ];
|
.${nixConfig.node.name} or [ ];
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
minimal,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
lib.optionalAttrs (!minimal) {
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.startx.enable = true;
|
|
||||||
autoRepeatDelay = 235;
|
|
||||||
autoRepeatInterval = 60;
|
|
||||||
videoDrivers = [ "modesetting" ];
|
|
||||||
};
|
|
||||||
services.libinput = {
|
|
||||||
enable = true;
|
|
||||||
mouse = {
|
|
||||||
accelSpeed = "0.5";
|
|
||||||
accelProfile = "flat";
|
|
||||||
middleEmulation = false;
|
|
||||||
};
|
|
||||||
touchpad = {
|
|
||||||
accelProfile = "flat";
|
|
||||||
accelSpeed = "1";
|
|
||||||
naturalScrolling = true;
|
|
||||||
disableWhileTyping = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.udev.extraRules =
|
|
||||||
let
|
|
||||||
exe = pkgs.writeShellScript "set-key-repeat" ''
|
|
||||||
if [ -d "/tmp/.X11-unix" ]; then
|
|
||||||
for D in /tmp/.X11-unix/*; do
|
|
||||||
file=$(${pkgs.coreutils}/bin/basename $D)
|
|
||||||
export DISPLAY=":''${file:1}"
|
|
||||||
user=$(${pkgs.coreutils}/bin/stat -c '%U' "$D")
|
|
||||||
# sleep to give X time to access the keyboard
|
|
||||||
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
|
|
||||||
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
''
|
|
||||||
ACTION=="add", SUBSYSTEM=="input", ATTRS{bInterfaceClass}=="03", RUN+="${exe}"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -55,6 +55,7 @@ lib.optionalAttrs (!minimal) {
|
||||||
./theme.nix
|
./theme.nix
|
||||||
|
|
||||||
./wayland
|
./wayland
|
||||||
|
./Xorg
|
||||||
|
|
||||||
./programs/bottles.nix
|
./programs/bottles.nix
|
||||||
./programs/direnv.nix
|
./programs/direnv.nix
|
||||||
|
|
|
@ -213,13 +213,13 @@ in
|
||||||
xwayland.force_zero_scaling = true;
|
xwayland.force_zero_scaling = true;
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
# fix these once nvidia gets their shit together
|
# fix these once nvidia gets their shit together
|
||||||
#"immediate, class:^(cs2)$"
|
"immediate, class:^(cs2)$"
|
||||||
# apex legends
|
# apex legends
|
||||||
"immediate, class:^(steam_app_1172470)$"
|
"immediate, class:^(steam_app_1172470)$"
|
||||||
#???
|
#???
|
||||||
"immediate, class:^(steam_app_238960)$"
|
"immediate, class:^(steam_app_238960)$"
|
||||||
#baldur
|
#baldur
|
||||||
#"immediate, class:^(steam_app_1086940)$"
|
"immediate, class:^(steam_app_1086940)$"
|
||||||
"float, class:^(steam)$, title:^(Friends List)"
|
"float, class:^(steam)$, title:^(Friends List)"
|
||||||
"float, class:^(steam)$, title:(Chat)"
|
"float, class:^(steam)$, title:(Chat)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue