Lots of fixy business

This commit is contained in:
2024-07-28 01:40:50 +01:00
parent 3b6a816df6
commit d6311eb216
9 changed files with 60 additions and 142 deletions

View File

@@ -67,7 +67,7 @@ in {
gid = 100; gid = 100;
}; };
xdg.portal.wlr.enable = true; xdg.portal.wlr.enable = lib.mkDefault true;
xdg.portal.config.common.default = "*"; xdg.portal.config.common.default = "*";
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:

View File

@@ -54,11 +54,6 @@
hyprland.enable = true; hyprland.enable = true;
sway.enable = true; sway.enable = true;
river = {
enable = true;
package = null;
};
steam = { steam = {
enable = true; enable = true;
}; };

View File

@@ -20,12 +20,6 @@
services.xserver = { services.xserver = {
dpi = 144; dpi = 144;
videoDrivers = ["nvidia"];
screenSection = ''
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
'';
}; };
boot.loader.systemd-boot.enable = false; boot.loader.systemd-boot.enable = false;
@@ -36,8 +30,6 @@
efiSupport = true; efiSupport = true;
}; };
boot.kernelParams = ["initcall_blacklist=simpledrm_platform_driver_init"];
time.hardwareClockInLocalTime = true; time.hardwareClockInLocalTime = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
@@ -50,9 +42,6 @@
enable = true; enable = true;
}; };
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.nvidia.modesetting.enable = true;
hardware.opengl.enable = true; hardware.opengl.enable = true;
hardware.opengl.driSupport = true; hardware.opengl.driSupport = true;

View File

@@ -1,6 +1,6 @@
{config, ...}: { {config, ...}: {
imports = [ imports = [
./i3 # ./i3
# ./i3status-rust # ./i3status-rust
# ./polybar # ./polybar
./hyprland ./hyprland

View File

@@ -40,11 +40,6 @@ in {
extraConfig = extraConfig =
(builtins.readFile ./${hostname}.conf) (builtins.readFile ./${hostname}.conf)
+ '' + ''
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch # Execute your favorite apps at launch

View File

@@ -1,7 +1,7 @@
monitor=HDMI-A-2,3840x2160@60.0,3072x0,1.25 monitor=HDMI-A-2,3840x2160@60.0,3072x0,1.25
monitor=DP-2,3840x2160@59.997002,0x0,1.25 monitor=DP-3,3840x2160@59.997002,0x0,1.25
workspace=1,monitor:DP-2 workspace=1,monitor:DP-3
$mainMod = CTRL + SHIFT + ALT $mainMod = CTRL + SHIFT + ALT

View File

@@ -2,21 +2,9 @@
config, config,
lib, lib,
pkgs, pkgs,
hostname,
... ...
}: let }: let
closer = pkgs.writeShellApplication {
name = "closer";
runtimeInputs = with pkgs; [jq xdotool];
text = ''
if [ "$(hyprctl activewindow -j | jq -r ".class")" = "Steam" ]; then
xdotool getactivewindow windowunmap
else
sway killactive ""
fi
'';
};
mod = "Mod4"; mod = "Mod4";
hyper = "Control+Shift+Mod1"; hyper = "Control+Shift+Mod1";
in { in {
@@ -30,63 +18,10 @@ in {
}; };
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
extraOptions = [
"--unsupported-gpu"
];
checkConfig = false;
extraSessionCommands = ''
export WLR_RENDERER=vulkan
export WLR_NO_HARDWARE_CURSORS=1
export XWAYLAND_NO_GLAMOR=1
export LIBVA_DRIVER_NAME=nvidia
export XDG_SESSION_TYPE=wayland
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
'';
config = { config = {
bars = [ bars = [
{ {
mode = "dock"; command = "waybar";
hiddenState = "hide";
position = "bottom";
workspaceButtons = true;
workspaceNumbers = true;
statusCommand = "${pkgs.i3status}/bin/i3status";
fonts = {
names = ["monospace"];
size = 12.0;
};
trayOutput = "primary";
colors = {
background = "#000000";
statusline = "#ffffff";
separator = "#666666";
focusedWorkspace = {
border = "#4c7899";
background = "#285577";
text = "#ffffff";
};
activeWorkspace = {
border = "#333333";
background = "#5f676a";
text = "#ffffff";
};
inactiveWorkspace = {
border = "#333333";
background = "#222222";
text = "#888888";
};
urgentWorkspace = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
};
bindingMode = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
};
};
} }
]; ];
input = { input = {
@@ -94,7 +29,11 @@ in {
xkb_layout = "gb"; xkb_layout = "gb";
xkb_options = "caps:escape"; xkb_options = "caps:escape";
tap = "enabled"; tap = "enabled";
natural_scroll = "enabled"; natural_scroll = if hostname == "sidon" then "disabled" else "enabled";
};
"type:pointer" = {
accel_profile = "flat";
pointer_accel = "-0.2";
}; };
}; };
output = { output = {
@@ -102,20 +41,20 @@ in {
scale = "1.33"; scale = "1.33";
}; };
DP-2 = { DP-3 = {
position = "0 0"; position = "0 0";
scale = "1.33"; scale = "1.33";
}; };
HDMI-A-2 = { HDMI-A-1 = {
scale = "1.33"; scale = "1.33";
}; };
}; };
keybindings = { keybindings = {
"${mod}+Return" = "exec kitty"; "${mod}+Return" = "exec kitty";
"${mod}+q" = "${closer}/bin/closer"; "${mod}+q" = "kill";
"${mod}+d" = "exec tofi-drun --drun-launch=true"; "${mod}+d" = "exec tofi-drun --drun-launch=true";
"${hyper}+Return" = "exec kitty"; "${hyper}+Return" = "exec kitty";
"${hyper}+q" = "${closer}/bin/closer"; "${hyper}+q" = "kill";
"${hyper}+d" = "exec tofi-drun --drun-launch=true"; "${hyper}+d" = "exec tofi-drun --drun-launch=true";
"${mod}+h" = "focus left"; "${mod}+h" = "focus left";
@@ -123,17 +62,33 @@ in {
"${mod}+k" = "focus up"; "${mod}+k" = "focus up";
"${mod}+l" = "focus right"; "${mod}+l" = "focus right";
"${hyper}+h" = "focus left";
"${hyper}+j" = "focus down";
"${hyper}+k" = "focus up";
"${hyper}+l" = "focus right";
"${mod}+Left" = "movewindow left"; "${mod}+Left" = "movewindow left";
"${mod}+Up" = "movewindow up"; "${mod}+Up" = "movewindow up";
"${mod}+Down" = "movewindow down"; "${mod}+Down" = "movewindow down";
"${mod}+Right" = "movewindow right"; "${mod}+Right" = "movewindow right";
"${hyper}+Left" = "movewindow left";
"${hyper}+Up" = "movewindow up";
"${hyper}+Down" = "movewindow down";
"${hyper}+Right" = "movewindow right";
"${mod}+Shift+h" = "exec ${config.home.homeDirectory}/bin/swayutils move prev"; "${mod}+Shift+h" = "exec ${config.home.homeDirectory}/bin/swayutils move prev";
"${mod}+Shift+l" = "exec ${config.home.homeDirectory}/bin/swayutils move next"; "${mod}+Shift+l" = "exec ${config.home.homeDirectory}/bin/swayutils move next";
"${mod}+Control+h" = "exec ${config.home.homeDirectory}/bin/swayutils focus prev"; "${mod}+Control+h" = "exec ${config.home.homeDirectory}/bin/swayutils focus prev";
"${mod}+Control+l" = "exec ${config.home.homeDirectory}/bin/swayutils focus next"; "${mod}+Control+l" = "exec ${config.home.homeDirectory}/bin/swayutils focus next";
"${hyper}+u" = "exec ${config.home.homeDirectory}/bin/swayutils move prev";
"${hyper}+i" = "exec ${config.home.homeDirectory}/bin/swayutils move next";
"${hyper}+m" = "exec ${config.home.homeDirectory}/bin/swayutils focus prev";
"${hyper}+Comma" = "exec ${config.home.homeDirectory}/bin/swayutils focus next";
"${hyper}+y" = "move left"; "${hyper}+y" = "move left";
"${hyper}+o" = "move right"; "${hyper}+o" = "move right";
@@ -146,25 +101,6 @@ in {
"${hyper}+b" = "split h"; "${hyper}+b" = "split h";
"${hyper}+v" = "split v"; "${hyper}+v" = "split v";
"${mod}+Control+Return" = "exec --no-startup-id i3utils workspace new";
"${mod}+Control+Shift+Return" = "exec --no-startup-id i3utils workspace new -b";
"${mod}+Shift+Return" = "exec --no-startup-id i3utils workspace new -n, move next";
# "${mod}+Control+j" = "exec --no-startup-id $HOME/bin/scripts/godown";
# "${mod}+Control+k" = "exec --no-startup-id $HOME/bin/scripts/goup";
# "${mod}+Control+u" = "exec --no-startup-id $HOME/bin/scripts/godown";
# "${mod}+Control+i" = "exec --no-startup-id $HOME/bin/scripts/goup";
# "${mod}+Control+h" = "exec --no-startup-id i3utils workspace new -b";
"${hyper}+m" = "exec --no-startup-id $HOME/bin/scripts/godown";
"${hyper}+comma" = "exec --no-startup-id $HOME/bin/scripts/goup";
"${mod}+Shift+k" = "exec --no-startup-id i3utils window move prev";
"${mod}+Shift+j" = "exec --no-startup-id i3utils window move next";
"${hyper}+i" = "exec --no-startup-id i3utils window move prev";
"${hyper}+u" = "exec --no-startup-id i3utils window move next";
"${mod}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center"; "${mod}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center";
"${hyper}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center"; "${hyper}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center";
@@ -173,9 +109,9 @@ in {
"${hyper}+f" = "fullscreen toggle"; "${hyper}+f" = "fullscreen toggle";
"XF86AudioLowerVolume" = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-"; "XF86AudioLowerVolume" = "exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioRaiseVolume" = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"; "XF86AudioRaiseVolume" = "exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+";
"XF86MonBrightnessUp" = "exec xbacklight -inc 10"; "XF86MonBrightnessUp" = "exec xbacklight -inc 10";
"XF86MonBrightnessDown" = "exec xbacklight -dec 10"; "XF86MonBrightnessDown" = "exec xbacklight -dec 10";

View File

@@ -1,25 +1,22 @@
{ {
"layer": "top", "layer": "top",
"modules-left": [ "modules-left": [
"hyprland/workspaces", "sway/workspaces",
"hyprland/window", "sway/window"
"river/tags",
"river/mode",
"river/layout",
"river/window"
], ],
"modules-center": [ "modules-center": [
"clock" "clock"
], ],
"modules-right": [ "modules-right": [
"backlight", "backlight",
"pulseaudio/slider",
"pulseaudio", "pulseaudio",
"network", "network",
"battery", "battery",
"tray" "tray"
], ],
"hyprland/window": { "wlr/taskbar": {
"separate-outputs": true "format": "{icon} {title}"
}, },
"network": { "network": {
"tooltip-format": "{ipaddr}", "tooltip-format": "{ipaddr}",
@@ -50,16 +47,15 @@
"" ""
] ]
}, },
"hyprland/workspaces": { "sway/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace -1", "format": "{icon}",
"on-scroll-down": "hyprctl dispatch workspace +1",
"on-click": "activate",
"format": "{id}",
"format-icons": { "format-icons": {
"urgent": "", "urgent": "",
"active": "", "active": "",
"default": "" "default": ""
}, },
"disable-scroll-wraparound": true,
"disable-markup": false,
"persistent-workspaces": { "persistent-workspaces": {
"DP-2": ["sidebar"], "DP-2": ["sidebar"],
"HDMI-A-2": [2,3,4,5,6] "HDMI-A-2": [2,3,4,5,6]

View File

@@ -1,6 +1,16 @@
@import "macchiato.css"; @import "macchiato.css";
* {
border: none;
border-radius: 0;
min-height: 10px;
font-family: "Iosevka Nerd Font Propo", "Font Awesome";
font-size: 16px;
min-height: 0;
}
window#waybar { window#waybar {
margin-top: 5px;
background: @base; background: @base;
color: @text; color: @text;
} }
@@ -10,10 +20,15 @@ window#waybar {
} }
#workspaces button { #workspaces button {
padding: 0 5px;
color: @text; color: @text;
border-bottom: 2px solid @base; border-bottom: 2px solid @base;
} }
#workspaces button label {
font-size: 10px;
}
#workspaces button:hover { #workspaces button:hover {
box-shadow: inherit; box-shadow: inherit;
text-shadow: inherit; text-shadow: inherit;
@@ -22,7 +37,7 @@ window#waybar {
border-color: @surface1; border-color: @surface1;
} }
#workspaces button.active { #workspaces button.focused {
color: @green; color: @green;
background: @surface1; background: @surface1;
border-color: currentcolor; border-color: currentcolor;
@@ -38,15 +53,7 @@ window#waybar {
background: @yellow; background: @yellow;
} }
* { #tray, #battery, #backlight, #pulseaudio, #network {
border: none;
border-radius: 0;
min-height: 0;
font-family: "Iosevka Nerd Font Propo", "Font Awesome";
font-size: 16px;
}
#workspaces, #tray, #battery, #backlight, #pulseaudio, #network {
padding: 0 5px; padding: 0 5px;
} }