Skip to content

Commit 98400e4

Browse files
UMU618akinomyoga
authored andcommitted
feat(themes): add the "umu" theme
UMU means ∞
1 parent 7e73f9b commit 98400e4

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

themes/THEMES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@
308308

309309
[![](tylenol/tylenol-dark.png)](tylenol/tylenol-dark.png)
310310

311+
## `umu`
312+
313+
[![](umu/umu-dark.png)](umu/umu-dark.png)
314+
311315
## `vscode`
312316

313317
[![](vscode/vscode-dark.png)](vscode/vscode-dark.png)

themes/umu/umu-dark.png

16.9 KB
Loading

themes/umu/umu.theme.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
3+
# Base on pzq
4+
source "$OSH/themes/pzq/pzq.theme.sh"
5+
6+
function _omb_theme_PROMPT_COMMAND {
7+
local LAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)
8+
local SAVE_CURSOR='\[\e7'
9+
local RESTORE_CURSOR='\e8\]'
10+
local MOVE_CURSOR_RIGHTMOST='\e['${COLUMNS:-9999}'C'
11+
local MOVE_CURSOR_5_LEFT='\e[5D'
12+
local THEME_CLOCK_FORMAT="%Y-%m-%dT%H:%M:%S.%N%:::z"
13+
# Replace $HOME with ~ if possible
14+
local RELATIVE_PWD=${PWD/#$HOME/\~}
15+
16+
local python_venv
17+
_omb_prompt_get_python_venv
18+
19+
PS1=${TITLEBAR}$python_venv$'\n'
20+
if [[ $OSTYPE == linux-gnu ]]; then
21+
PS1+="${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}"
22+
PS1+="$(safe_battery_charge)${RESTORE_CURSOR}"
23+
PS1+="${D_NUMBER_COLOR}# ${D_USER_COLOR}\u ${D_DEFAULT_COLOR}"
24+
else
25+
PS1+="${D_NUMBER_COLOR}# ${D_USER_COLOR}\u ${D_DEFAULT_COLOR}"
26+
fi
27+
PS1+="@ ${D_MACHINE_COLOR}\h ${D_DEFAULT_COLOR}"
28+
PS1+="${D_DIR_COLOR}${RELATIVE_PWD} ${D_INTERMEDIATE_COLOR}"
29+
PS1+=$(prompt_git)
30+
PS1+=${D_TIME_COLOR}[$(clock_prompt)]
31+
PS1+=${LAST_COMMAND_FAILED}
32+
PS1+=$(demula_vcprompt)
33+
PS1+=$(is_vim_shell)
34+
if [[ $OSTYPE != linux-gnu ]]; then
35+
PS1+=$(safe_battery_charge)
36+
fi
37+
PS1+=$'\n'"${D_DOLLOR_COLOR}$ ${D_DEFAULT_COLOR}"
38+
39+
PS2="${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}"
40+
}

0 commit comments

Comments
 (0)