move bindswith for lid into config. dunno what it was script

This commit is contained in:
rileyrg 2021-05-26 23:22:27 +02:00
parent 8dff0538ad
commit a4439cdacc
4 changed files with 11 additions and 32 deletions

View file

@ -777,6 +777,7 @@ for_window [title="sway-launcher"] floating enable
set $term 'sway-scratch-terminal'
set $editor 'sway-editor'
set $wallpaper "~/Pictures/Wallpapers/current"
set $laptop-id `sway-laptop-id`
set $trans 0.8
set $alphamark "α"
@ -819,7 +820,8 @@ bindsym $mod+d exec $menu
1. lid :lid:clamshell:
```conf
exec sway-lid
bindswitch lid:on exec "sway-screen disable $laptop-id"
bindswitch lid:off exec "sway-screen enable $laptop-id"
```
2. brightness :brightness:
@ -1818,18 +1820,6 @@ echo $id
```
### ~/bin/sway/sway-lid
```bash
#!/usr/bin/bash
# Maintained in linux-config.org
m="$(sway-laptop-id)"
swaymsg bindswitch lid:on exec "sway-screen disable $m"
swaymsg bindswitch lid:off exec "sway-screen enable $m"
echo $m
```
### ~/bin/sway/sway-lock
```bash
@ -1848,7 +1838,7 @@ notify-send -t 3000 "${@}"
```
<a id="orgac28aae"></a>
<a id="org06cd628"></a>
### ~/bin/sway/sway-screen
@ -1869,7 +1859,7 @@ swaymsg "output ${m} ${c}"
### ~/bin/sway/sway-screen-menu
Gui to select a display and enable/disable it. Calls down to [~/bin/sway/sway-screen](#orgac28aae).
Gui to select a display and enable/disable it. Calls down to [~/bin/sway/sway-screen](#org06cd628).
:ID: 82455cae-1c48-48b2-a8b3-cb5d44eeaee9

View file

@ -1,6 +0,0 @@
#!/usr/bin/bash
# Maintained in linux-config.org
m="$(sway-laptop-id)"
swaymsg bindswitch lid:on exec "sway-screen disable $m"
swaymsg bindswitch lid:off exec "sway-screen enable $m"
echo $m

View file

@ -10,6 +10,7 @@ for_window [title="sway-launcher"] floating enable
set $term 'sway-scratch-terminal'
set $editor 'sway-editor'
set $wallpaper "~/Pictures/Wallpapers/current"
set $laptop-id `sway-laptop-id`
set $trans 0.8
set $alphamark "α"
@ -44,7 +45,8 @@ output * bg $wallpaper fill
bindsym $mod+Shift+e exec $editor
bindsym $mod+d exec $menu
exec sway-lid
bindswitch lid:on exec "sway-screen disable $laptop-id"
bindswitch lid:off exec "sway-screen enable $laptop-id"
bindsym --locked XF86MonBrightnessUp exec --no-startup-id light -A 10 && sway-brightness-notify
bindsym --locked XF86MonBrightnessDown exec --no-startup-id light -U 10 && sway-brightness-notify

View file

@ -1308,6 +1308,7 @@ $XDG_DATA_HOME/dbus-1/services/org.freedesktop.Notifications.service
set $term 'sway-scratch-terminal'
set $editor 'sway-editor'
set $wallpaper "~/Pictures/Wallpapers/current"
set $laptop-id `sway-laptop-id`
set $trans 0.8
set $alphamark "α"
@ -1346,7 +1347,8 @@ $XDG_DATA_HOME/dbus-1/services/org.freedesktop.Notifications.service
*** display
**** lid :lid:clamshell:
#+begin_src conf
exec sway-lid
bindswitch lid:on exec "sway-screen disable $laptop-id"
bindswitch lid:off exec "sway-screen enable $laptop-id"
#+end_src
**** brightness :brightness:
#+begin_src conf
@ -2253,15 +2255,6 @@ but in both cases we check if it exists in the sway tree, and, if not, set it it
fi
echo $id
#+end_src
*** ~/bin/sway/sway-lid
#+begin_src bash :tangle ~/bin/sway/sway-lid
#!/usr/bin/bash
# Maintained in linux-config.org
m="$(sway-laptop-id)"
swaymsg bindswitch lid:on exec "sway-screen disable $m"
swaymsg bindswitch lid:off exec "sway-screen enable $m"
echo $m
#+end_src
*** ~/bin/sway/sway-lock
:PROPERTIES:
:ID: 82455cae-1c48-48b2-a8b3-cb5d44eeaee9