fix(sway): Change default terminal to alacritty
Wezterm doesn't work well in sway-git
This commit is contained in:
parent
c9b2415384
commit
0430bc9878
3 changed files with 26 additions and 12 deletions
|
@ -37,13 +37,14 @@ in
|
||||||
programs.waybar.systemd.enable = true;
|
programs.waybar.systemd.enable = true;
|
||||||
programs.waybar.settings = import ./waybar-settings.nix { inherit config lib; };
|
programs.waybar.settings = import ./waybar-settings.nix { inherit config lib; };
|
||||||
# Terminal
|
# Terminal
|
||||||
programs.wezterm.enable = true;
|
programs.wezterm.enable = cfg.terminal == "wezterm";
|
||||||
programs.wezterm.extraConfig = ''
|
programs.wezterm.extraConfig = ''
|
||||||
config = {}
|
config = {}
|
||||||
config.hide_tab_bar_if_only_one_tab = true
|
config.hide_tab_bar_if_only_one_tab = true
|
||||||
config.window_padding = { left = 1, right = 1, top = 1, bottom = 1 }
|
config.window_padding = { left = 1, right = 1, top = 1, bottom = 1 }
|
||||||
return config
|
return config
|
||||||
'';
|
'';
|
||||||
|
programs.alacritty.enable = cfg.terminal == "alacritty";
|
||||||
# PDF reader
|
# PDF reader
|
||||||
programs.zathura.enable = true;
|
programs.zathura.enable = true;
|
||||||
# Auto start sway
|
# Auto start sway
|
||||||
|
|
|
@ -2,8 +2,15 @@
|
||||||
let
|
let
|
||||||
cfg = config.jhome.gui.sway;
|
cfg = config.jhome.gui.sway;
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
terminal = "wezterm";
|
terminal = config.jhome.gui.terminal;
|
||||||
menu = "${pkgs.fuzzel}/bin/fuzzel --terminal 'wezterm start'";
|
termCmd =
|
||||||
|
if terminal == "wezterm" then
|
||||||
|
"wezterm start"
|
||||||
|
else if terminal == "alacritty" then
|
||||||
|
"alacritty -e"
|
||||||
|
else
|
||||||
|
builtins.abort "no command configured for ${terminal}";
|
||||||
|
menu = "${pkgs.fuzzel}/bin/fuzzel --terminal '${termCmd}'";
|
||||||
# currently, there is some friction between sway and gtk:
|
# currently, there is some friction between sway and gtk:
|
||||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||||
# the suggested way to set gtk settings is with gsettings
|
# the suggested way to set gtk settings is with gsettings
|
||||||
|
|
|
@ -32,14 +32,14 @@ let
|
||||||
|
|
||||||
tempInfo.options.hwmon-path = lib.mkOption {
|
tempInfo.options.hwmon-path = lib.mkOption {
|
||||||
description = "Path to the hardware sensor whose temperature to monitor.";
|
description = "Path to the hardware sensor whose temperature to monitor.";
|
||||||
type = lib.types.str;
|
type = types.str;
|
||||||
example = "/sys/class/hwmon/hwmon2/temp1_input";
|
example = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||||
};
|
};
|
||||||
|
|
||||||
sway.options = {
|
sway.options = {
|
||||||
background = lib.mkOption {
|
background = lib.mkOption {
|
||||||
description = lib.mdDoc "The wallpaper to use.";
|
description = lib.mdDoc "The wallpaper to use.";
|
||||||
type = lib.types.path;
|
type = types.path;
|
||||||
default = builtins.fetchurl {
|
default = builtins.fetchurl {
|
||||||
url = "https://raw.githubusercontent.com/lunik1/nixos-logo-gruvbox-wallpaper/d4937c424fad79c1136a904599ba689fcf8d0fad/png/gruvbox-dark-rainbow.png";
|
url = "https://raw.githubusercontent.com/lunik1/nixos-logo-gruvbox-wallpaper/d4937c424fad79c1136a904599ba689fcf8d0fad/png/gruvbox-dark-rainbow.png";
|
||||||
sha256 = "036gqhbf6s5ddgvfbgn6iqbzgizssyf7820m5815b2gd748jw8zc";
|
sha256 = "036gqhbf6s5ddgvfbgn6iqbzgizssyf7820m5815b2gd748jw8zc";
|
||||||
|
@ -54,24 +54,24 @@ let
|
||||||
you can switch TTYs when logging in by using CTRL+ALT+F2 (for TTY2,
|
you can switch TTYs when logging in by using CTRL+ALT+F2 (for TTY2,
|
||||||
F3 for TTY3, etc).
|
F3 for TTY3, etc).
|
||||||
'';
|
'';
|
||||||
type = lib.types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
example = false;
|
example = false;
|
||||||
};
|
};
|
||||||
exec = lib.mkOption {
|
exec = lib.mkOption {
|
||||||
description = "Run commands when starting sway.";
|
description = "Run commands when starting sway.";
|
||||||
default = { };
|
default = { };
|
||||||
type = lib.types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
once = lib.mkOption {
|
once = lib.mkOption {
|
||||||
description = lib.mdDoc "Programs to start only once (`exec`).";
|
description = lib.mdDoc "Programs to start only once (`exec`).";
|
||||||
type = lib.types.listOf lib.types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ "signal-desktop --start-in-tray" ];
|
example = [ "signal-desktop --start-in-tray" ];
|
||||||
};
|
};
|
||||||
always = lib.mkOption {
|
always = lib.mkOption {
|
||||||
description = lib.mdDoc "Programs to start whenever the config is sourced (`exec_always`).";
|
description = lib.mdDoc "Programs to start whenever the config is sourced (`exec_always`).";
|
||||||
type = lib.types.listOf lib.types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ "signal-desktop --start-in-tray" ];
|
example = [ "signal-desktop --start-in-tray" ];
|
||||||
};
|
};
|
||||||
|
@ -85,12 +85,18 @@ let
|
||||||
tempInfo = lib.mkOption {
|
tempInfo = lib.mkOption {
|
||||||
description = lib.mdDoc "Temperature info to display in the statusbar.";
|
description = lib.mdDoc "Temperature info to display in the statusbar.";
|
||||||
default = null;
|
default = null;
|
||||||
type = lib.types.nullOr (lib.types.submodule tempInfo);
|
type = types.nullOr (types.submodule tempInfo);
|
||||||
};
|
};
|
||||||
sway = lib.mkOption {
|
sway = lib.mkOption {
|
||||||
description = "Sway window manager configuration.";
|
description = "Sway window manager configuration.";
|
||||||
default = { };
|
default = { };
|
||||||
type = lib.types.submodule sway;
|
type = types.submodule sway;
|
||||||
|
};
|
||||||
|
terminal = lib.mkOption {
|
||||||
|
description = "The terminal emulator to use.";
|
||||||
|
default = "alacritty";
|
||||||
|
example = "wezterm";
|
||||||
|
type = types.enum [ "wezterm" "alacritty" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -128,7 +134,7 @@ in
|
||||||
gui = lib.mkOption {
|
gui = lib.mkOption {
|
||||||
description = lib.mdDoc "Jalil's default GUI configuration.";
|
description = lib.mdDoc "Jalil's default GUI configuration.";
|
||||||
default = { };
|
default = { };
|
||||||
type = lib.types.submodule gui;
|
type = types.submodule gui;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue