Switch to alacritty + tmux, with an option to easily enable kitty
This commit is contained in:
parent
781e023c74
commit
f32658c636
31
common/users/cameron/home-manager/alacritty.nix
Normal file
31
common/users/cameron/home-manager/alacritty.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ pkgs, lib, inputs, config, osConfig, ... }:
|
||||
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = config.term == "alacritty";
|
||||
|
||||
settings = {
|
||||
window = {
|
||||
opacity = 0.95;
|
||||
dynamic_padding = true;
|
||||
};
|
||||
|
||||
"colors.primary" = {
|
||||
foreground = "#cccccc";
|
||||
background = "#333333";
|
||||
};
|
||||
|
||||
cursor = {
|
||||
"style.blinking" = "On";
|
||||
blink_interval = 500;
|
||||
blink_timeout = 15;
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide_when_typing = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
runInTerm = if (config.term == "alacritty") then "${pkgs.alacritty}/bin/alacritty -e" else lib.mkDefault "";
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, osConfig, ... }:
|
||||
{ pkgs, lib, config, osConfig, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf (builtins.elem "hyprland" osConfig.desktop) (
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$term" = "kitty";
|
||||
"$term" = "${config.term}";
|
||||
"$browser" = "firefox";
|
||||
"$menu" = "dmenu_path | wmenu -p 'Run:' -l 10 | xargs hyprctl dispatch exec";
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, Return, exec, $term"
|
||||
"$mod, Return, exec, ${config.runInTerm} ${pkgs.tmux}"
|
||||
"$mod, B, exec, $browser"
|
||||
"$mod, E, killactive,"
|
||||
"$mod, Q, exec, hyprctl kill"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{ pkgs, lib, osConfig, ... }:
|
||||
{ pkgs, lib, config, osConfig, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = (builtins.length osConfig.desktop) != 0;
|
||||
enable = config.term == "kitty";
|
||||
|
||||
settings = {
|
||||
background = "#333333";
|
||||
@ -14,4 +14,6 @@
|
||||
update_check_interval = 0;
|
||||
};
|
||||
};
|
||||
|
||||
runInTerm = if (config.term == "kitty") then "${pkgs.kitty}/bin/kitty" else lib.mkDefault "";
|
||||
}
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
with lib; {
|
||||
options = {
|
||||
defaultTerminal = mkOption {
|
||||
default = "kitty";
|
||||
type = types.str;
|
||||
term = mkOption {
|
||||
default = "";
|
||||
type = types.enum [ "" "kitty" "alacritty" ];
|
||||
};
|
||||
|
||||
terminal = mkOption {
|
||||
default = "${pkgs.kitty}/bin/kitty";
|
||||
type = types.path;
|
||||
runInTerm = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
terminal = "${config.term}";
|
||||
|
||||
menu = "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.wmenu}/bin/wmenu -p 'Run:' -l 10 | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
menu = config.wayland.windowManager.sway.config.menu;
|
||||
in lib.mkOptionDefault {
|
||||
"${mod}+c" = "mark --toggle caffeine";
|
||||
"${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty";
|
||||
"${mod}+Return" = "exec ${config.runInTerm} ${pkgs.tmux}";
|
||||
"${mod}+n" = "exec ${pkgs.firefox}/bin/firefox";
|
||||
"${mod}+d" = "exec pkill wmenu || ${menu}";
|
||||
"${mod}+Shift+q" = "kill";
|
||||
|
@ -1,14 +1,12 @@
|
||||
{ pkgs, lib, osConfig, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf (builtins.elem "hyprland" osConfig.desktop || builtins.elem "sway" osConfig.desktop)
|
||||
{ programs.swaylock = {
|
||||
enable = true;
|
||||
programs.swaylock = {
|
||||
enable = builtins.elem "hyprland" osConfig.desktop || builtins.elem "sway" osConfig.desktop;
|
||||
settings = {
|
||||
ignore-empty-password = true;
|
||||
color = "333333";
|
||||
image = "${./other-files/wallpapers/lake.jpg}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
25
common/users/cameron/home-manager/tmux.nix
Normal file
25
common/users/cameron/home-manager/tmux.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ pkgs, lib, inputs, config, osConfig, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
terminal = "tmux-256color";
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
|
||||
extraConfig = ''
|
||||
set -g prefix C-a
|
||||
set -g prefix2 C-k
|
||||
|
||||
|
||||
set -g status-right '"#T"'
|
||||
set -g status-style 'bg=#262626 fg=#cccccc'
|
||||
set-hook -g window-linked 'set -F status "#{?#{==:#{session_windows},1},off,on}"'
|
||||
set-hook -g window-unlinked 'set -F status "#{?#{==:#{session_windows},1},off,on}"'
|
||||
|
||||
|
||||
set -ga terminal-overrides ",*:Tc"
|
||||
'';
|
||||
};
|
||||
}
|
@ -129,7 +129,7 @@
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
on-click = "${config.terminal} pulsemixer";
|
||||
on-click = "${config.runInTerm} ${pkgs.pulsemixer}";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -13,8 +13,11 @@
|
||||
./home-manager/swaylock.nix
|
||||
./home-manager/waybar.nix
|
||||
|
||||
./home-manager/alacritty.nix
|
||||
./home-manager/kitty.nix
|
||||
./home-manager/zsh.nix
|
||||
./home-manager/nvim.nix
|
||||
./home-manager/tmux.nix
|
||||
./home-manager/lf.nix
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user