Switch to i3

This commit is contained in:
Asocia
2021-07-11 16:51:11 +03:00
parent aafe749ced
commit bf6eb6b13a
19 changed files with 1120 additions and 0 deletions

11
scripts/rofi/launch.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
menu="$1"
if [ "$menu" = "music" ]; then
rofi -modi 'Music:~/scripts/rofi/music.sh' -show Music -theme music-launcher
elif [ "$menu" = "appmenu" ]; then
rofi -show drun -theme clean
elif [ "$menu" = "powermenu" ]; then
rofi -modi 'Powermenu:~/scripts/rofi/powermenu.sh' -show Powermenu -theme powermenu -location 3 -xoffset -24 -yoffset 70
fi

24
scripts/rofi/music.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
MUSIC="$HOME/music"
function get_music() {
IFS=$'\n'
for i in $(ls "$MUSIC" | grep -v 'thumbs'); do
name="${i%.*}"
echo -en "${i}\0icon\x1f${MUSIC}/thumbs/${name}.png\n"
done
}
if [ -z "$@" ]; then
echo -en "Shuffle\0icon\x1fmedia-playlist-shuffle\n"
get_music
else
if [ "$1" = "Shuffle" ]; then
$HOME/scripts/music/mpv-controller.sh start shuffle &
else
$HOME/scripts/music/mpv-controller.sh start "${MUSIC}/$1" &
fi
fi

19
scripts/rofi/powermenu.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
if [ -z "$@" ]; then
echo -en "Shutdown\0icon\x1fsystem-shutdown\n"
echo -en "Logout\0icon\x1fsystem-log-out\n"
echo -en "Suspend\0icon\x1fsystem-suspend\n"
echo -en "Reboot\0icon\x1fsystem-restart\n"
else
if [ "$1" = "Shutdown" ]; then
shutdown now
elif [ "$1" = "Logout" ]; then
i3-msg exit
elif [ "$1" = "Reboot" ]; then
reboot
elif [ "$1" = "Suspend" ]; then
systemctl suspend
fi
fi