home: change default terminal to wezterm
This commit is contained in:
parent
1d4760974f
commit
b06cb8ee3a
7 changed files with 93 additions and 19 deletions
66
home/modules/terminal/wezterm.nix
Normal file
66
home/modules/terminal/wezterm.nix
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.local.wezterm;
|
||||||
|
themeCfg = config.local.theme;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.local.wezterm = with lib; {
|
||||||
|
fontSize = mkOption {
|
||||||
|
type = types.number;
|
||||||
|
default = 11.0;
|
||||||
|
description = "Wezterm font size";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
programs.wezterm = {
|
||||||
|
enable = true;
|
||||||
|
colorSchemes = {
|
||||||
|
myCoolTheme = {
|
||||||
|
ansi = [
|
||||||
|
themeCfg.window.regular.color0
|
||||||
|
themeCfg.window.regular.color1
|
||||||
|
themeCfg.window.regular.color2
|
||||||
|
themeCfg.window.regular.color3
|
||||||
|
themeCfg.window.regular.color4
|
||||||
|
themeCfg.window.regular.color5
|
||||||
|
themeCfg.window.regular.color6
|
||||||
|
themeCfg.window.regular.color7
|
||||||
|
];
|
||||||
|
brights = [
|
||||||
|
themeCfg.window.bold.color8
|
||||||
|
themeCfg.window.bold.color9
|
||||||
|
themeCfg.window.bold.color10
|
||||||
|
themeCfg.window.bold.color11
|
||||||
|
themeCfg.window.bold.color12
|
||||||
|
themeCfg.window.bold.color13
|
||||||
|
themeCfg.window.bold.color14
|
||||||
|
themeCfg.window.bold.color15
|
||||||
|
];
|
||||||
|
indexed = {
|
||||||
|
"16" = themeCfg.window.extended.color16;
|
||||||
|
"17" = themeCfg.window.extended.color17;
|
||||||
|
"18" = themeCfg.window.extended.color18;
|
||||||
|
"19" = themeCfg.window.extended.color19;
|
||||||
|
};
|
||||||
|
background = themeCfg.window.background;
|
||||||
|
foreground = themeCfg.window.mainText;
|
||||||
|
cursor_bg = themeCfg.window.cursor;
|
||||||
|
cursor_border = themeCfg.window.cursor;
|
||||||
|
cursor_fg = themeCfg.window.cursorText;
|
||||||
|
selection_bg = themeCfg.window.selection;
|
||||||
|
selection_fg = themeCfg.window.selectionText;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
return {
|
||||||
|
font = wezterm.font("monospace"),
|
||||||
|
font_size = ${toString cfg.fontSize},
|
||||||
|
color_scheme = "myCoolTheme",
|
||||||
|
hide_tab_bar_if_only_one_tab = true,
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -52,7 +52,7 @@ import XMonad.Util.Run
|
||||||
-- The preferred terminal program, which is used in a binding below and by
|
-- The preferred terminal program, which is used in a binding below and by
|
||||||
-- certain contrib modules.
|
-- certain contrib modules.
|
||||||
--
|
--
|
||||||
myTerminal = "alacritty"
|
myTerminal = "wezterm start"
|
||||||
|
|
||||||
-- Whether focus follows the mouse pointer.
|
-- Whether focus follows the mouse pointer.
|
||||||
myFocusFollowsMouse = False
|
myFocusFollowsMouse = False
|
||||||
|
@ -230,12 +230,17 @@ myEventHook = mempty
|
||||||
--
|
--
|
||||||
myManageHook = manageApps
|
myManageHook = manageApps
|
||||||
where
|
where
|
||||||
|
anyOf :: [Query Bool] -> Query Bool
|
||||||
|
anyOf = foldl (<||>) (pure False)
|
||||||
|
|
||||||
role = stringProperty "WM_WINDOW_ROLE"
|
role = stringProperty "WM_WINDOW_ROLE"
|
||||||
isPopup = role =? "pop-up"
|
isPopup = role =? "pop-up"
|
||||||
isPinentry = anyOf [className =? "Gcr-promter", className =? "Pinentry"]
|
isPinentry = anyOf [className =? "Gcr-promter", className =? "Pinentry"]
|
||||||
|
|
||||||
|
isWezterm = className =? "org.wezfurlong.wezterm"
|
||||||
isAlacritty = className =? "Alacritty"
|
isAlacritty = className =? "Alacritty"
|
||||||
anyOf :: [Query Bool] -> Query Bool
|
isTerminal = anyOf [isWezterm, isAlacritty]
|
||||||
anyOf = foldl (<||>) (pure False)
|
|
||||||
tileBelow = insertPosition Below Newer
|
tileBelow = insertPosition Below Newer
|
||||||
manageApps =
|
manageApps =
|
||||||
composeOne
|
composeOne
|
||||||
|
@ -253,7 +258,7 @@ myManageHook = manageApps
|
||||||
isPinentry
|
isPinentry
|
||||||
]
|
]
|
||||||
-?> doCenterFloat,
|
-?> doCenterFloat,
|
||||||
isAlacritty -?> tileBelow
|
isTerminal -?> tileBelow
|
||||||
]
|
]
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
@ -404,9 +409,9 @@ myProjects =
|
||||||
terminal' wd' cmd' =
|
terminal' wd' cmd' =
|
||||||
myTerminal ++ workdir ++ command
|
myTerminal ++ workdir ++ command
|
||||||
where
|
where
|
||||||
workdir = " --working-directory " ++ wd'
|
workdir = " --cwd " ++ wd'
|
||||||
command = case cmd' of
|
command = case cmd' of
|
||||||
Just c -> " --command " ++ c
|
Just c -> " -- " ++ c
|
||||||
_ -> ""
|
_ -> ""
|
||||||
|
|
||||||
myPromptConfig :: XPConfig
|
myPromptConfig :: XPConfig
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
./git
|
./git
|
||||||
|
|
||||||
../../modules/window_manager
|
../../modules/window_manager
|
||||||
../../modules/terminal.nix
|
../../modules/terminal/wezterm.nix
|
||||||
|
../../modules/terminal/alacritty.nix
|
||||||
../../modules/shell.nix
|
../../modules/shell.nix
|
||||||
|
|
||||||
../../modules/notifications
|
../../modules/notifications
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/window_manager
|
../../modules/window_manager
|
||||||
../../modules/terminal.nix
|
../../modules/terminal/wezterm.nix
|
||||||
../../modules/shell.nix
|
../../modules/shell.nix
|
||||||
|
|
||||||
../../modules/notifications
|
../../modules/notifications
|
||||||
|
|
|
@ -19,7 +19,8 @@ in
|
||||||
|
|
||||||
extraHomeModule = { ... }: {
|
extraHomeModule = { ... }: {
|
||||||
local.polybar.wifiDevice = "wlp11s0f3u2";
|
local.polybar.wifiDevice = "wlp11s0f3u2";
|
||||||
local.alacritty.fontSize = 8.0;
|
# local.alacritty.fontSize = 8.0;
|
||||||
|
local.wezterm.fontSize = 11.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +37,8 @@ in
|
||||||
|
|
||||||
extraHomeModule = { ... }: {
|
extraHomeModule = { ... }: {
|
||||||
local.polybar.wifiDevice = "wlp2s0";
|
local.polybar.wifiDevice = "wlp2s0";
|
||||||
local.alacritty.fontSize = 6.0;
|
# local.alacritty.fontSize = 6.0;
|
||||||
|
local.wezterm.fontSize = 9.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
18
readme.md
18
readme.md
|
@ -30,15 +30,15 @@ User configurations are included.
|
||||||
|
|
||||||
### Core Programs
|
### Core Programs
|
||||||
|
|
||||||
| Type | Program |
|
| Type | Program |
|
||||||
| :------------- | :-------- |
|
| :------------- | :------ |
|
||||||
| Status Bar | Polybar |
|
| Status Bar | Polybar |
|
||||||
| Window Manager | XMonad |
|
| Window Manager | XMonad |
|
||||||
| Launcher | Dmenu |
|
| Launcher | Dmenu |
|
||||||
| Terminal | Alacritty |
|
| Terminal | Wezterm |
|
||||||
| Editor | Neovim |
|
| Editor | Neovim |
|
||||||
| File Manager | vifm |
|
| File Manager | vifm |
|
||||||
| Shell | Zsh |
|
| Shell | Zsh |
|
||||||
|
|
||||||
### Screenshots
|
### Screenshots
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue