From 1075a60db1b42c4b8698ccf7d608f349f243d2c0 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 21 Sep 2022 00:08:44 +0300 Subject: [PATCH] Fixes for termux --- config.toml | 3 +++ home/.config/zsh/04-aliases.zsh | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 5ada0d3..ab7d739 100644 --- a/config.toml +++ b/config.toml @@ -328,6 +328,9 @@ include = ["terminal"] include = ["terminal"] dotfiles = ["f_distro"] +[profiles.Isengard.variables] +distro_id = "termux" + [profiles.Mirkwood.variables] wayland = true diff --git a/home/.config/zsh/04-aliases.zsh b/home/.config/zsh/04-aliases.zsh index 8945bc4..ef1c0c9 100644 --- a/home/.config/zsh/04-aliases.zsh +++ b/home/.config/zsh/04-aliases.zsh @@ -33,8 +33,10 @@ pi() { if [ -n "$SELECTED_PKGS" ]; then {%@@ if distro_id == "arch" @@%} cmd="paru -S $(echo $SELECTED_PKGS)" - {%@@ else @@%} + {%@@ elif distro_id == "ubuntu" @@%} cmd="sudo apt install $(echo $SELECTED_PKGS)" + {%@@ elif distro_id == "termux" @@%} + cmd="apt install $(echo $SELECTED_PKGS)" {%@@ endif @@%} # Append the expanded command to history @@ -54,8 +56,10 @@ pr() { if [ -n "$SELECTED_PKGS" ]; then {%@@ if distro_id == "arch" @@%} cmd="paru -Rns $(echo $SELECTED_PKGS)" - {%@@ else @@%} + {%@@ elif distro_id == "ubuntu" @@%} cmd="sudo apt remove $(echo $SELECTED_PKGS)" + {%@@ elif distro_id == "termux" @@%} + cmd="apt remove $(echo $SELECTED_PKGS)" {%@@ endif @@%} # Append the expanded command to history