activated shutdown menu by putting it in logind config (globally) and sway config
refactored dmenu to put the command into its own script and call it as a variable added opam to ocaml config refactored home-manager package list layout added nordic theme for nvim refactored weird touchpad config added fcitx5 for input method switching and added a keybind to sway
This commit is contained in:
parent
d674cbc2ec
commit
bcee64e3bf
|
|
@ -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;
|
||||
|
|
|
|||
6
home.nix
6
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
|
||||
[ ];
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
"";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue