diff --git a/hosts/common/default.nix b/hosts/common/default.nix index c68d6f7..22a2d72 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -67,7 +67,7 @@ in { gid = 100; }; - xdg.portal.wlr.enable = true; + xdg.portal.wlr.enable = lib.mkDefault true; xdg.portal.config.common.default = "*"; # List packages installed in system profile. To search, run: diff --git a/hosts/common/graphical/default.nix b/hosts/common/graphical/default.nix index fcc3537..5bffa87 100644 --- a/hosts/common/graphical/default.nix +++ b/hosts/common/graphical/default.nix @@ -54,11 +54,6 @@ hyprland.enable = true; sway.enable = true; - river = { - enable = true; - package = null; - }; - steam = { enable = true; }; diff --git a/hosts/sidon/configuration.nix b/hosts/sidon/configuration.nix index d0cc7b9..3595d20 100644 --- a/hosts/sidon/configuration.nix +++ b/hosts/sidon/configuration.nix @@ -20,12 +20,6 @@ services.xserver = { 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; @@ -36,8 +30,6 @@ efiSupport = true; }; - boot.kernelParams = ["initcall_blacklist=simpledrm_platform_driver_init"]; - time.hardwareClockInLocalTime = true; environment.sessionVariables.NIXOS_OZONE_WL = "1"; @@ -50,9 +42,6 @@ enable = true; }; - hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; - hardware.nvidia.modesetting.enable = true; - hardware.opengl.enable = true; hardware.opengl.driSupport = true; diff --git a/users/configs/desktop/default.nix b/users/configs/desktop/default.nix index de217dc..a4f7f97 100644 --- a/users/configs/desktop/default.nix +++ b/users/configs/desktop/default.nix @@ -1,6 +1,6 @@ {config, ...}: { imports = [ - ./i3 + # ./i3 # ./i3status-rust # ./polybar ./hyprland diff --git a/users/configs/desktop/hyprland/default.nix b/users/configs/desktop/hyprland/default.nix index fdcaa3e..7433d46 100644 --- a/users/configs/desktop/hyprland/default.nix +++ b/users/configs/desktop/hyprland/default.nix @@ -40,11 +40,6 @@ in { extraConfig = (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 # Execute your favorite apps at launch diff --git a/users/configs/desktop/hyprland/sidon.conf b/users/configs/desktop/hyprland/sidon.conf index db27764..31a7ccb 100644 --- a/users/configs/desktop/hyprland/sidon.conf +++ b/users/configs/desktop/hyprland/sidon.conf @@ -1,7 +1,7 @@ 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 diff --git a/users/configs/desktop/sway/default.nix b/users/configs/desktop/sway/default.nix index 4c46322..95a9595 100644 --- a/users/configs/desktop/sway/default.nix +++ b/users/configs/desktop/sway/default.nix @@ -2,21 +2,9 @@ config, lib, pkgs, + hostname, ... }: 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"; hyper = "Control+Shift+Mod1"; in { @@ -30,63 +18,10 @@ in { }; wayland.windowManager.sway = { 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 = { bars = [ { - mode = "dock"; - 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"; - }; - }; + command = "waybar"; } ]; input = { @@ -94,7 +29,11 @@ in { xkb_layout = "gb"; xkb_options = "caps:escape"; tap = "enabled"; - natural_scroll = "enabled"; + natural_scroll = if hostname == "sidon" then "disabled" else "enabled"; + }; + "type:pointer" = { + accel_profile = "flat"; + pointer_accel = "-0.2"; }; }; output = { @@ -102,20 +41,20 @@ in { scale = "1.33"; }; - DP-2 = { + DP-3 = { position = "0 0"; scale = "1.33"; }; - HDMI-A-2 = { + HDMI-A-1 = { scale = "1.33"; }; }; keybindings = { "${mod}+Return" = "exec kitty"; - "${mod}+q" = "${closer}/bin/closer"; + "${mod}+q" = "kill"; "${mod}+d" = "exec tofi-drun --drun-launch=true"; "${hyper}+Return" = "exec kitty"; - "${hyper}+q" = "${closer}/bin/closer"; + "${hyper}+q" = "kill"; "${hyper}+d" = "exec tofi-drun --drun-launch=true"; "${mod}+h" = "focus left"; @@ -123,17 +62,33 @@ in { "${mod}+k" = "focus up"; "${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}+Up" = "movewindow up"; "${mod}+Down" = "movewindow down"; "${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+l" = "exec ${config.home.homeDirectory}/bin/swayutils move next"; "${mod}+Control+h" = "exec ${config.home.homeDirectory}/bin/swayutils focus prev"; "${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}+o" = "move right"; @@ -146,25 +101,6 @@ in { "${hyper}+b" = "split h"; "${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"; "${hyper}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center"; @@ -173,9 +109,9 @@ in { "${hyper}+f" = "fullscreen toggle"; - "XF86AudioLowerVolume" = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-"; - "XF86AudioMute" = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - "XF86AudioRaiseVolume" = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"; + "XF86AudioLowerVolume" = "exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-"; + "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + "XF86AudioRaiseVolume" = "exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"; "XF86MonBrightnessUp" = "exec xbacklight -inc 10"; "XF86MonBrightnessDown" = "exec xbacklight -dec 10"; diff --git a/users/configs/desktop/waybar/config.json b/users/configs/desktop/waybar/config.json index 247aae0..fdebb68 100644 --- a/users/configs/desktop/waybar/config.json +++ b/users/configs/desktop/waybar/config.json @@ -1,25 +1,22 @@ { "layer": "top", "modules-left": [ - "hyprland/workspaces", - "hyprland/window", - "river/tags", - "river/mode", - "river/layout", - "river/window" + "sway/workspaces", + "sway/window" ], "modules-center": [ "clock" ], "modules-right": [ "backlight", + "pulseaudio/slider", "pulseaudio", "network", "battery", "tray" ], - "hyprland/window": { - "separate-outputs": true + "wlr/taskbar": { + "format": "{icon} {title}" }, "network": { "tooltip-format": "{ipaddr}", @@ -50,16 +47,15 @@ "" ] }, - "hyprland/workspaces": { - "on-scroll-up": "hyprctl dispatch workspace -1", - "on-scroll-down": "hyprctl dispatch workspace +1", - "on-click": "activate", - "format": "{id}", + "sway/workspaces": { + "format": "{icon}", "format-icons": { "urgent": "", "active": "", "default": "" }, + "disable-scroll-wraparound": true, + "disable-markup": false, "persistent-workspaces": { "DP-2": ["sidebar"], "HDMI-A-2": [2,3,4,5,6] diff --git a/users/configs/desktop/waybar/style.css b/users/configs/desktop/waybar/style.css index 3366270..0828bde 100644 --- a/users/configs/desktop/waybar/style.css +++ b/users/configs/desktop/waybar/style.css @@ -1,6 +1,16 @@ @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 { + margin-top: 5px; background: @base; color: @text; } @@ -10,10 +20,15 @@ window#waybar { } #workspaces button { + padding: 0 5px; color: @text; border-bottom: 2px solid @base; } +#workspaces button label { + font-size: 10px; +} + #workspaces button:hover { box-shadow: inherit; text-shadow: inherit; @@ -22,7 +37,7 @@ window#waybar { border-color: @surface1; } -#workspaces button.active { +#workspaces button.focused { color: @green; background: @surface1; border-color: currentcolor; @@ -38,15 +53,7 @@ window#waybar { background: @yellow; } -* { - 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 { +#tray, #battery, #backlight, #pulseaudio, #network { padding: 0 5px; }