diff --git a/configuration.nix b/configuration.nix index 715e437..915e4a9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -67,6 +67,8 @@ # Set login and power management options services.logind.lidSwitch = "suspend"; services.logind.lidSwitchDocked = "ignore"; # when an external monitor is plugged in + services.logind.powerKey = "ignore"; # handle this WM side + services.logind.powerKeyLongPress = "poweroff"; # Enable graphics. hardware.opengl.enable = true; diff --git a/home.nix b/home.nix index ea15b28..6b647c6 100644 --- a/home.nix +++ b/home.nix @@ -19,14 +19,14 @@ in # Install packages home.packages = with pkgs; [ texliveFull ] ++ # TeX distribution - (with ocamlPackages; [ ocaml dune_3 dune-release merlin ocaml-lsp odoc ocamlformat utop ]) ++ # OCaml + (with ocamlPackages; [ ocaml opam dune_3 dune-release merlin ocaml-lsp odoc ocamlformat utop ]) ++ # OCaml [ grim slurp wl-clipboard jq ] ++ # Basic utilities [ bitwarden-cli ] ++ # Personalized selection of command-line (CLI/TUI) apps [ wezterm ] ++ # Terminal emulator - [ firefox cinnamon.nemo gnome.file-roller cinnamon.nemo-fileroller imv vlc pavucontrol grim slurp wl-clipboard ] ++ # Basic graphical apps + [ firefox cinnamon.nemo gnome.file-roller cinnamon.nemo-fileroller imv vlc pavucontrol ] ++ # Basic graphical apps [ libreoffice signal-desktop element-desktop prismlauncher mumble gimp inkscape ] ++ # Personalized selection of graphical apps # [ factorio ] ++ # Games - [ bemenu j4-dmenu-desktop ] ++ # Sway-related packages + [ bemenu j4-dmenu-desktop fcitx5-with-addons grim slurp wl-clipboard ] ++ # Sway- and Wayland-related packages [ noto-fonts redhat-official-fonts overpass ibm-plex ] ++ # Fonts # [ vanilla-dmz ] ++ # Cursor [ ]; diff --git a/programs/neovim/init.lua b/programs/neovim/init.lua index 92c702e..d350b11 100644 --- a/programs/neovim/init.lua +++ b/programs/neovim/init.lua @@ -35,6 +35,14 @@ plugins = { }, ["name"] = "nvim-lspconfig" }, + { + 'AlexvZyl/nordic.nvim', + lazy = false, + priority = 1000, + config = function() + require 'nordic' .load() + end + }, } require("lazy").setup(plugins) diff --git a/programs/sway.nix b/programs/sway.nix index 67c72c5..7b6b33c 100644 --- a/programs/sway.nix +++ b/programs/sway.nix @@ -5,6 +5,8 @@ let dynscreenshot = pkgs.writeShellScript "dynscreenshot" (builtins.readFile "${scripts}/dynscreenshot.sh"); changebrightness = pkgs.writeShellScript "changebrightness" (builtins.readFile "${scripts}/changebrightness.sh"); mod = config.wayland.windowManager.sway.config.modifier; + dmenuCommand = builtins.readFile "${scripts}/dmenu.sh"; + shutdownMenu = pkgs.writeShellScript "shutdownmenu" (builtins.readFile "${scripts}/shutdownmenu.sh"); in { enable = true; config = rec { @@ -15,7 +17,11 @@ in { style = "Regular"; size = 12.0; }; - input = { "type:touchpad" = { natural_scroll = "disabled"; }; }; + input."type:touchpad" = { + natural_scroll = "disabled"; + dwt = "disabled"; + click_method = "clickfinger"; + }; bars = let config = config; in [{ position = "top"; inherit fonts; @@ -36,8 +42,11 @@ in { XF86AudioLowerVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; "${mod}+XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05+"; "${mod}+XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05-"; + XF86PowerOff = "exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}"; + } // { + "${mod}+space" = "exec fcitx5-remote -t"; }); - menu = "j4-dmenu-desktop --no-generic --term=wezterm --dmenu='bemenu -i --fn Red Hat Display 12 -H 24 -p \"\" -B 2 --hp 5'"; # I don't like hardcoding kitty here, TODO think of better way to do it + menu = "j4-dmenu-desktop --no-generic --term=wezterm --dmenu='${dmenuCommand}'"; # I don't like hardcoding kitty here, TODO think of better way to do it focus.followMouse = false; }; extraConfig = @@ -45,9 +54,7 @@ in { output 'eDP-1' scale 1.50 '' + # Fractional scaling to 1.50 '' - input type:touchpad { - dwt disabled - click_method clickfinger - } - ''; # Disable fake scroll direction and disabling touchpad while typing, enable multi finger clicking + exec fcitx5 + '' + # Fcitx5 enables input method switching + ""; } diff --git a/scripts/dmenu.sh b/scripts/dmenu.sh index 2d13550..89d411c 100644 --- a/scripts/dmenu.sh +++ b/scripts/dmenu.sh @@ -1 +1 @@ -bemenu -i --fn Red Hat Display 12 -H 24 -p \"\" -B 2 --hp 5' +bemenu -i --fn Red Hat Display 12 -H 24 -p "" -B 2 --hp 5 \ No newline at end of file diff --git a/scripts/shutdownmenu.sh b/scripts/shutdownmenu.sh index e722265..5a63214 100644 --- a/scripts/shutdownmenu.sh +++ b/scripts/shutdownmenu.sh @@ -1,4 +1,4 @@ -case `printf "Cancel\nSuspend\nPower Off\nReboot\nLog Out" | sh dmenu.sh` in +case `printf "Cancel\nSuspend\nPower Off\nReboot\nLog Out" | $DMENU_COMMAND` in "Cancel") : ;; @@ -14,3 +14,4 @@ case `printf "Cancel\nSuspend\nPower Off\nReboot\nLog Out" | sh dmenu.sh` in "Log Out") loginctl kill-session ;; +esac