Merge branch 'dev' into mercury
mail: add maps for next- and previous-new displayselect: add external mode for docked setup
This commit is contained in:
commit
418cea6ea6
|
@ -13,6 +13,8 @@ macro index,pager im '<sync-mailbox><enter-command>source $XDG_CONFIG_HOME/neomu
|
||||||
# General rebindings
|
# General rebindings
|
||||||
bind index j next-entry
|
bind index j next-entry
|
||||||
bind index k previous-entry
|
bind index k previous-entry
|
||||||
|
bind index J next-new
|
||||||
|
bind index K previous-new
|
||||||
bind attach <return> view-mailcap
|
bind attach <return> view-mailcap
|
||||||
bind attach l view-mailcap
|
bind attach l view-mailcap
|
||||||
bind editor <space> noop
|
bind editor <space> noop
|
||||||
|
|
|
@ -44,17 +44,28 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||||
}
|
}
|
||||||
|
|
||||||
default() {
|
default() {
|
||||||
primary=$(echo "$allposs" | grep -w "connected primary" | awk '{printf $1}')
|
primary=$(echo "$allposs" | grep -w "connected primary" | awk '{ print $1 }')
|
||||||
secondary=$(echo "$screens" | grep -v -w "$primary")
|
secondary=$(echo "$screens" | grep -v -w "$primary")
|
||||||
direction="left"
|
direction="left"
|
||||||
rotation="normal"
|
rotation="normal"
|
||||||
setup
|
setup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
external() {
|
||||||
|
internal=$(echo "$screens" | dmenu -i -p "Select internal display:")
|
||||||
|
screens=$(echo "$screens" | grep -v -w "eDP-1")
|
||||||
|
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
|
||||||
|
xrandr --output $primary --primary
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
[ -z "$mode" ] && mode="auto"
|
[ -z "$mode" ] && mode="auto"
|
||||||
xrandr --output "$primary" --auto --scale 1.0x1.0 \
|
xrandr --output "$primary" --primary --auto --scale 1.0x1.0 \
|
||||||
--output "$secondary" --"$direction"-of "$primary" --$mode
|
--output "$secondary" --"$direction"-of "$primary" --$mode
|
||||||
|
|
||||||
|
[ -n "$internal" ] && xrandr --output "$internal" --off
|
||||||
}
|
}
|
||||||
|
|
||||||
morescreen() { # If multi-monitor is selected and there are more than two screens.
|
morescreen() { # If multi-monitor is selected and there are more than two screens.
|
||||||
|
@ -79,9 +90,10 @@ allposs=$(xrandr -q | grep -w "connected")
|
||||||
screens=$(echo "$allposs" | awk '{print $1}')
|
screens=$(echo "$allposs" | awk '{print $1}')
|
||||||
|
|
||||||
# Get user choice including multi-monitor and manual selection:
|
# Get user choice including multi-monitor and manual selection:
|
||||||
chosen=$(printf "default\\nmulti-monitor\\n%s\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
|
chosen=$(printf "default\\nexternal\\nmulti-monitor\\n%s\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"default") default ;;
|
"default") default ;;
|
||||||
|
"external") external ;;
|
||||||
"manual selection") arandr ; exit ;;
|
"manual selection") arandr ; exit ;;
|
||||||
"multi-monitor") multimon ;;
|
"multi-monitor") multimon ;;
|
||||||
*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
||||||
|
|
Reference in New Issue