diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2023-09-16 12:01:01 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2023-09-16 12:02:00 +0000 |
commit | 63fee6b75ff7c508ef959cb6515f733c29f3d837 (patch) | |
tree | 73bfac3ae70485fa27dfd638b75df97e93ac6e0a | |
parent | 2e5aa362b54d0a4865b58a9fbf8834a870b4ba0e (diff) | |
download | dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.gz dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.bz2 dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.lz dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.xz dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.tar.zst dotfiles-63fee6b75ff7c508ef959cb6515f733c29f3d837.zip |
Update MANPAGER to use nvim and update dwm
-rwxr-xr-x | .profile | 10 | ||||
-rw-r--r-- | .xinitrc | 32 | ||||
-rwxr-xr-x | dwm/.dwm/autostart | 16 | ||||
-rwxr-xr-x | dwm/.dwm/bar/bar.sh | 15 | ||||
-rwxr-xr-x | dwm/.dwm/bar/themes/dracula | 1 | ||||
-rw-r--r-- | dwm/README.md | 3 | ||||
-rw-r--r-- | dwm/chadwm/config.def.h | 11 |
7 files changed, 50 insertions, 38 deletions
@@ -30,6 +30,7 @@ XDG_CONFIG_HOME="$HOME/.config" XDG_CACHE_DIR="$HOME/.cache" GOPATH="$XDG_CACHE_DIR/go" PNPM_HOME="$HOME/.local/share/pnpm" +MANPAGER="nvim +Man!" export DENO_INSTALL export DENO_NO_UPDATE_CHECK @@ -46,14 +47,7 @@ export EDITOR export GTK_THEME export BAT_THEME export TERMINAL -export GOTOOLCHAIN - -BAT="$(which bat 2> /dev/null || which batcat 2> /dev/null)" -if [ -n "$BAT" ] && man --version 2> /dev/null > /dev/null -then - MANPAGER="sh -c 'col -bx | $BAT -l man -p'" - export MANPAGER -fi +export MANPAGER SWAY_PROCESSES="$(pgrep sway)" @@ -1,31 +1,37 @@ #!/usr/bin/env sh # vi: ft=sh +eval $(dbus-launch --sh-syntax) + picom --vsync --no-fading-openclose --shadow-opacity=1.0 --dbus --daemon -feh --auto-reload --bg-fill $HOME/Pictures/wall.png & +feh --auto-reload --bg-fill "$HOME/Pictures/wall.png" & dunst & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & nm-applet & blueman-applet & thunar --daemon & -#pipewire & -#pipewire-pulse & +pipewire & +pipewire-pulse & +wireplumber & +xss-lock xsecurelock & # Set up touchpad controls # Libinput -TID=$(xinput | sed -n 's/.*Touchpad.*id=\([0-9]*\).*/\1/p') -#xinput --set-prop $TID 'libinput Accel Speed' 0.5 -xinput --set-prop $TID 'libinput Tapping Enabled' 1 & -xinput --set-prop $TID 'libinput Natural Scrolling Enabled' 1 & +# TID=$(xinput | sed -n 's/.*Touchpad.*id=\([0-9]*\).*/\1/p') +# #xinput --set-prop $TID 'libinput Accel Speed' 0.5 +# xinput --set-prop $TID 'libinput Tapping Enabled' 1 & +# xinput --set-prop $TID 'libinput Natural Scrolling Enabled' 1 & # Synapse -#TID=`xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/.*id=\([0-9]*\).*/\1/g'` -#PROP_NO=`xinput list-props ${TID} | grep "Synaptics Scrolling Distance" | sed 's/.*(\([0-9]*\)).*/\1/g'` -#xinput --set-prop $TID 'Synaptics Tap Action' 1 -#xinput set-prop ${TID} ${PROP_NO} -106 -106 +TID=`xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/.*id=\([0-9]*\).*/\1/g'` +PROP_NO=`xinput list-props ${TID} | grep "Synaptics Scrolling Distance" | sed 's/.*(\([0-9]*\)).*/\1/g'` +xinput --set-prop $TID 'Synaptics Tap Action' 1 +xinput set-prop ${TID} ${PROP_NO} -106 -106 + +setxkbmap no #bspc monitor -d I II III IV V VI VII VIII IX X xrandr --output eDP1 --primary --auto @@ -33,5 +39,7 @@ xrandr --output HDMI1 --same-as eDP1 --auto xrdb -merge .config/xresources -exec i3 +# exec i3 +./dotfiles/dwm/.dwm/bar/bar.sh & +exec dwm diff --git a/dwm/.dwm/autostart b/dwm/.dwm/autostart index f793957..b288134 100755 --- a/dwm/.dwm/autostart +++ b/dwm/.dwm/autostart @@ -13,16 +13,16 @@ feh --auto-reload --bg-fill /usr/share/backgrounds/background.png & # Set up touchpad controls # Libinput -TID=$(xinput | sed -n 's/.*Touchpad.*id=\([0-9]*\).*/\1/p') -#xinput --set-prop $TID 'libinput Accel Speed' 0.5 -xinput --set-prop $TID 'libinput Tapping Enabled' 1 & -xinput --set-prop $TID 'libinput Natural Scrolling Enabled' 1 & +#TID=$(xinput | sed -n 's/.*Touchpad.*id=\([0-9]*\).*/\1/p') +##xinput --set-prop $TID 'libinput Accel Speed' 0.5 +#xinput --set-prop $TID 'libinput Tapping Enabled' 1 & +#xinput --set-prop $TID 'libinput Natural Scrolling Enabled' 1 & # Synapse -#TID=`xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/.*id=\([0-9]*\).*/\1/g'` -#PROP_NO=`xinput list-props ${TID} | grep "Synaptics Scrolling Distance" | sed 's/.*(\([0-9]*\)).*/\1/g'` -#xinput --set-prop $TID 'Synaptics Tap Action' 1 -#xinput set-prop ${TID} ${PROP_NO} -106 -106 +TID=`xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/.*id=\([0-9]*\).*/\1/g'` +PROP_NO=`xinput list-props ${TID} | grep "Synaptics Scrolling Distance" | sed 's/.*(\([0-9]*\)).*/\1/g'` +xinput --set-prop $TID 'Synaptics Tap Action' 1 +xinput set-prop ${TID} ${PROP_NO} -106 -106 # run bar script and dwm ( do not remove this ) SYMLINKDIR=$(readlink -f "$0") diff --git a/dwm/.dwm/bar/bar.sh b/dwm/.dwm/bar/bar.sh index 796453c..65eb35e 100755 --- a/dwm/.dwm/bar/bar.sh +++ b/dwm/.dwm/bar/bar.sh @@ -44,8 +44,8 @@ battery() { } brightness() { - brightness="$(cat /sys/class/backlight/intel_backlight/brightness)" - brightness_max="$(cat /sys/class/backlight/intel_backlight/max_brightness)" + brightness="$(cat /sys/class/backlight/*/brightness)" + brightness_max="$(cat /sys/class/backlight/*/max_brightness)" level=$(echo "scale=2; $brightness / $brightness_max * 100" | bc) printf "^c$red^ " @@ -70,8 +70,15 @@ clock() { } volume() { - volume_status="$(pamixer --get-volume-human)" - printf "^c$blue^ 🔊 $volume_status" + pactl_output="$(pactl list sinks )" + is_mute="$(echo "$pactl_output" | grep Mute | grep -oE "yes|no")" + if [ $is_mute = "yes" ] + then + printf "^c$red^ 🔇 mute" + else + volume_status="$(echo "$pactl_output" | grep olume | grep -oE "\w+%" | head -n 1)" + printf "^c$yellow^ 🔊 %s" $volume_status + fi } keyboard() { diff --git a/dwm/.dwm/bar/themes/dracula b/dwm/.dwm/bar/themes/dracula index ea2b4f4..6f7a699 100755 --- a/dwm/.dwm/bar/themes/dracula +++ b/dwm/.dwm/bar/themes/dracula @@ -9,3 +9,4 @@ grey=#282a36 blue=#d6acff red=#ff5555 darkblue=#bd93f9 +yellow=#f1fa8c diff --git a/dwm/README.md b/dwm/README.md index 58a64ce..3c49f3f 100644 --- a/dwm/README.md +++ b/dwm/README.md @@ -11,7 +11,6 @@ - rofi - flameshot - xbacklight -- pamixer - playerctl - xsecurelock @@ -32,7 +31,7 @@ # Install deps ```console -# pacman -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight pamixer playerctl xsecurelock +# pacman -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight playerctl xsecurelock ``` # Setup diff --git a/dwm/chadwm/config.def.h b/dwm/chadwm/config.def.h index a427cdd..032a381 100644 --- a/dwm/chadwm/config.def.h +++ b/dwm/chadwm/config.def.h @@ -130,9 +130,10 @@ static const char *rofi[] = {"rofi", "-show", "drun", NULL}; static const char *xi[] = {"xbacklight", "-inc", "7", NULL}; static const char *screenshotcmd[] = {"flameshot", "gui", NULL}; static const char *xd[] = {"xbacklight", "-dec", "7", NULL}; -static const char *volume_up_cmd[] = {"pamixer", "--allow-boost", "-i", "5", NULL}; -static const char *volume_down_cmd[] = {"pamixer", "--allow-boost", "-d", "5", NULL}; -static const char *volume_mute_toggle[] = {"pamixer", "-t", NULL}; +static const char *volume_up_cmd[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL}; +static const char *volume_down_cmd[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL}; +static const char *volume_mute_toggle[] = {"pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL}; +static const char *volume_mutemic_toggle[] = {"pactl", "set-source-mute", "@DEFAULT_SOURCE@", "toggle", NULL}; static const char *keyboard_brightness_up[] = {"xbacklight", "-ctrl", "asus::kbd_backlight", "-inc", "33", NULL}; static const char *keyboard_brightness_down[] = {"xbacklight", "-ctrl", "asus::kbd_backlight", @@ -140,7 +141,7 @@ static const char *keyboard_brightness_down[] = {"xbacklight", "-ctrl", "asus::k static const char *player_toggle[] = {"playerctl", "play-pause", NULL}; static const char *player_next[] = {"playerctl", "next", NULL}; static const char *player_previous[] = {"playerctl", "previous", NULL}; -static const char *screen_lock[] = {"dm-tool", "lock", NULL}; +static const char *screen_lock[] = {"xsecurelock", NULL}; static Key keys[] = { /* modifier key function argument */ @@ -157,6 +158,7 @@ static Key keys[] = { {0, XF86XK_AudioRaiseVolume, spawn, {.v = volume_up_cmd}}, {0, XF86XK_AudioLowerVolume, spawn, {.v = volume_down_cmd}}, {0, XF86XK_AudioMute, spawn, {.v = volume_mute_toggle}}, + {0, XF86XK_AudioMicMute, spawn, {.v = volume_mutemic_toggle}}, {0, XF86XK_AudioPlay, spawn, {.v = player_toggle}}, {0, XF86XK_AudioNext, spawn, {.v = player_next}}, {0, XF86XK_AudioPrev, spawn, {.v = player_previous}}, @@ -223,6 +225,7 @@ static Key keys[] = { {MODKEY | ShiftMask, XK_Left, dectag, {0}}, {MODKEY | ControlMask | ShiftMask, XK_Left, dectoggletag, {0}}, {MODKEY | ShiftMask, XK_0, tag, {.ui = ~0}}, + {MODKEY | ShiftMask | ControlMask, XK_0, tag, {.ui = 1}}, {MODKEY, XK_comma, focusmon, {.i = -1}}, {MODKEY, XK_period, focusmon, {.i = +1}}, {MODKEY | ShiftMask, XK_comma, tagmon, {.i = -1}}, |