Tweaks and cleanup
This commit is contained in:
parent
3aad6fe631
commit
a6093d1758
@ -52,7 +52,7 @@ end
|
|||||||
terminal = "termite"
|
terminal = "termite"
|
||||||
editor = os.getenv("EDITOR") or "vim"
|
editor = os.getenv("EDITOR") or "vim"
|
||||||
editor_cmd = terminal .. " -e " .. editor
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
rmenu = "rofi-gorice"
|
rmenu = "rofr.sh"
|
||||||
browser = "firefox"
|
browser = "firefox"
|
||||||
filemgr = "thunar"
|
filemgr = "thunar"
|
||||||
txteditor = "geany"
|
txteditor = "geany"
|
||||||
|
@ -122,11 +122,11 @@ vicious.register(volpct, vicious.widgets.volume, "$1%", nil, "Master")
|
|||||||
-- Buttons
|
-- Buttons
|
||||||
volicon:buttons(awful.util.table.join(
|
volicon:buttons(awful.util.table.join(
|
||||||
awful.button({ }, 1,
|
awful.button({ }, 1,
|
||||||
function() awful.util.spawn_with_shell("amixer -q set Master toggle") end),
|
function() awful.util.spawn_with_shell("pamixer -t") end),
|
||||||
awful.button({ }, 4,
|
awful.button({ }, 4,
|
||||||
function() awful.util.spawn_with_shell("amixer -q set Master 3+% unmute") end),
|
function() awful.util.spawn_with_shell("pamixer -i 3") end),
|
||||||
awful.button({ }, 5,
|
awful.button({ }, 5,
|
||||||
function() awful.util.spawn_with_shell("amixer -q set Master 3-% unmute") end)
|
function() awful.util.spawn_with_shell("pamixer -d 3") end)
|
||||||
))
|
))
|
||||||
volpct:buttons(volicon:buttons())
|
volpct:buttons(volicon:buttons())
|
||||||
volspace:buttons(volicon:buttons())
|
volspace:buttons(volicon:buttons())
|
||||||
|
@ -1,46 +1,99 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Executed by startx
|
|
||||||
# By calling this with arguments we can start different sessions
|
|
||||||
# eg. startx ~/.xinitrc i3 or startx ~/.xinitrc bspwm
|
|
||||||
# simply using startx, openbox is set as the default
|
|
||||||
|
|
||||||
|
# this file is executed when calling startx
|
||||||
|
|
||||||
|
# To run different WM, run:
|
||||||
|
# startx ~/.xinitrc SESSION
|
||||||
|
# eg. startx ~/.xinitrc openbox
|
||||||
|
|
||||||
|
# Commands for autologin with Systemd & Arch
|
||||||
|
# No editing files or messing about required
|
||||||
|
#--------------------------------------#
|
||||||
|
# This copies the default getty service file so we can modify it
|
||||||
|
# 1. sudo cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
|
||||||
|
|
||||||
|
# This removes the existing link and creates a link to the file copied above
|
||||||
|
# 2. sudo rm -f /etc/systemd/system/getty.target.wants/getty@tty1.service && sudo ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
||||||
|
|
||||||
|
# This command sets your user as the autologin user
|
||||||
|
# 3. sudo sed -i "/ExecStart/ c ExecStart=-/sbin/agetty -a ${USER} %I \$TERM" /etc/systemd/system/autologin@.service
|
||||||
|
|
||||||
|
# This command will back up existing ~/.zprofile or ~/.bash_profile
|
||||||
|
# 4. for f in $HOME/.{zprofile,bash_profile}; do if [[ -f $f ]]; then mv $f $HOME/${f}.bak; fi; done
|
||||||
|
|
||||||
|
# This command creates a new ~/.zprofile & ~/.bash_profile.. you can delete the one you don't need
|
||||||
|
# 5. for x in $HOME/.{zprofile,bash_profile}; do echo -e "# $x\n\nif [[ \$DISPLAY ]] && [[ -n \$XDG_VTNR ]] && [[ \$XDG_VTNR -eq 1 ]]; then\n exec startx\nfi\n" > $x; done
|
||||||
|
|
||||||
|
# Finish up
|
||||||
|
# 6. Remove Your Current Display Manager and Reboot!!
|
||||||
|
#--------------------------------------#
|
||||||
|
|
||||||
|
|
||||||
|
# Session to run if none given
|
||||||
session=${1:-openbox}
|
session=${1:-openbox}
|
||||||
|
|
||||||
|
# set ENV window manager for use in other scripts
|
||||||
export WM="$session"
|
export WM="$session"
|
||||||
|
|
||||||
if [ -f /etc/X11/xinit/.Xmodmap ]; then
|
# bspwm requires this to be set
|
||||||
xmodmap /etc/X11/xinit/.Xmodmap
|
export XDG_CONFIG_HOME=$HOME/.config
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
# Default Arch xinit scripts
|
||||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||||
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
|
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
|
||||||
[ -x "$f" ] && . "$f"
|
[ -x "$f" ] && . "$f"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ~/.Xresources ]; then
|
if [ -f /etc/X11/xinit/.Xmodmap ]; then
|
||||||
xrdb -load ~/.Xresources
|
xmodmap /etc/X11/xinit/.Xmodmap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# user init scripts and settings
|
||||||
if [ -f ~/.Xmodmap ]; then
|
if [ -f ~/.Xmodmap ]; then
|
||||||
xmodmap ~/.Xmodmap
|
xmodmap ~/.Xmodmap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ~/.xprofile ]; then
|
if [ -f ~/.Xresources ]; then
|
||||||
. ~/.xprofile
|
xrdb -merge ~/.Xresources
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f ~/.xprofile ]; then
|
||||||
|
source ~/.xprofile
|
||||||
|
fi
|
||||||
|
|
||||||
|
# keyring for storing passwords
|
||||||
gnome-keyring-daemon --start --components=pkcs11 &
|
gnome-keyring-daemon --start --components=pkcs11 &
|
||||||
|
|
||||||
|
# run policy kit
|
||||||
lxpolkit &
|
lxpolkit &
|
||||||
|
|
||||||
|
# keyboard repeat rate
|
||||||
kbdrate -d 400 -r 50
|
kbdrate -d 400 -r 50
|
||||||
xset r rate 400 50
|
xset r rate 400 50
|
||||||
|
|
||||||
|
# display timeout
|
||||||
xset s 3600 3600
|
xset s 3600 3600
|
||||||
|
|
||||||
# start the session
|
|
||||||
|
# Do NOT put code below this case statement
|
||||||
case $session in
|
case $session in
|
||||||
i3|i3wm) exec i3 ;;
|
dwm)
|
||||||
bsp|bspwm) exec bspwm ;;
|
exec dwm
|
||||||
awesome) exec awesome ;;
|
;;
|
||||||
xfce|xfce4) exec startxfce4 ;;
|
i3|i3wm)
|
||||||
openbox|openbox-session) exec openbox-session ;;
|
exec i3
|
||||||
*) exec "$1"
|
;;
|
||||||
|
bsp|bspwm)
|
||||||
|
exec bspwm
|
||||||
|
;;
|
||||||
|
xfce|xfce4)
|
||||||
|
exec startxfce4
|
||||||
|
;;
|
||||||
|
openbox)
|
||||||
|
exec openbox-session
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exec "$1" # Unknown, try running it
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user