From 4e1bd1e207f96ec705152e7284fcaceb135182a8 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 24 Oct 2021 21:55:02 +0200 Subject: Bspwm configuration --- sxhkd/scripts/sxhkd/move.sh | 4 ++++ sxhkd/scripts/sxhkd/rofi_new.sh | 7 +++++++ sxhkd/scripts/sxhkd/rofi_rename.sh | 9 +++++++++ sxhkd/scripts/sxhkd/rofi_resize.sh | 18 ++++++++++++++++++ sxhkd/scripts/sxhkd/rofi_rotate.sh | 21 +++++++++++++++++++++ sxhkd/scripts/sxhkd/show.sh | 3 +++ 6 files changed, 62 insertions(+) create mode 100755 sxhkd/scripts/sxhkd/move.sh create mode 100755 sxhkd/scripts/sxhkd/rofi_new.sh create mode 100755 sxhkd/scripts/sxhkd/rofi_rename.sh create mode 100755 sxhkd/scripts/sxhkd/rofi_resize.sh create mode 100755 sxhkd/scripts/sxhkd/rofi_rotate.sh create mode 100755 sxhkd/scripts/sxhkd/show.sh (limited to 'sxhkd/scripts') diff --git a/sxhkd/scripts/sxhkd/move.sh b/sxhkd/scripts/sxhkd/move.sh new file mode 100755 index 0000000..2f0d5f1 --- /dev/null +++ b/sxhkd/scripts/sxhkd/move.sh @@ -0,0 +1,4 @@ +#!/bin/sh +bspc query -D $1 || bspc monitor -a $1 +bspc node --to-desktop $1 + diff --git a/sxhkd/scripts/sxhkd/rofi_new.sh b/sxhkd/scripts/sxhkd/rofi_new.sh new file mode 100755 index 0000000..4e28454 --- /dev/null +++ b/sxhkd/scripts/sxhkd/rofi_new.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [ -z $1 ]; then + cat <(echo -e "Web\nMail\nMusique") <(bspc query --names -D) | sort -u +else + ~/scripts/sxhkd/show.sh $1 +fi + diff --git a/sxhkd/scripts/sxhkd/rofi_rename.sh b/sxhkd/scripts/sxhkd/rofi_rename.sh new file mode 100755 index 0000000..d2bb04d --- /dev/null +++ b/sxhkd/scripts/sxhkd/rofi_rename.sh @@ -0,0 +1,9 @@ +#!/bin/sh +if [ -z $1 ]; then + echo "Edit" + echo "Musique" + exit 0 +else + bspc desktop -n ${1} + exit 1 +fi diff --git a/sxhkd/scripts/sxhkd/rofi_resize.sh b/sxhkd/scripts/sxhkd/rofi_resize.sh new file mode 100755 index 0000000..dfb9679 --- /dev/null +++ b/sxhkd/scripts/sxhkd/rofi_resize.sh @@ -0,0 +1,18 @@ +#!/bin/sh +if [ -z $1 ]; then + echo "10" + echo "20" + echo "30" + echo "40" + echo "50" + echo "52" + echo "60" + echo "70" + echo "80" + echo "90" + exit 0 +else + bspc node @parent --ratio .${1} + exit 1 +fi + diff --git a/sxhkd/scripts/sxhkd/rofi_rotate.sh b/sxhkd/scripts/sxhkd/rofi_rotate.sh new file mode 100755 index 0000000..6438f2a --- /dev/null +++ b/sxhkd/scripts/sxhkd/rofi_rotate.sh @@ -0,0 +1,21 @@ +#!/bin/bash +if [ -z $1 ]; then + echo "Horaire" + echo "Antihoraire" + echo "Flip" + exit 0 +else + case $1 in + Horaire) + bspc node @parent --rotate 90 + ;; + Antihoraire) + bspc node @parent --rotate 270 + ;; + Flip) + bspc node @parent --rotate 180 + ;; + esac + exit 1 +fi + diff --git a/sxhkd/scripts/sxhkd/show.sh b/sxhkd/scripts/sxhkd/show.sh new file mode 100755 index 0000000..4f83617 --- /dev/null +++ b/sxhkd/scripts/sxhkd/show.sh @@ -0,0 +1,3 @@ +#!/bin/sh +bspc query -D --names | grep -q "$1" || bspc monitor -a "$1" +bspc desktop -f "$1" -- cgit v1.2.3