Add menu to change screen layouts
This commit is contained in:
parent
76d190e151
commit
e4dae72d77
5 changed files with 28 additions and 0 deletions
15
files/bin/rofi-screenlayout
Executable file
15
files/bin/rofi-screenlayout
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
LAYOUTS_DIR=$HOME/.config/screen-layouts
|
||||||
|
IFS=
|
||||||
|
layouts=$(find $LAYOUTS_DIR -name "*.sh" | xargs realpath --relative-to $LAYOUTS_DIR)
|
||||||
|
|
||||||
|
chosen_layout=$(echo -e $layouts | rofi -dmenu -p "Select Layout" -no-custom -lines 5)
|
||||||
|
chosen_layout_file="${LAYOUTS_DIR}/${chosen_layout}"
|
||||||
|
|
||||||
|
echo "Setting layout to ${chosen_layout}"
|
||||||
|
bash $chosen_layout_file
|
||||||
|
|
||||||
|
i3-msg restart
|
|
@ -40,6 +40,7 @@ bindsym Control+Shift+Escape exec --no-startup-id gnome-system-monitor
|
||||||
bindsym Control+Q exec --no-startup-id /bin/false
|
bindsym Control+Q exec --no-startup-id /bin/false
|
||||||
bindsym $mod+Shift+Delete exec --no-startup-id rofi-powermenu
|
bindsym $mod+Shift+Delete exec --no-startup-id rofi-powermenu
|
||||||
bindcode 124 exec --no-startup-id rofi-powermenu
|
bindcode 124 exec --no-startup-id rofi-powermenu
|
||||||
|
bindsym $mod+P exec --no-startup-id rofi-screenlayout
|
||||||
|
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
|
|
2
files/screen-layouts/DabApps/desk.sh
Executable file
2
files/screen-layouts/DabApps/desk.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
xrandr --output eDP-1 --primary --mode 1920x1200 --pos 0x322 --rotate normal --output DP-1 --off --output HDMI-1 --mode 1920x1080 --pos 3839x0 --rotate normal --output DP-2 --off --output HDMI-2 --mode 1920x1080 --pos 1920x0 --rotate normal
|
2
files/screen-layouts/DabApps/macbook.sh
Executable file
2
files/screen-layouts/DabApps/macbook.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
xrandr --output eDP-1 --primary --mode 1920x1200 --pos 0x322 --rotate normal --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output HDMI-2 --off
|
|
@ -96,3 +96,11 @@
|
||||||
dest: /usr/bin/pranklock
|
dest: /usr/bin/pranklock
|
||||||
mode: 0755
|
mode: 0755
|
||||||
force: true
|
force: true
|
||||||
|
|
||||||
|
- name: Install Screen Layouts
|
||||||
|
copy:
|
||||||
|
src: ./files/screen-layouts
|
||||||
|
dest: "{{ home }}/.config"
|
||||||
|
mode: 0755
|
||||||
|
directory_mode: 0755
|
||||||
|
owner: "{{ user }}"
|
||||||
|
|
Loading…
Reference in a new issue