File tree Expand file tree Collapse file tree 4 files changed +57
-3
lines changed Expand file tree Collapse file tree 4 files changed +57
-3
lines changed Original file line number Diff line number Diff line change @@ -626,6 +626,7 @@ if [[ "$current_hostname" == "$laptop_hostname" ]]; then
626
626
fi
627
627
628
628
declare -a systemd_units_laptop=(
629
+ /usr/lib/systemd/system/acpid.service
629
630
/usr/lib/systemd/system/open-fprintd-resume.service
630
631
/usr/lib/systemd/system/open-fprintd-suspend.service
631
632
/usr/lib/systemd/system/python3-validity.service
@@ -634,6 +635,18 @@ if [[ "$current_hostname" == "$laptop_hostname" ]]; then
634
635
systemd_enable_start " ${systemd_unit} "
635
636
done
636
637
638
+ systemctl --user daemon-reload || {
639
+ echo " failed to daemon-reload"
640
+ exit 1
641
+ }
642
+
643
+ declare -a systemd_user_units_laptop=(
644
+ " $base_path " /sway/.config/systemd/user/tablet-rotate.service
645
+ )
646
+ for systemd_user_unit in " ${systemd_user_units_laptop[@]} " ; do
647
+ systemd_user_enable_start " ${systemd_user_unit} "
648
+ done
649
+
637
650
echo " Copying laptop system configuration"
638
651
rsync_system_config " $laptop_hostname " /
639
652
elif [[ " $current_hostname " == " $desktop_hostname " ]]; then
Original file line number Diff line number Diff line change 1
1
# Specific Configuration, loaded on hostname "thinky"
2
2
3
3
output eDP-1 {
4
- mode 1920x1080@59.997Hz
4
+ mode 3840x2160@60.000Hz
5
5
render_bit_depth 8
6
+ scale 2
7
+ }
8
+
9
+ input 1386:21033:Wacom_Pen_and_multitouch_sensor_Finger {
10
+ events disabled
11
+ }
12
+
13
+ input 1386:21033:Wacom_Pen_and_multitouch_sensor_Pen {
14
+ map_to_output eDP-1
6
15
}
7
16
8
17
#
9
18
# Display brightness controls using light
10
19
#
11
- bindsym XF86MonBrightnessUp exec exec swayosd-client --brightness raise
12
- bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower
20
+ bindsym XF86MonBrightnessUp exec exec swayosd-client --brightness +5
21
+ bindsym XF86MonBrightnessDown exec swayosd-client --brightness -5
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description =Rotate display when gyro changes
3
+ PartOf =graphical-session.target
4
+
5
+ [Service]
6
+ Type =simple
7
+ Restart =always
8
+ RestartSec =1
9
+ ExecStart =%h/.local/bin/gyro-rotate
10
+
11
+ [Install]
12
+ WantedBy =sway-session.target
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Rotates the display 90deg when in tablet mode
4
+
5
+ display=$( swaymsg -t get_outputs --raw | jq ' . | map(select(.focused == true)) | .[0].name' -r)
6
+ tablet_mode=false
7
+
8
+ acpi_listen | while IFS= read -r line; do
9
+ if [[ " $line " = " video/tabletmode TBLT 0000008A 00000001" && $tablet_mode == false ]]; then
10
+ tablet_mode=true
11
+ notify-send " Tablet Mode"
12
+ swaymsg output $display transform 90
13
+ gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
14
+ elif [[ " $line " = " video/tabletmode TBLT 0000008A 00000000" && $tablet_mode == true ]]; then
15
+ tablet_mode=false
16
+ notify-send " Laptop Mode"
17
+ swaymsg output $display transform 0
18
+ gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
19
+ fi
20
+ done
You can’t perform that action at this time.
0 commit comments