File tree 6 files changed +5
-38
lines changed
6 files changed +5
-38
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ completion/available/vuejs.completion.bash
81
81
completion/available/wpscan.completion.bash
82
82
83
83
# libraries
84
+ lib/battery.bash
84
85
lib/colors.bash
85
86
lib/helpers.bash
86
87
lib/log.bash
@@ -94,7 +95,6 @@ plugins/available/alias-completion.plugin.bash
94
95
plugins/available/autojump.plugin.bash
95
96
plugins/available/base.plugin.bash
96
97
plugins/available/basher.plugin.bash
97
- plugins/available/battery.plugin.bash
98
98
plugins/available/blesh.plugin.bash
99
99
plugins/available/cmd-returned-notify.plugin.bash
100
100
plugins/available/colors.plugin.bash
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -558,23 +558,6 @@ function battery_char {
558
558
fi
559
559
}
560
560
561
- if ! _command_exists battery_charge; then
562
- # if user has installed battery plugin, skip this...
563
- function battery_charge() {
564
- # no op
565
- echo -n
566
- }
567
- fi
568
-
569
- # The battery_char function depends on the presence of the battery_percentage function.
570
- # If battery_percentage is not defined, then define battery_char as a no-op.
571
- if ! _command_exists battery_percentage; then
572
- function battery_char() {
573
- # no op
574
- echo -n
575
- }
576
- fi
577
-
578
561
function aws_profile {
579
562
if [[ $AWS_DEFAULT_PROFILE ]]; then
580
563
echo -e " ${AWS_DEFAULT_PROFILE} "
Original file line number Diff line number Diff line change @@ -82,14 +82,6 @@ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}"
82
82
fi
83
83
}
84
84
85
- # checks if the plugin is installed before calling battery_charge
86
- safe_battery_charge () {
87
- if _command_exists battery_charge ;
88
- then
89
- battery_charge
90
- fi
91
- }
92
-
93
85
# -------------------------------------------------------------- PROMPT OUTPUT
94
86
prompt () {
95
87
local LAST_COMMAND_FAILED=$( mitsuhikos_lastcommandfailed)
@@ -101,7 +93,7 @@ prompt() {
101
93
if [[ " $OSTYPE " = ' linux' * ]]
102
94
then
103
95
PS1=" ${TITLEBAR}${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}
104
- $( safe_battery_charge ) ${RESTORE_CURSOR} \
96
+ $( battery_charge ) ${RESTORE_CURSOR} \
105
97
${D_USER_COLOR} \u ${D_INTERMEDIATE_COLOR} \
106
98
at ${D_MACHINE_COLOR} \h ${D_INTERMEDIATE_COLOR} \
107
99
in ${D_DIR_COLOR} \w ${D_INTERMEDIATE_COLOR} \
@@ -117,7 +109,7 @@ in ${D_DIR_COLOR}\w ${D_INTERMEDIATE_COLOR}\
117
109
${LAST_COMMAND_FAILED} \
118
110
$( demula_vcprompt) \
119
111
$( is_vim_shell) \
120
- $( safe_battery_charge )
112
+ $( battery_charge )
121
113
${D_INTERMEDIATE_COLOR} $ ${D_DEFAULT_COLOR} "
122
114
fi
123
115
Original file line number Diff line number Diff line change @@ -115,14 +115,6 @@ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}"
115
115
fi
116
116
}
117
117
118
- # checks if the plugin is installed before calling battery_charge
119
- safe_battery_charge () {
120
- if _command_exists battery_charge ;
121
- then
122
- battery_charge
123
- fi
124
- }
125
-
126
118
prompt_git () {
127
119
local s=' ' ;
128
120
local branchName=' ' ;
@@ -185,7 +177,7 @@ prompt() {
185
177
then
186
178
PS1=" ${TITLEBAR}
187
179
${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT} \
188
- $( safe_battery_charge ) ${RESTORE_CURSOR} \
180
+ $( battery_charge ) ${RESTORE_CURSOR} \
189
181
${D_USER_COLOR} \u ${D_INTERMEDIATE_COLOR} \
190
182
at ${D_MACHINE_COLOR} \h ${D_INTERMEDIATE_COLOR} \
191
183
in ${D_DIR_COLOR} \w ${D_INTERMEDIATE_COLOR} \
@@ -203,7 +195,7 @@ $(prompt_git "$D_INTERMEDIATE_COLOR on $D_GIT_COLOR")\
203
195
${LAST_COMMAND_FAILED} \
204
196
$( demula_vcprompt) \
205
197
$( is_vim_shell) \
206
- $( safe_battery_charge )
198
+ $( battery_charge )
207
199
${D_INTERMEDIATE_COLOR} $ ${D_DEFAULT_COLOR} "
208
200
fi
209
201
You can’t perform that action at this time.
0 commit comments