Compare commits

...

3 Commits

Author SHA1 Message Date
Pearu Vaalma 9d8c04ca37
Fix streaming for cmus 3 years ago
Pearu Vaalma aac0a28349
Update zshrc 3 years ago
Pearu Vaalma af527ce665
Add xterm spoofing for alacritty 3 years ago
  1. 2
      alacritty/.config/alacritty/alacritty.yml
  2. 13
      i3/.i3/blocks/mediaplayer
  3. 4
      zsh/.zshrc

2
alacritty/.config/alacritty/alacritty.yml

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
env:
TERM: xterm-256color
font:
normal:

13
i3/.i3/blocks/mediaplayer

@ -52,10 +52,14 @@ sub buttons { @@ -52,10 +52,14 @@ sub buttons {
}
} elsif ($method eq 'cmus') {
if ($ENV{'BLOCK_BUTTON'} == 1) {
system("cmus-remote --prev");
system("cmus-remote --pause");
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
system("cmus-remote --pause");
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
system("cmus-remote --stop");
} elsif ($ENV{'BLOCK_BUTTON'} == 4) {
system("cmus-remote --prev");
} elsif ($ENV{'BLOCK_BUTTON'} == 5) {
system("cmus-remote --next");
}
} elsif ($method eq 'playerctl') {
@ -95,6 +99,12 @@ sub cmus { @@ -95,6 +99,12 @@ sub cmus {
@metadata[0] = $value if $key eq 'artist';
@metadata[1] = $value if $key eq 'title';
}
my @streamData = split /\s/, $line;
if (shift @streamData eq 'stream') {
my $value = join ' ', @streamData;
@metadata[0] = join ' ', $value;
}
}
if (@metadata) {
@ -102,6 +112,7 @@ sub cmus { @@ -102,6 +112,7 @@ sub cmus {
# metadata found so we are done
print(join ' - ', @metadata);
print("\n");
exit 0;
}
}

4
zsh/.zshrc

@ -17,7 +17,6 @@ alias diff='diff --color=auto' @@ -17,7 +17,6 @@ alias diff='diff --color=auto'
alias grep='grep --color=auto'
alias ip='ip --color=auto'
export LESS=-R
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
@ -26,5 +25,6 @@ export LESS_TERMCAP_se=$'\E[0m' # reset reverse video @@ -26,5 +25,6 @@ export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
alias ssh='TERM=xterm ssh'
export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS=' -R '

Loading…
Cancel
Save