You are not logged in.

#1 2019-11-02 17:15:37

olegario96
Member
Registered: 2019-09-01
Posts: 11

oh-my-zsh not being displayed properly on UXterm

I'm currently using a brand new Arch Linux installation with i3 as window manager and UXterm as my default terminal. As you can see, oh-my-zsh is not being displayed as should it:

https://user-images.githubusercontent.c … 81da1a.png

How can I get a installation that looks like this?

https://camo.githubusercontent.com/f3b6 … 672e706e67

This is the content of my .zshrc file:

# Created by newuser for 5.7.1
autoload -Uz compinit prompinit

# startx on boot
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
	exec startx
fi

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

powerline-daemon -q
. /usr/lib/python3.7/site-packages/powerline/bindings/zsh/powerline.zsh

# Load UXTerm
xrdb -merge ~/.UXresources

# Set opacity
[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" 0.9 >/dev/null

# Path to your oh-my-zsh installation.
ZSH=/usr/share/oh-my-zsh/

export DEFAULT_USER="olegario"
export TERM="xterm-256color"
export ZSH=/usr/share/oh-my-zsh

POWERLEVEL9K_MODE="nerdfont-complete"
source $ZSH/themes/powerlevel9k/powerlevel9k.zsh-theme

POWERLEVEL9K_FOLDER_ICON=""
POWERLEVEL9K_HOME_SUB_ICON="$(print_icon "HOME_ICON")"
POWERLEVEL9K_DIR_PATH_SEPARATOR=" $(print_icon "LEFT_SUBSEGMENT_SEPARATOR") "

POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0

POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER=true

POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND='black'
POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND='178'
POWERLEVEL9K_NVM_BACKGROUND="238"
POWERLEVEL9K_NVM_FOREGROUND="green"
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND="blue"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="015"

POWERLEVEL9K_TIME_BACKGROUND='255'
#POWERLEVEL9K_COMMAND_TIME_FOREGROUND='gray'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='245'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='black'

POWERLEVEL9K_TIME_FORMAT="%D{%H:%M}"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator context dir dir_writable vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs command_execution_time time)
POWERLEVEL9K_SHOW_CHANGESET=true

HYPHEN_INSENSITIVE="true"
COMPLETION_WAITING_DOTS="true"
# /!\ do not use with zsh-autosuggestions

plugins=(
 archlinux
 asdf
 autojump
 bundler
 colored-man-pages
 colorize
 command-not-found
 cp
 dirhistory
 docker
 git
 gitfast
 jsontools
 k
 pip
 python
 sudo
 tig
 vscode
 web-search
 yarn
 zsh-autosuggestions
 zsh-syntax-highlighting
)
# /!\ zsh-syntax-highlighting and then zsh-autosuggestions must be at the end

source $ZSH/oh-my-zsh.sh

ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
typeset -gA ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[cursor]='bold'

ZSH_HIGHLIGHT_STYLES[alias]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[builtin]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[function]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[command]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[precommand]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=green,bold'

rule () {
 print -Pn '%F{blue}'
 local columns=$(tput cols)
 for ((i=1; i<=columns; i++)); do
    printf "\u2588"
 done
 print -P '%f'
}

function _my_clear() {
 echo
 rule
 zle clear-screen
}
zle -N _my_clear
bindkey '^l' _my_clear

# Ctrl-O opens zsh at the current location, and on exit, cd into ranger's last location.
ranger-cd() {
 tempfile=$(mktemp)
 ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY
 test -f "$tempfile" &&
 if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
 cd -- "$(cat "$tempfile")"
 fi
 rm -f -- "$tempfile"
 # hacky way of transferring over previous command and updating the screen
 VISUAL=true zle edit-command-line
}
zle -N ranger-cd
bindkey '^o' ranger-cd

# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"

ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
if [[ ! -d $ZSH_CACHE_DIR ]]; then
  mkdir $ZSH_CACHE_DIR
fi

# Load aliases
source ~/.aliases

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

moderator edit -- replaced oversized images with links.
Pasting pictures and code

Last edited by 2ManyDogs (2019-11-02 17:21:18)

Offline

#2 2019-11-02 17:21:57

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: oh-my-zsh not being displayed properly on UXterm

Get rid of oh-my-zsh completely and write your own config files instead.

It's a massively bloated horrible mess that breaks things more often than it does what it's supposed to...


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-11-03 08:18:07

romkatv
Member
Registered: 2019-11-03
Posts: 1

Re: oh-my-zsh not being displayed properly on UXterm

Your Powerlevel9k is misconfigured. The easiest way to fix this is to switch to Powerlevel10k. It'll also make your zsh much faster.

Type this:

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Then change ZSH_THEME in ~/.zshrc:

ZSH_THEME=powerlevel10k/powerlevel10k

Offline

Board footer

Powered by FluxBB