toggle script & .local/bin support
This commit is contained in:
parent
1eabb8d2d8
commit
4e2b136715
6 changed files with 70 additions and 22 deletions
18
bin/dmenukaomoji
Executable file
18
bin/dmenukaomoji
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# The famous "get a menu of kaomojis to copy" script.
|
||||||
|
|
||||||
|
# Must have xclip installed to even show menu.
|
||||||
|
xclip -h 2>/dev/null || exit 1
|
||||||
|
|
||||||
|
chosen=$(dmenu -i -l 20 < ~/.local/share/kaomoji | sed "s/ .*//")
|
||||||
|
|
||||||
|
[ "$chosen" != "" ] || exit
|
||||||
|
|
||||||
|
# If you run this command with an argument, it will automatically insert the character.
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
xdotool key Shift+Insert
|
||||||
|
else
|
||||||
|
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||||
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
|
fi
|
9
bin/toggle
Executable file
9
bin/toggle
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "`pgrep -x $1`" ]; then
|
||||||
|
$@ &
|
||||||
|
notify-send $1 "is now enabled"
|
||||||
|
else
|
||||||
|
notify-send $1 "is now disabled"
|
||||||
|
pkill $1
|
||||||
|
fi
|
|
@ -99,6 +99,7 @@ bspc rule -a Blueman-manager state=floating
|
||||||
bspc rule -a Arandr state=floating
|
bspc rule -a Arandr state=floating
|
||||||
bspc rule -a Galculator state=floating
|
bspc rule -a Galculator state=floating
|
||||||
bspc rule -a Nitrogen state=floating
|
bspc rule -a Nitrogen state=floating
|
||||||
|
bspc rule -a Emacs state=tiled
|
||||||
bspc rule -a Screenkey manage=off
|
bspc rule -a Screenkey manage=off
|
||||||
bspc rule -a Navigator desktop='^1'
|
bspc rule -a Navigator desktop='^1'
|
||||||
bspc rule -a discord desktop='^4'
|
bspc rule -a discord desktop='^4'
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/dash
|
#!/bin/dash
|
||||||
|
|
||||||
choices="arandr\nLVDS_off\ndual\nLVDS_on"
|
choices="arandr\nLVDS_off\nLVDS_on\ndual"
|
||||||
|
|
||||||
chosen=$(echo "$choices" | dmenu -i)
|
chosen=$(echo "$choices" | dmenu -i)
|
||||||
|
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
arandr) arandr ;;
|
arandr) arandr ;;
|
||||||
LVDS_off) xrandr --output LVDS-1-1 --off & ;;
|
LVDS_off) xrandr --output LVDS-1-1 --off & ;;
|
||||||
dual) xrandr --output DP-4 --auto --output VGA-1-1 --right-of DP-4 ;;
|
|
||||||
LVDS_on) xrandr --output LVDS-1-1 --auto ;;
|
LVDS_on) xrandr --output LVDS-1-1 --auto ;;
|
||||||
|
dual) xrandr --output VGA-0 --mode 1024x768 --pos 1920x312 --rotate normal --output LVDS-0 --off --output DP-0 --off --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-5 --off --output LVDS-1-1 --off --output VGA-1-1 --off ;;
|
||||||
esac
|
esac
|
||||||
|
|
23
install.sh
23
install.sh
|
@ -2,15 +2,26 @@
|
||||||
|
|
||||||
# run this function for files that go directily into the home directory
|
# run this function for files that go directily into the home directory
|
||||||
gohome() {
|
gohome() {
|
||||||
ln -sf $PWD/$1 ~/
|
ln -sfv $PWD/$1 ~/
|
||||||
}
|
}
|
||||||
|
|
||||||
# run this function for files that go into the .config file
|
# run this function for files that go into the .config file
|
||||||
goconfig() {
|
goconfig() {
|
||||||
ln -sf $PWD/$1 ~/.config/
|
ln -sfv $PWD/$1 ~/.config/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# run this function for files that go into the .local/bin file
|
||||||
|
gobin() {
|
||||||
|
ln -sfv $PWD/$1 ~/.local/bin/
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "This script will make symbolic links to all the dotfiles."
|
||||||
|
echo "Be sure to be cd-ed in the directory where the dotfiles repo resides (where this script is located ofc)\n"
|
||||||
|
echo "Type \"y\" if you do so we can continue"
|
||||||
|
read choice
|
||||||
|
|
||||||
|
if [ "$choice" = "y" ]
|
||||||
|
then
|
||||||
gohome .bashrc
|
gohome .bashrc
|
||||||
gohome .profile
|
gohome .profile
|
||||||
gohome .Xresources
|
gohome .Xresources
|
||||||
|
@ -24,5 +35,11 @@ goconfig nvim
|
||||||
goconfig lf
|
goconfig lf
|
||||||
goconfig emacs
|
goconfig emacs
|
||||||
|
|
||||||
|
gobin bin/dmenukaomoji
|
||||||
|
gobin bin/toggle
|
||||||
|
|
||||||
#install fonts
|
#install fonts
|
||||||
cp -r $PWD/polybar/fonts/* ~/.local/share/fonts
|
echo "Copying polybar fonts"
|
||||||
|
cp -ruv $PWD/polybar/fonts/* ~/.local/share/fonts
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#restart sxhkd
|
#restart sxhkd
|
||||||
super + alt + x
|
super + alt + x
|
||||||
killall -q sxhkd && sleep 1 && sxhkd &
|
killall -q sxhkd && sleep 1 && sxhkd && notify-send "sxhkd restarted &
|
||||||
###
|
###
|
||||||
# LAUNCH APPS
|
# LAUNCH APPS
|
||||||
###
|
###
|
||||||
|
@ -34,6 +34,13 @@ super + shift + e
|
||||||
$TERMINAL -e nvim -c Ex
|
$TERMINAL -e nvim -c Ex
|
||||||
|
|
||||||
|
|
||||||
|
# Toggle stuff
|
||||||
|
|
||||||
|
super + ctrl + alt + s
|
||||||
|
toggle redshift -l 44:26
|
||||||
|
super + ctrl + alt + p
|
||||||
|
toggle picom --experimental-backends
|
||||||
|
|
||||||
###
|
###
|
||||||
# MISC
|
# MISC
|
||||||
###
|
###
|
||||||
|
@ -50,10 +57,6 @@ super + ctrl + k
|
||||||
super + alt + c
|
super + alt + c
|
||||||
sleep 1; xset dpms force off
|
sleep 1; xset dpms force off
|
||||||
|
|
||||||
# Toggle redshift
|
|
||||||
super + alt + s
|
|
||||||
~/.config/bspwm/toggleredshift.sh
|
|
||||||
|
|
||||||
# dmenu display selector
|
# dmenu display selector
|
||||||
super + p
|
super + p
|
||||||
~/.config/bspwm/display.sh
|
~/.config/bspwm/display.sh
|
||||||
|
|
Loading…
Reference in a new issue