aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/hjem
diff options
context:
space:
mode:
Diffstat (limited to 'modules/terminal/hjem')
-rw-r--r--modules/terminal/hjem/programs/cmus.nix74
-rw-r--r--modules/terminal/hjem/programs/fzf.nix16
-rw-r--r--modules/terminal/hjem/programs/helix.nix12
-rw-r--r--modules/terminal/hjem/programs/tmux.nix45
4 files changed, 89 insertions, 58 deletions
diff --git a/modules/terminal/hjem/programs/cmus.nix b/modules/terminal/hjem/programs/cmus.nix
index afd2350..7a5ac81 100644
--- a/modules/terminal/hjem/programs/cmus.nix
+++ b/modules/terminal/hjem/programs/cmus.nix
@@ -25,57 +25,34 @@
'';
cmus_theme = ''
- set color_cmdline_bg=default
- set color_cmdline_fg=default
- set color_error=211
- set color_info=223
- set color_separator=8
- set color_statusline_bg=default
- set color_statusline_fg=default
- set color_titleline_bg=183
- set color_titleline_fg=8
- set color_titleline_attr=bold
- set color_win_bg=default
- set color_win_cur=117
- set color_win_cur_sel_bg=117
- set color_win_cur_sel_fg=235
- set color_win_dir=default
- set color_win_fg=default
- set color_win_inactive_cur_sel_bg=0
- set color_win_inactive_cur_sel_fg=default
- set color_win_inactive_sel_bg=0
- set color_win_inactive_sel_fg=default
- set color_win_sel_bg=15
- set color_win_sel_fg=235
- set color_win_title_bg=default
- set color_win_title_fg=183
- set color_win_title_attr=bold
+ set color_cmdline_error=lightred
+ set color_cmdline_info=lightyellow
+ set color_cmdline_fg=lightred
+ set color_cmdline_bg=237
+ set color_separator=238
+ set color_statusline_bg=blue
+ set color_statusline_fg=233
+ set color_titleline_bg=237
+ set color_titleline_fg=white
+ set color_win_bg=black
+ set color_win_fg=241
+ set color_win_cur=lightgreen
+ set color_win_cur_sel_bg=green
+ set color_win_cur_sel_fg=233
+ set color_win_dir=lightblue
+ set color_win_fg=white
+ set color_win_inactive_cur_sel_bg=016
+ set color_win_inactive_cur_sel_fg=233
+ set color_win_sel_bg=237
+ set color_win_sel_fg=white
+ set color_win_title_bg=237
+ set color_win_title_fg=lightred
'';
cmus_rc = ''
- ${
- if (cfg.theme == "catppuccin")
- then "colorscheme catppuccin"
- else ""
- }
+ colorscheme all
set status_display_program=${scriptsDir}/status.sh
'';
-
- cava_config =
- if cfg.theme == "catppuccin"
- then ''
- [color]
- gradient=1
- gradient_color_1='#94e2d5'
- gradient_color_2='#89dceb'
- gradient_color_3='#74c7ec'
- gradient_color_4='#89b4fa'
- gradient_color_5='#cba6f7'
- gradient_color_6='#f5c2e7'
- gradient_color_7='#eba0ac'
- gradient_color_8='#f38ba8'
- ''
- else "";
in
lib.mkIf cfg.enable {
files = let
@@ -87,9 +64,8 @@ in
".config/cmus/scripts/status.sh" = e scripts.statusDisplay;
".config/cmus/rc".text = cmus_rc;
- ".config/cmus/catppuccin.theme".text = lib.mkIf (cfg.theme == "catppuccin") cmus_theme;
- ".config/cava/config".text = cava_config;
+ ".config/cmus/all.theme".text = cmus_theme;
};
- packages = with pkgs; [cava cmus];
+ packages = [pkgs.cmus];
}
diff --git a/modules/terminal/hjem/programs/fzf.nix b/modules/terminal/hjem/programs/fzf.nix
index 5a51739..f697a24 100644
--- a/modules/terminal/hjem/programs/fzf.nix
+++ b/modules/terminal/hjem/programs/fzf.nix
@@ -8,18 +8,24 @@
in
lib.mkIf cfg.enable {
files =
- (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
+ lib.optionalAttrs config.collinux.terminal.shells.fish.enable (with config.collinux.palette; {
".config/fish/conf.d/fzf.fish".text = ''
fzf --fish | source
- set -gx FZF_DEFAULT_OPTS "--color bg:#1E1E2E,bg+:#313244,border:#313244,fg:#CDD6F4,fg+:#CDD6F4,header:#F38BA8,hl:#F38BA8,hl+:#F38BA8,info:#CBA6F7,label:#CDD6F4,marker:#B4BEFE,pointer:#F5E0DC,prompt:#CBA6F7,selected-bg:#45475A,spinner:#F5E0DC"
+ set -Ux FZF_DEFAULT_OPTS "$FZF_NON_COLOR_OPTS"\
+ " --color=bg+:#${base01},bg:#${base00},spinner:#${base12},hl:#${base13}"\
+ " --color=fg:#${base04},header:#${base13},info:#${base10},pointer:#${base12}"\
+ " --color=marker:#${base12},fg+:#${base06},prompt:#${base10},hl+:#${base13}"
'';
})
- // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable {
+ // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable (with config.collinux.palette; {
".config/bash/conf.d/fzf.bash".text = ''
eval "$(fzf --bash)"
- export FZF_DEFAULT_OPTS="--color bg:#1E1E2E,bg+:#313244,border:#313244,fg:#CDD6F4,fg+:#CDD6F4,header:#F38BA8,hl:#F38BA8,hl+:#F38BA8,info:#CBA6F7,label:#CDD6F4,marker:#B4BEFE,pointer:#F5E0DC,prompt:#CBA6F7,selected-bg:#45475A,spinner:#F5E0DC"
+ export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS"\
+ " --color=bg+:#${base01},bg:#${base00},spinner:#${base12},hl:#${base13}"\
+ " --color=fg:#${base04},header:#${base13},info:#${base10},pointer:#${base12}"\
+ " --color=marker:#${base12},fg+:#${base06},prompt:#${base10},hl+:#${base13}"
'';
- });
+ }));
packages = [pkgs.fzf];
}
diff --git a/modules/terminal/hjem/programs/helix.nix b/modules/terminal/hjem/programs/helix.nix
index 2c30881..80279c4 100644
--- a/modules/terminal/hjem/programs/helix.nix
+++ b/modules/terminal/hjem/programs/helix.nix
@@ -44,8 +44,8 @@
];
};
- theme = {
- inherits = "catppuccin_mocha";
+ mkTransparentBackground = inherits: {
+ inherit inherits;
"ui.background" = {};
};
@@ -134,7 +134,9 @@
if cfg.theme == "catppuccin"
then "catppuccin_mocha_transparent"
else if cfg.theme == "adwaita"
- then "adwaita_dark"
+ then "adwaita_dark_transparent"
+ else if cfg.theme == "kanagawa"
+ then "kanagawa_transparent"
else "";
};
in
@@ -148,7 +150,9 @@ in
{
".config/helix/config.toml" = t settings;
".config/helix/languages.toml" = t languages;
- ".config/helix/themes/catppuccin_mocha_transparent.toml" = t theme;
+ ".config/helix/themes/catppuccin_mocha_transparent.toml" = t (mkTransparentBackground "catppuccin_mocha");
+ ".config/helix/themes/adwaita_dark_transparent.toml" = t (mkTransparentBackground "adwaita-dark");
+ ".config/helix/themes/kanagawa_transparent.toml" = t (mkTransparentBackground "kanagawa");
}
// (lib.optionalAttrs config.collinux.terminal.shells.fish.enable {
".config/fish/conf.d/helix.fish".text = ''
diff --git a/modules/terminal/hjem/programs/tmux.nix b/modules/terminal/hjem/programs/tmux.nix
index fd2737e..d6c7cf8 100644
--- a/modules/terminal/hjem/programs/tmux.nix
+++ b/modules/terminal/hjem/programs/tmux.nix
@@ -14,12 +14,57 @@ in {
config = lib.mkIf cfg.enable {
tsunami = {
enable = true;
+
+ theme =
+ if (cfg.theme == "catppuccin")
+ then {
+ bg = "#1e1e2e";
+ bg_dark = "#181825";
+ }
+ else if (cfg.theme == "adwaita")
+ then {
+ bg = "#1d1d1d";
+ bg_dark = "#171717";
+ }
+ else {};
+
+ scripts.switch_to_utility =
+ # bash
+ ''
+ # if utility session doesn't exist, create it
+ if ! tmux has-session -t "utility"; then
+ tmux new-session -ds "utility" -c "$HOME"
+ fi
+
+ if [ -z "$TMUX" ]; then
+ # we're not in tmux
+ tmux attach-session -t "utility"
+ else
+ tmux switch -t "utility"
+ fi
+
+ # if cmus window doesn't exist, create it
+ if ! tmux list-windows -t "utility" -F "#{window_name}" | grep -qx "utility_cmus"; then
+ tmux new-window -t "utility" -n "utility_cmus" "cmus"
+ fi
+
+ # if bluetuith window doesn't exist, create it
+ if ! tmux list-windows -t "utility" -F "#{window_name}" | grep -qx "utility_bluetuith"; then
+ tmux new-window -t "utility" -n "utility_bluetuith" "bluetuith"
+ fi
+ '';
+
keys.leader = [
{
name = "Lazygit";
key = "C-g";
exec = "display-popup -E -w 80% -h 80% -x C -y C -d '#{?@default-path,#{@default-path},#{pane_current_path}}' ${lib.getExe pkgs.lazygit}";
}
+ {
+ name = "Utility";
+ key = "C-u";
+ exec = "display-popup -w 80% -h 80% -x C -y C 'TMUX= ~/.config/tmux/scripts/switch_to_utility.sh'";
+ }
];
confs."main" = ''
set -g mouse on