Switched terminal to Alacritty from Wezterm and refactored to not hardcode the terminal in a bunch of places

Removed kde connect
Added multi touch gestures!!!
This commit is contained in:
vorboyvo 2024-02-06 09:32:42 -05:00
parent 0c602619b1
commit baa80b4c35
2 changed files with 19 additions and 31 deletions

View file

@ -2,6 +2,7 @@
let
scripts = ./scripts;
terminal = pkgs.alacritty;
in
{
home.username = "alice";
@ -23,7 +24,7 @@ in
(with ocamlPackages; [ ocaml opam dune_3 dune-release merlin ocaml-lsp odoc ocamlformat utop ]) ++ # OCaml
[ grim slurp wl-clipboard jq (callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix {}) ] ++ # Basic utilities
[ bitwarden-cli ] ++ # Personalized selection of command-line (CLI/TUI) apps
[ wezterm ] ++ # Terminal emulator
[ terminal ] ++ # Terminal emulator
[ 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
[ (callPackage ./pkgs/mons/mons.nix {}) ] ++ # Games
@ -56,7 +57,7 @@ in
extraConfig = { init.defaultBranch = "main"; };
};
wayland.windowManager.sway = import ./programs/sway.nix { inherit scripts config lib pkgs; };
wayland.windowManager.sway = import ./programs/sway.nix { inherit scripts config lib pkgs terminal; };
programs.swaylock = {
enable = true;
@ -78,28 +79,11 @@ in
xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source = ./extra/20-default-fonts.conf;
# fix nemo terminal integration
dconf.settings."org/cinnamon/desktop/applications/terminal".exec = "wezterm";
dconf.settings."org/cinnamon/desktop/applications/terminal".exec = "${pkgs.lib.getExe terminal}" ;
# dconf.settings."org/cinnamon/desktop/applications/terminal".exec-arg = "-e --cwd %F";
# terminal emulator
programs.wezterm = {
enable = true;
enableBashIntegration = true;
extraConfig = ''
-- Use Config Builder
config = wezterm.config_builder()
config.hide_tab_bar_if_only_one_tab = true
config.enable_scroll_bar = true
config.window_padding = {
left = 0,
right = 1,
top = 0,
bottom = 0,
}
return config
'';
};
programs.alacritty.enable = true;
programs.neovim = import ./programs/neovim.nix;
@ -118,11 +102,6 @@ in
enable = true;
};
services.kdeconnect = {
enable = true;
indicator = true;
};
programs.firefox = import ./programs/firefox.nix {inherit pkgs;};
programs.thunderbird = import ./programs/thunderbird.nix;

View file

@ -1,4 +1,4 @@
{ scripts, config, lib, pkgs, ... }:
{ scripts, config, lib, pkgs, terminal, ... }@inputs:
let
@ -7,11 +7,10 @@ let
mod = config.wayland.windowManager.sway.config.modifier;
dmenuCommand = builtins.readFile "${scripts}/dmenu.sh";
shutdownMenu = pkgs.writeShellScript "shutdownmenu" (builtins.readFile "${scripts}/shutdownmenu.sh");
terminal = "wezterm";
in {
enable = true;
config = rec {
inherit terminal;
terminal = "${pkgs.lib.getExe inputs.terminal}";
modifier = "Mod4";
fonts = {
names = [ "Red Hat Display" ];
@ -48,8 +47,9 @@ in {
XF86PowerOff = "exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}";
} // {
"${mod}+space" = "exec fcitx5-remote -t";
} // {
});
menu = "j4-dmenu-desktop --no-generic --term=${terminal} --dmenu='${dmenuCommand}'";
menu = "j4-dmenu-desktop --no-generic --term=${pkgs.lib.getExe inputs.terminal} --dmenu='${dmenuCommand}'";
focus.followMouse = false;
};
extraConfig =
@ -62,5 +62,14 @@ in {
''
exec dunst
'' + # Enable notifications
''
bindgesture swipe:4:up focus parent
bindgesture swipe:4:left workspace prev
bindgesture swipe:4:right workspace next
bindgesture swipe:3:up focus up
bindgesture swipe:3:down focus down
bindgesture swipe:3:left focus left
bindgesture swipe:3:right focus right
'' +
"";
}