diff --git a/i3/.config/i3/config b/i3/.config/i3/config new file mode 100644 index 0000000..ca16fb0 --- /dev/null +++ b/i3/.config/i3/config @@ -0,0 +1,130 @@ +# i3 config generated to mimic your sway config + +# Set mod key (Mod1 = Alt) +set $mod Mod1 +set $left h +set $down j +set $up k +set $right l +set $term alacritty + +# Window borders +new_window pixel + +exec --no-startup-id picom --backend glx --vsync +exec --no-startup-id nm-applet + +# Key bindings +bindsym $mod+Return exec $term +bindsym $mod+q kill +bindsym $mod+d exec --no-startup-id dmenu_run + +# Floating modifier +floating_modifier $mod + +# Reload config +bindsym $mod+Shift+r reload + +# Exit i3 +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3? This will end your session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# Move focus +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Move windows +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Workspaces +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# Layouts +bindsym $mod+v split h +bindsym $mod+c split v +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split +bindsym $mod+f fullscreen +bindsym $mod+Shift+space floating toggle +bindsym $mod+space focus mode_toggle +bindsym $mod+a focus parent + +# Scratchpad +bindsym $mod+Shift+minus move scratchpad +bindsym $mod+minus scratchpad show + +# Resize mode +mode "resize" { + bindsym $left resize shrink width 10 px + bindsym $down resize grow height 10 px + bindsym $up resize shrink height 10 px + bindsym $right resize grow width 10 px + bindsym Left resize shrink width 10 px + bindsym Down resize grow height 10 px + bindsym Up resize shrink height 10 px + bindsym Right resize grow width 10 px + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +# Audio & brightness keys +bindsym --release XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym --release XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym --release XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym --release XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle + +bindsym --release XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- +bindsym --release XF86MonBrightnessUp exec --no-startup-id brightnessctl set 5%+ + +# Screenshot (use scrot instead of grim) +bindsym Print exec scrot ~/Pictures/screenshot-%Y-%m-%d-%H%M%S.png + +# Status bar (use i3bar + i3status) +bar { + status_command i3status +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 13f6f0b..d800eac 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -17,24 +17,10 @@ time.timeZone = "Europe/Oslo"; - services.xserver.videoDrivers = [ - "nvidia" - "amdgpu" - "modesetting" - "intel" - ]; - hardware.nvidia = { - modesetting.enable = true; - nvidiaSettings = true; - open = false; - package = config.boot.kernelPackages.nvidiaPackages.beta; - powerManagement.enable = true; - powerManagement.finegrained = false; - prime = { - sync.enable = true; - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; + services.xserver = { + enable = true; + windowManager.i3.enable = true; + displayManager.gdm.enable = true; }; services.gnome.gnome-keyring.enable = true; @@ -47,7 +33,14 @@ services.printing.enable = true; hardware.uinput.enable = true; - services.libinput.enable = true; + services.libinput = { + enable = true; + touchpad = { + disableWhileTyping = true; + tapping = false; + }; + }; + services.kanata = { enable = true; keyboards.default.configFile = "/etc/nixos/kanata.kbd"; @@ -63,20 +56,6 @@ programs.firefox.enable = true; - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; - }; - services.greetd = { - enable = true; - settings = { - default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd \"sway --unsupported-gpu\""; - user = "greeter"; - }; - }; - }; - services.tlp = { enable = true; settings = { @@ -87,14 +66,11 @@ RUNTIME_PM_ON_BAT = "auto"; }; }; - hardware.graphics.enable=true; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "discord" "steam" "steam-unwrapped" - "nvidia-x11" - "nvidia-settings" ]; programs.steam.enable = true; @@ -124,14 +100,18 @@ discord fzf godot - grim mako networkmanagerapplet - slurp unzip - waybar - wl-clipboard xorg.xauth + picom + dunst + xclip + dmenu + pulseaudio + brightnessctl + bruno + gnumake ]; programs.mtr.enable = true; @@ -140,6 +120,11 @@ enableSSHSupport = true; }; + environment.variables = { + GTK_THEME = "Adwaita:dark"; + QT_QPA_PLATFORMTHEME = "gtk2"; + }; + system.stateVersion = "25.05"; # dont change ever } diff --git a/xprofile/.xprofile b/xprofile/.xprofile new file mode 100644 index 0000000..b39a73c --- /dev/null +++ b/xprofile/.xprofile @@ -0,0 +1,2 @@ +export GTK_THEME="Adwaita:dark"; +export QT_QPA_PLATFORMTHEME="gtk2";