mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-04-24 07:57:18 +00:00
fixes
This commit is contained in:
parent
330a1440af
commit
2bd0bb8bfd
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
||||
[submodule "zsh/zsh-syntax-highlighting"]
|
||||
path = zsh/zsh-syntax-highlighting
|
||||
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
[submodule "zsh/zsh-autosuggestions"]
|
||||
path = zsh/zsh-autosuggestions
|
||||
url = https://github.com/tarruda/zsh-autosuggestions
|
||||
|
@ -5,7 +5,8 @@ else
|
||||
source "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
fi
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=black'
|
||||
|
||||
bindkey '^ ' autosuggest-accept
|
||||
bindkey '^B' autosuggest-clear
|
||||
|
||||
# highlighting
|
||||
if [[ -a "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
|
||||
|
@ -22,7 +22,7 @@ precmd() {
|
||||
local _bat_perc=0
|
||||
local _num=0
|
||||
local _bat
|
||||
for _bat in /sys/class/power_supply/BAT*; do
|
||||
for _bat in /sys/class/power_supply/BAT*; do
|
||||
let "_bat_perc += $(cat ${_bat}/capacity)"
|
||||
let "_num += 1"
|
||||
done
|
||||
|
@ -1,5 +1,30 @@
|
||||
# web_search from terminal
|
||||
|
||||
function open_command() {
|
||||
emulate -L zsh
|
||||
setopt shwordsplit
|
||||
|
||||
local open_cmd
|
||||
|
||||
# define the open command
|
||||
case "$OSTYPE" in
|
||||
darwin*) open_cmd='open' ;;
|
||||
cygwin*) open_cmd='cygstart' ;;
|
||||
linux*) open_cmd='xdg-open' ;;
|
||||
msys*) open_cmd='start ""' ;;
|
||||
*) echo "Platform $OSTYPE not supported"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# don't use nohup on OSX
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
$open_cmd "$@" &>/dev/null
|
||||
else
|
||||
nohup $open_cmd "$@" &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function web_search() {
|
||||
emulate -L zsh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user