aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/.bashrc20
-rw-r--r--system/.config/powerline/config.json7
-rw-r--r--system/.config/powerline/themes/shell/custom.json42
-rwxr-xr-xsystem/bin/powerline-gobin0 -> 3979108 bytes
4 files changed, 16 insertions, 53 deletions
diff --git a/system/.bashrc b/system/.bashrc
index 98d3078..9d74f8f 100644
--- a/system/.bashrc
+++ b/system/.bashrc
@@ -118,10 +118,22 @@ fi
GPG_TTY=$(tty)
export GPG_TTY
-powerline-daemon -q
-POWERLINE_BASH_CONTINUATION=1
-POWERLINE_BASH_SELECT=1
-. /usr/local/lib/python3.7/dist-packages/powerline/bindings/bash/powerline.sh
+function _update_ps1() {
+ PS1="$(
+$HOME/bin/powerline-go \
+ -max-width 40 \
+ -modules host,user,cwd,git,nix-shell,jobs,exit \
+ -priority host,user,git,cwd,nix-shell,jobs,exit \
+ -error $? \
+ -git-disable-stats untracked \
+ -hostname-only-if-ssh \
+ -jobs $(jobs -p | wc -l)
+ )"
+}
+
+if [ "$TERM" != "linux" ] && [ -f "$HOME/bin/powerline-go" ]; then
+ PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
+fi
PATH="/home/camil/perl5/bin${PATH+:}${PATH}"; export PATH;
PERL5LIB="/home/camil/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB;
diff --git a/system/.config/powerline/config.json b/system/.config/powerline/config.json
deleted file mode 100644
index 432a56d..0000000
--- a/system/.config/powerline/config.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "ext": {
- "shell": {
- "theme": "custom"
- }
- }
-}
diff --git a/system/.config/powerline/themes/shell/custom.json b/system/.config/powerline/themes/shell/custom.json
deleted file mode 100644
index 030de37..0000000
--- a/system/.config/powerline/themes/shell/custom.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "segments": {
- "left": [
- {
- "function": "powerline.segments.common.net.hostname",
- "priority": 10
- },
- {
- "function": "powerline.segments.common.env.user",
- "args": {
- "hide_user": "camil"
- },
- "priority": 30
- },
- {
- "function": "powerline.segments.shell.cwd",
- "args": {
- "dir_limit_depth": 3,
- "dir_shorten_len": 4,
- "use_path_separator": true
- },
- "priority": 10
- },
- {
- "function": "powerline.segments.common.vcs.branch",
- "args": {
- "status_colors": true,
- "ignore_statuses": ["U"]
- },
- "priority": 40
- },
- {
- "function": "powerline.segments.shell.jobnum",
- "priority": 20
- },
- {
- "function": "powerline.segments.shell.last_pipe_status",
- "priority": 10
- }
- ]
- }
-}
diff --git a/system/bin/powerline-go b/system/bin/powerline-go
new file mode 100755
index 0000000..3cf39c3
--- /dev/null
+++ b/system/bin/powerline-go
Binary files differ