This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
PROMPT='${ret_status}%{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%} %(!.#.$) ' | |
RPROMPT='$(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}git:(" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
file=/tmp/cmus_playing.txt | |
while true | |
do | |
music="" | |
if cmus-remote -C status | grep -q playing; then | |
music=$(cmus-remote -Q | grep -e "tag title" -e "tag artist" | sed "s/^tag\s\w*\s//g" | sed "N;s/\n/ - /g") | |
if (( ${#music} > 0 )); then | |
music="Now playing: $music" | |
fi |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add confirm message to Window | |
* @param {Ext.window.Window} win | |
* @returns {Boolean} | |
*/ | |
windowCloseConfirm: function(win) { | |
// Dado a que no es asíncrono | |
if(win.closeConfirm){ | |
win.closeConfirm = false;// Revertir estado para no mantener confirmación | |
return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* All field in a FormPanel to readOnly | |
* @param {Ext.form.FormPanel} form | |
* @param {boolean} readOnly | |
* @returns {void} | |
*/ | |
formReadOnlyAllFields: function(form, readOnly){ | |
Ext.suspendLayouts(); | |
form.getForm().getFields().each(function(field) { | |
field.setReadOnly(readOnly); |
NewerOlder