Compare commits
2 commits
aaa84bbc69
...
4cd474411f
Author | SHA1 | Date | |
---|---|---|---|
4cd474411f | |||
614cdf0612 |
1 changed files with 10 additions and 7 deletions
|
@ -1,18 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
extern_1="HDMI1"
|
||||
extern_2="DP1"
|
||||
intern="eDP1"
|
||||
extern_1="HDMI-1"
|
||||
extern_2="DP-1"
|
||||
intern="eDP-1"
|
||||
polybar_top_padding=22
|
||||
|
||||
common_adjustments() {
|
||||
~/.fehbg &
|
||||
xmodmap ~/.Xmodmap
|
||||
}
|
||||
|
||||
switch_internal() {
|
||||
xrandr --output "$extern_2" --off \
|
||||
--output "$extern_1" --off \
|
||||
--output "$intern" --auto --primary
|
||||
herbstclient detect_monitors
|
||||
herbstclient pad 0 "$polybar_top_padding"
|
||||
~/.fehbg &
|
||||
xmodmap ~/.Xmodmap
|
||||
}
|
||||
|
||||
switch_external() {
|
||||
|
@ -23,16 +26,16 @@ switch_external() {
|
|||
herbstclient pad 0 0
|
||||
herbstclient pad 2 0
|
||||
herbstclient pad 1 "$polybar_top_padding"
|
||||
~/.fehbg &
|
||||
xmodmap ~/.Xmodmap
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
i* )
|
||||
switch_internal
|
||||
common_adjustments
|
||||
;;
|
||||
e* )
|
||||
switch_external
|
||||
common_adjustments
|
||||
;;
|
||||
* )
|
||||
echo "Specify new output configuration. Possibilities are: 'external' and 'internal'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue