Added some basic mangowm configuration.
This commit is contained in:
parent
fbb1c6df2e
commit
8ecd3e9447
16 changed files with 1532 additions and 0 deletions
14
.config/mango/scripts/cycle-layout
Executable file
14
.config/mango/scripts/cycle-layout
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -x
|
||||
dir=${1:-next}
|
||||
f=/tmp/mango-layout-idx
|
||||
idx=0
|
||||
[[ -f $f ]] && idx=$(<$f)
|
||||
layouts=(tile scroller monocle grid deck center_tile vertical_tile right_tile vertical_scroller vertical_grid vertical_deck dwindle fair vertical_fair)
|
||||
if [[ "$dir" == "prev" ]]; then
|
||||
idx=$(( (idx - 1 + ${#layouts[@]}) % ${#layouts[@]} ))
|
||||
else
|
||||
idx=$(( (idx + 1) % ${#layouts[@]} ))
|
||||
fi
|
||||
mmsg dispatch setlayout,${layouts[$idx]} && echo "$idx" > "$f"
|
||||
|
||||
11
.config/mango/scripts/cycle-monitor
Executable file
11
.config/mango/scripts/cycle-monitor
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
monitors=($(mmsg get all-monitors | jq -r '.monitors[].name'))
|
||||
total=${#monitors[@]}
|
||||
[[ $total -le 1 ]] && exit 0
|
||||
cur=$(mmsg get all-monitors | jq -r '.monitors[] | select(.active == true) | .name')
|
||||
idx=0
|
||||
for i in "${!monitors[@]}"; do
|
||||
[[ "${monitors[$i]}" == "$cur" ]] && idx=$i && break
|
||||
done
|
||||
idx=$(( (idx + 1) % total ))
|
||||
mmsg dispatch focusmon,"${monitors[$idx]}"
|
||||
11
.config/mango/scripts/cycle-monitor-with-client
Executable file
11
.config/mango/scripts/cycle-monitor-with-client
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
monitors=($(mmsg get all-monitors | jq -r '.monitors[].name'))
|
||||
total=${#monitors[@]}
|
||||
[[ $total -le 1 ]] && exit 0
|
||||
cur=$(mmsg get all-monitors | jq -r '.monitors[] | select(.active == true) | .name')
|
||||
idx=0
|
||||
for i in "${!monitors[@]}"; do
|
||||
[[ "${monitors[$i]}" == "$cur" ]] && idx=$i && break
|
||||
done
|
||||
idx=$(( (idx + 1) % total ))
|
||||
mmsg dispatch tagmon,"${monitors[$idx]}"
|
||||
20
.config/mango/scripts/mango-move-with
Executable file
20
.config/mango/scripts/mango-move-with
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename "$0") {prev|next}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ $# -eq 1 ] || usage
|
||||
|
||||
case "$1" in
|
||||
prev)
|
||||
mmsg dispatch tagtoleft
|
||||
;;
|
||||
next)
|
||||
mmsg dispatch tagtoright
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
2
.config/mango/scripts/screenshot-full
Executable file
2
.config/mango/scripts/screenshot-full
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
grim - | wl-copy
|
||||
5
.config/mango/scripts/screenshot-region
Executable file
5
.config/mango/scripts/screenshot-region
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
grim -g "$(slurp)" - | wl-copy
|
||||
|
||||
|
||||
4
.config/mango/scripts/vol
Executable file
4
.config/mango/scripts/vol
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
# Adjust volume via pipewire/pulseaudio
|
||||
delta=${1:-+5}
|
||||
pactl set-sink-volume @DEFAULT_SINK@ "$delta"%
|
||||
Loading…
Add table
Add a link
Reference in a new issue