feat: cleanup
This commit is contained in:
parent
b9f126b1a6
commit
96b5d2aceb
@ -10,8 +10,8 @@
|
||||
# Hotkeys
|
||||
bindsym XF86AudioRaiseVolume exec $raise_volume
|
||||
bindsym XF86AudioLowerVolume exec $lower_volume
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
||||
bindsym Ctrl+XF86AudioMute exec pactl set-source-mute 0 toggle
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym Ctrl+XF86AudioMute exec pactl set-source-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of "$ZDOTDIR"/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
@ -6,7 +6,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
||||
fi
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$ZDOTDIR/.oh-my-zsh"
|
||||
export ZSH="$ZDOTDIR/ohmyzsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
@ -76,7 +76,7 @@ CASE_SENSITIVE="true"
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git vi-mode)
|
||||
|
||||
. $ZSH/oh-my-zsh.sh
|
||||
. "$ZSH"/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
@ -95,8 +95,8 @@ plugins=(git vi-mode)
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || . ~/.config/zsh/.p10k.zsh
|
||||
# To customize prompt, run `p10k configure` or edit "$ZDOTDIR"/.p10k.zsh.
|
||||
[[ ! -f "$ZDOTDIR"/.p10k.zsh ]] || . "$ZDOTDIR"/.p10k.zsh
|
||||
|
||||
eval "$(pyenv init -)"
|
||||
. "$ZDOTDIR"/.zsh_aliases
|
||||
|
@ -16,6 +16,8 @@ set +e
|
||||
CUR="$(cat "$CUR_FILE" || echo 50)"
|
||||
set -e
|
||||
|
||||
CUR="$((CUR - CUR % "$1"))"
|
||||
|
||||
case "${1:0:1}" in
|
||||
'')
|
||||
exit 1
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CUR="$(pactl get-sink-volume "@DEFAULT_SINK@" | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
|
||||
SINK='@DEFAULT_SINK@'
|
||||
CUR="$(pactl get-sink-volume "$DEFAULT_SINK" | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
|
||||
CUR="$((CUR - CUR % "$1"))"
|
||||
|
||||
case "${1:0:1}" in
|
||||
@ -19,7 +20,7 @@ esac
|
||||
[ "$NEW" -lt 0 ] && NEW=0
|
||||
[ "$NEW" -gt 100 ] && NEW=100
|
||||
|
||||
pactl set-sink-volume "${SINK}" "$NEW"%
|
||||
pactl set-sink-mute "${SINK}" 0
|
||||
pactl set-sink-volume "$SINK" "$NEW%"
|
||||
pactl set-sink-mute "$SINK" 0
|
||||
|
||||
echo "$NEW"
|
||||
|
Loading…
Reference in New Issue
Block a user