From 24685dff43de68842ae4daf60bf7b2431a1750a5 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Tue, 20 Dec 2022 17:46:51 +0100 Subject: [PATCH] wezterm: Update config --- home/config/wezterm/config.fnl | 26 +++++++++++++++++++++----- home/hosts/Styx.nix | 2 ++ home/programs/btop.nix | 14 ++++++++++++++ home/programs/wezterm.nix | 8 +++++++- 4 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 home/programs/btop.nix diff --git a/home/config/wezterm/config.fnl b/home/config/wezterm/config.fnl index 2e2c457..d2122bb 100644 --- a/home/config/wezterm/config.fnl +++ b/home/config/wezterm/config.fnl @@ -1,5 +1,5 @@ (let [wezterm (require :wezterm)] - {:default_prog _G.default_shell + {:default_prog [_G.shells.fish :--interactive] ;; Appearance :color_scheme "Dracula (Official)" :window_padding {:left :6px :right :6px :top :2px :bottom :4px} @@ -19,19 +19,35 @@ :line_height 0.9 :freetype_load_target :Light ;:freetype_render_target :HorizontalLcd + :allow_square_glyphs_to_overflow_width :WhenFollowedBySpace + ;; Keys + :keys [{:key :UpArrow + :mods :SHIFT + :action (wezterm.action.ScrollToPrompt -1)} + {:key :DownArrow + :mods :SHIFT + :action (wezterm.action.ScrollToPrompt 1)}] ;; Mouse :mouse_bindings [; Only select text and don't open hyperlinks {:event {:Up {:streak 1 :button :Left}} :mods :NONE :action (wezterm.action {:ExtendSelectionToMouseCursor :Cell})} - ; Don't copy on double click + ; Only select word on double click {:event {:Up {:streak 2 :button :Left}} :mods :NONE - :action :Nop} + :action (wezterm.action.SelectTextAtMouseCursor :Word)} + ; Select entire output of command + {:event {:Down {:streak 3 :button :Left}} + :mods :NONE + :action (wezterm.action.SelectTextAtMouseCursor :SemanticZone)} ; CMD-click to open a hyperlink {:event {:Up {:streak 1 :button :Left}} - :mods :CMD + :mods :SUPER :action :OpenLinkAtMouseCursor}] ;; Scrollback - :scrollback_lines 5000}) + :scrollback_lines 5000 + ;; Launch Menu + :launch_menu [{:label :Btop++ :args [_G.programs.btop]}] + ;; Other + :check_for_updates false}) diff --git a/home/hosts/Styx.nix b/home/hosts/Styx.nix index e912800..e999e75 100644 --- a/home/hosts/Styx.nix +++ b/home/hosts/Styx.nix @@ -16,6 +16,8 @@ in ../programs/bat.nix + ../programs/btop.nix + (import ../programs/custom-nix-cache.nix (args // { inherit secret; })) ../programs/fzf.nix diff --git a/home/programs/btop.nix b/home/programs/btop.nix new file mode 100644 index 0000000..ed446c5 --- /dev/null +++ b/home/programs/btop.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + programs.btop = { + enable = true; + + settings = { + color_theme = "${pkgs.btop.outPath}/share/btop/themes/dracula.theme"; + theme_background = true; + truecolor = true; + }; + }; + +} diff --git a/home/programs/wezterm.nix b/home/programs/wezterm.nix index e1943bc..aeb6c8c 100644 --- a/home/programs/wezterm.nix +++ b/home/programs/wezterm.nix @@ -5,7 +5,13 @@ enable = true; extraConfig = '' - _G.default_shell = { '${pkgs.fish.outPath}/bin/fish', '--interactive'}; + _G.shells = { + fish = '${pkgs.fish.outPath}/bin/fish', + }; + + _G.programs = { + btop = '${pkgs.btop.outPath}/bin/btop', + }; local cfg = require('config'); return cfg