feat: local config

This commit is contained in:
David JULIEN 2022-11-12 17:13:59 +01:00
parent 6330e50dda
commit 953f603f07
Signed by: swytch
GPG Key ID: 498590A3AA82A06F
6 changed files with 22 additions and 23 deletions

View File

@ -8,9 +8,9 @@ eval $(dbus-launch --sh-syntax --exit-with-session)
xss-lock -- slock &
redshift &
dunst &> /dev/null & #temp fix
gentoo-pipewire-launcher && wpctl set-volume @DEFAULT_AUDIO_SINK@ 50% &
# MPD daemon start (if no other user instance exists)
[ ! -s "$XDG_CONFIG_HOME/mpd/pid" ] && mpd
pulsemixer --set-volume 50
sbacklight set 3 &
setbg &
dwmblocks &
@ -18,9 +18,7 @@ xrdb "$XDG_CONFIG_HOME/X11/xresources"
xrdb -merge "$XDG_STATE_HOME/xcolors"
xautolock -locker slock -time 5 -corners 000- &
xinput set-prop 'Synaptics TM3072-003' 'libinput Tapping Enabled' 1 &
xinput set-prop 'Synaptics TM3072-003' 'libinput Natural Scrolling Enabled' 1 &
xinput set-prop 'Synaptics TM3072-003' 'libinput Accel Speed' 0.4 &
cursor_setup "Logitech Gaming Mouse G502" &
setxkbmap 'fr(oss)'
remaps &
sxhkd &

View File

@ -17,8 +17,8 @@ pid_file "~/.config/mpd/pid"
sticker_file "~/.config/mpd/sticker.sql"
audio_output {
type "pulse"
name "pulse audio"
type "pipewire"
name "PipeWire Output"
}
audio_output {

View File

@ -3,10 +3,10 @@
# System stuff
XF86AudioMute
pulsemixer --toggle-mute; audio-notify
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; audio-notify
{XF86AudioLowerVolume, XF86AudioRaiseVolume}
pulsemixer --change-volume {-5, +5}; audio-notify
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%{-,+}; audio-notify
super + {F5, F6}
sbacklight {dec,inc}
@ -18,13 +18,13 @@ super + shift + u
dmenuumount
super + s
dmenuprompt "suspend?" "systemctl suspend"
dmenuprompt "suspend?" "loginctl suspend"
super + shift + s
dmenuprompt "shutdown?" "shutdown -h now"
dmenuprompt "shutdown?" "loginctl poweroff"
super + shift + r
dmenuprompt "reboot?" "reboot"
dmenuprompt "reboot?" "loginctl reboot"
super + BackSpace
slock

View File

@ -71,14 +71,11 @@ precmd_dunctions() { zle-line-init ;} # Use beam shape cursor for each new promp
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
# Load zsh-history-search
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
source $HOME/.local/src/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
# Load zsh-syntax-highlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
source $HOME/.local/src/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[alias]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[path]='fg=magenta,bold'
ZSH_HIGHLIGHT_STYLES[unknown-token]='bg=red,fg=white,bold'
# opam configuration
test -r "$OPAMROOT/opam-init/init.zsh" && . "$OPAMROOT/opam-init/init.zsh" > /dev/null 2> /dev/null || true

View File

@ -10,8 +10,10 @@
######################################################################
level="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
muted="$(pulsemixer --get-mute)"
level="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $2*100}')"
muted="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $3}')"
if [ "1" = "$muted" ]; then
dunstify -r 100002 "Sound muted" "$level%"

View File

@ -10,19 +10,21 @@
######################################################################
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
if [ "1" = $(pulsemixer --get-mute) ]; then
level="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $2*100}')"
muted="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $3}')"
if [ "1" = "$muted" ]; then
icon="婢"
else
if [ "$vol" -gt "70" ]; then
if [ "$level" -gt "70" ]; then
icon="墳"
elif [ "$vol" -lt "30" ]; then
elif [ "$level" -lt "30" ]; then
icon="奄"
else
icon="奔"
fi
fi
printf " %s %3d%% " $icon $vol
printf " %s %3d%% " $icon $level