STATUSBAR uncommented only for i3, cleanup, probably broke everything LOL

This commit is contained in:
Luke Smith 2020-04-10 22:53:45 -04:00
parent 7ada655007
commit 6f36fe3169
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
13 changed files with 118 additions and 126 deletions

View file

@ -15,7 +15,7 @@ super + d
super + r
$TERMINAL -e $FILE
super + e
$TERMINAL -e neomutt; pkill -RTMIN+12 $STATUSBAR
$TERMINAL -e neomutt; pkill -RTMIN+12 blocks
super + m
$TERMINAL -e ncmpcpp
super + n
@ -25,7 +25,7 @@ super + c
super + v
$TERMINAL -e nvim -c VimwikiIndex
super + shift + a
$TERMINAL -e alsamixer; pkill -RTMIN+10 $STATUSBAR
$TERMINAL -e alsamixer; pkill -RTMIN+10 blocks
super + shift + c
mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --title='mpvfloat' /dev/video0
super + shift + e
@ -93,18 +93,18 @@ super + {_,shift +} bracketleft
mpc seek -{10,120}
# Increase volume
super + {equal,plus}
amixer sset Master {5,15}%+; pkill -RTMIN+10 $STATUSBAR
amixer sset Master {5,15}%+; pkill -RTMIN+10 blocks
# Decrease volume
super {_,shift +} + minus
amixer sset Master {5,15}%-; pkill -RTMIN+10 $STATUSBAR
amixer sset Master {5,15}%-; pkill -RTMIN+10 blocks
super + shift + m
amixer sset Master toggle; pkill -RTMIN+10 $STATUSBAR
amixer sset Master toggle; pkill -RTMIN+10 blocks
# Audiokeys
XF86AudioMute
amixer sset Master toggle; pkill -RTMIN+10 $STATUSBAR
amixer sset Master toggle; pkill -RTMIN+10 blocks
XF86Audio{Raise,Lower}Volume
amixer sset Master 5%{+,-}; pkill -RTMIN+10 $STATUSBAR
amixer sset Master 5%{+,-}; pkill -RTMIN+10 blocks
XF86Audio{Next,Prev}
mpc {next,prev}
XF86Audio{Pause,Play,Stop}

17
.config/xprofile Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
# This file runs when a DM logs you into a graphical session.
# If you use startx/xinit like a Chad, this file will also be sourced.
# Fix Gnome Apps Slow Start due to failing services
# Add this when you include flatpak in your system
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
mpd & # music player daemon-you might prefer it as a service though
remaps & # run the remaps script, switching caps/esc and more; check it for more info
setbg & # set the background with the `setbg` script
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources & # Uncomment to use Xresources colors/settings on startup
xcompmgr & # xcompmgr for transparency
dunst & # dunst for notifications
xset r rate 300 50 & # Speed xrate up
unclutter & # Remove mouse when idle

View file

@ -9,7 +9,7 @@ notify-send "📦 Repository Sync" "Checking for package updates..."
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
Check your internet connection, if pacman is already running, or run update manually to see errors."
pkill -RTMIN+8 "${STATUSBAR:?}"
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
if pacman -Qu | grep -v "\[ignored\]"
then

View file

@ -10,8 +10,8 @@ ping -q -c 1 1.1.1.1 > /dev/null || exit
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
echo 🔃 > /tmp/newsupdate
pkill -RTMIN+6 "${STATUSBAR:?}"
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
/usr/bin/newsboat -x reload
rm -f /tmp/newsupdate
pkill -RTMIN+6 "${STATUSBAR:?}"
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
/usr/bin/notify-send "📰 RSS feed update complete."

View file

@ -11,7 +11,7 @@
updateicon() { \
echo "$1" > /tmp/recordingicon
pkill -RTMIN+9 "${STATUSBAR:?}"
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
}
killrecording() {
@ -20,7 +20,7 @@ killrecording() {
kill -15 "$recpid"
rm -f /tmp/recordingpid
updateicon ""
pkill -RTMIN+9 "${STATUSBAR:?}"
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
sleep 3
kill -9 "$recpid"
@ -31,20 +31,20 @@ screencast() { \
ffmpeg -y \
-f x11grab \
-framerate 60 \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i $DISPLAY \
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
-i "$DISPLAY" \
-f alsa -i default \
-r 30 \
-c:v libx264rgb -crf 0 -preset ultrafast -c:a flac \
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mkv" &
-c:v h264 -crf 0 -preset ultrafast -c:a aac \
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" &
echo $! > /tmp/recordingpid
updateicon "⏺️🎙️"
}
video() { ffmpeg \
-f x11grab \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i $DISPLAY \
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
-i "$DISPLAY" \
-c:v libx264 -qp 0 -r 30 \
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid

View file

@ -2,6 +2,7 @@
# This loop will update the mpd statusbar module whenever a command changes the
# music player's status. mpd must be running on X's start for this to work.
while : ; do
mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:?}" || break
mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:-dwmblocks}" || break
done

View file

@ -3,7 +3,7 @@
printf "Beginning upgrade.\\n"
yay -Syu
pkill -RTMIN+8 "${STATUSBAR:?}"
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
read -r

View file

@ -8,4 +8,4 @@ else
ifinstalled transmission-cli || exit
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
fi
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"

View file

@ -2,6 +2,6 @@
ifinstalled tremc transmission-cli || exit
! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"
! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"
$TERMINAL -e tremc

View file

@ -4,6 +4,6 @@
# transmission-daemon sometimes fails to take remote requests in its first moments.
pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}")
pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}")
transmission-remote -a "$@" && notify-send "🔽 Torrent added."

View file

@ -3,19 +3,11 @@
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
# Get default LARBS WM from ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/wm
export LARBSWM="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/wm 2>/dev/null)" &&
[ "$LARBSWM" = "dwm" ] || export LARBSWM="i3"
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="brave"
export READER="zathura"
export STATUSBAR="${LARBSWM}blocks"
# Export XDG environmental variables from '~/.config/user-dirs.dirs'
eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
@ -48,11 +40,75 @@ export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.1=:\
*.nfo=:\
*.info=:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1 &
# Start graphical server on tty1 if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx
[ "$(tty)" = "/dev/tty1" ] && ! ps -e | grep -qw Xorg && exec startx
# Switch escape and caps if tty and no passwd required:
sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null

View file

@ -3,20 +3,18 @@
# xinitrc runs automatically when you run startx.
# There are some small but important commands that need to be run when we start
# the graphical environment. I keep those commands in ~/.xprofile because that
# file is run automatically if someone uses a display manager (login screen)
# and so they are needed there. To prevent doubling up commands, I source them
# here with the line below.
# the graphical environment. I keep those commands in ~/config/xprofile because
# that file is run automatically if someone uses a display manager (login
# screen) and so they are needed there. To prevent doubling up commands, I
# source them here with the line below.
[ -f ~/.xprofile ] && . ~/.xprofile
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile"
# Your default LARBS WM is determined in your `~/.profile` on login. Here we
# run the proper command to run when the graphical environment starts.
case "$LARBSWM" in
dwm) while :; do
ssh-agent dwm || break
done ;;
i3) exec i3 ;;
*) echo "No valid LARBS window manager detected." ;;
esac
exec dwm
# To use i3, comment out the line above with dwm and uncomment these two:
# export STATUSBAR="i3blocks"
# exec i3

View file

@ -1,81 +0,0 @@
#!/bin/sh
# This file runs when a DM logs you into a graphical session.
# If you use startx/xinit like a Chad, this file will also be sourced.
# Fix Gnome Apps Slow Start due to failing services
# Add this when you include flatpak in your system
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
mpd & # music player daemon-you might prefer it as a service though
remaps & # run the remaps script, switching caps/esc and more; check it for more info
setbg & # set the background with the `setbg` script
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources & # Uncomment to use Xresources colors/settings on startup
xcompmgr & # xcompmgr for transparency
$STATUSBAR & # start the statusbar
dunst & # dunst for notifications
xset r rate 300 50 & # Speed xrate up
unclutter & # Remove mouse when idle
mpd-module-update & # Check for when to update the mpd module
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.1=:\
*.nfo=:\
*.info=:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
"

1
.xprofile Symbolic link
View file

@ -0,0 +1 @@
.config/xprofile