From c56a3eaee2a45742a74ee30b5d605f5d0ba56275 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sat, 30 Apr 2022 15:19:17 +0200 Subject: [PATCH 1/4] Wrap signal-desktop to add flag to disable gpu processing --- modules/social/default.nix | 3 +-- pkgs/default.nix | 3 +++ pkgs/ps-signal-desktop.nix | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 pkgs/ps-signal-desktop.nix diff --git a/modules/social/default.nix b/modules/social/default.nix index f3aa63b7..9c53718d 100644 --- a/modules/social/default.nix +++ b/modules/social/default.nix @@ -12,8 +12,7 @@ in config = mkIf cfg.enable { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.packages = [ - #mySignalDesktop - signal-desktop + ps-signal-desktop tdesktop element-desktop irssi diff --git a/pkgs/default.nix b/pkgs/default.nix index 312e685f..b2403502 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -16,4 +16,7 @@ with final; { toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); uhk-agent = import ./uhk-agent.nix final; wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); + + # ps-fixes + ps-signal-desktop = writeShellScriptBin "signal-desktop" (import ./ps-signal-desktop.nix final); } diff --git a/pkgs/ps-signal-desktop.nix b/pkgs/ps-signal-desktop.nix new file mode 100644 index 00000000..c1d3967a --- /dev/null +++ b/pkgs/ps-signal-desktop.nix @@ -0,0 +1,3 @@ +self: with self; '' + exec ${signal-desktop}/bin/signal-desktop --disable-gpu -- "$@" +'' From 2c53b3c3b134db21df56371797ffb476e60fba54 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 30 Apr 2022 15:15:29 +0200 Subject: [PATCH 2/4] virtualisation: generalize for intel CPUs by adding intel_iommu to kernelParams --- modules/virtualisation/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index 4d588622..8fc25024 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -14,6 +14,7 @@ in config = mkIf cfg.enable { boot.kernelParams = [ "amd_iommu=on" + "intel_iommu=on" "iommu=pt" ]; From b326f183446b0e7686cab9925b4483160d3439f7 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Apr 2022 11:43:55 +0200 Subject: [PATCH 3/4] zsh: use max length for dir to allow enough space for the right hand indicators --- modules/terminal-life/zsh/p10k.zsh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/terminal-life/zsh/p10k.zsh b/modules/terminal-life/zsh/p10k.zsh index be207b58..90734313 100644 --- a/modules/terminal-life/zsh/p10k.zsh +++ b/modules/terminal-life/zsh/p10k.zsh @@ -195,7 +195,16 @@ typeset -g POWERLEVEL9K_DIR_{HOME,HOME_SUBFOLDER}_BACKGROUND=1 typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_BACKGROUND=1 - typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=0 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=0 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false # Don't shorten directories that contain any of these files. They are anchors. local anchor_files=( .bzr @@ -228,13 +237,13 @@ # contains a marker (.git) and other directories don't. typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false # Don't shorten this many last directory segments. They are anchors. - typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=100 + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 # Shorten directory if it's longer than this even if there is space for it. The value can # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, # directory will be shortened only when prompt doesn't fit or when other parameters demand it # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). # If set to `0`, directory will always be shortened to its minimum length. - typeset -g POWERLEVEL9K_DIR_MAX_LENGTH= + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this # many columns for typing commands. typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 From b516473f69a5eecc0ab93dc5c9d5b7a864df989c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 30 Apr 2022 17:51:41 +0200 Subject: [PATCH 4/4] Change terminal title to cwd --- modules/terminal-life/zsh/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 9bb5b28d..f9acb23f 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -22,7 +22,6 @@ in [ "$(tty)" = "/dev/tty1" ] && exec sway ''; - shellAliases = { nano = "nvim"; vi = "nvim"; @@ -84,6 +83,10 @@ in stty -ixon stty erase '^?' + precmd () { + echo -e "\e]2;$(pwd)\e\\" + } + # If a command is not found, show me where it is source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh ''