# Sway on the Framework Laptop 12

**URL:** <https://community.frame.work/t/sway-on-the-framework-laptop-12/73173>\
**Category:** Linux\
**Tags:** fedora\
**Created:** [August 3, 2025, 11:08pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173 "2025-08-03T23:08:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 3, 2025, 11:08pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/1 "2025-08-03T23:08:23Z")

</div>

I am using Sway on the Framework Laptop 12. This thread is for people to share tips.

## Tablet mode

I recently commented, “I installed a virtual keyboard [wvkbd](https://github.com/jjsullivan5196/wvkbd). Then I need to set up the auto-rotation, and may add some buttons on Waybar.” on [this thread](https://community.frame.work/t/fw-12-initial-thoughts/71228/206). And here is an update. I customized the wvkbd, changing the keyboard size and font. I set up the auto-rotating display. I added the buttons “Apps” to toggle a menu to launch apps, “Close” to close the current focused window, and “Virt Kbd” to toggle a virtual keyboard.

 ![screenshot_laptop_12_wvkbd_landscape](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/7/d/7dab478ecec061a4f99968219d1e62061505363f.jpeg)

 ![screenshot_laptop_12_wvkbd_portrait](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/9/3/93174a975146d79eb64dbed1c9a0139ea8dd39ad.jpeg)

You can check the details below.

> **[Framework Laptop 12 tablet mode on Sway](https://github.com/junaruga/framework-laptop-config/wiki/Framework-Laptop-12-tablet-mode-on-Sway)**
>
> Contribute to junaruga/framework-laptop-config development by creating an account on GitHub.

## Custom power button

I customized the power key to suspend by pressing the button and power off by long-pressing the button. Because the power key was set to power off when pressing the button by default on Sway. You can check the details below.

> **[Framework Laptop 12](https://github.com/junaruga/framework-laptop-config/wiki/Framework-Laptop-12)**
>
> Contribute to junaruga/framework-laptop-config development by creating an account on GitHub.

I will update the page when I update my configs on Framework Laptop 12.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 4, 2025, 6:18am UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/2 "2025-08-04T06:18:52Z")

</div>

I updated the above screenshots with the transparent virtual keyboard.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 4, 2025, 7:39am UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/3 "2025-08-04T07:39:26Z")

</div>

I found a cool keyboard layout such as standard US keyboard layout of wvkbd and menu bar (waybar?) on a tiling window manager for a screenshot on the first comment on the following page. It seems that the left top 2 buttons are to launch apps and virtual keyboard.

> <https://github.com/jjsullivan5196/wvkbd/pull/67>
>
> This adds the layout from user nine7nine as described in https://github.com/jjsu…llivan5196/wvkbd/issues/54. See screenshot (athough with my own dracula theme which is not part of this MR)
> 
> !\[20240318\_18h02m24s\_grim\](https://github.com/jjsullivan5196/wvkbd/assets/1927259/b13c482e-75cc-4d27-a7dc-5f5ac153444b)

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 8, 2025, 7:48am UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/4 "2025-08-08T07:48:02Z")

</div>

I sent the following pull request to the wvkbd project. Stay tuned!

> <https://github.com/jjsullivan5196/wvkbd/pull/103>
>
> Let me send the pull request (PR) via GitHub for better visibility in this conte…xt. I can also send this patch by \`git send-email\`.
> 
> This PR adds a desktop layout set. I took over the work on the https://github.com/jjsullivan5196/wvkbd/pull/67.
> 
> The layout set is aimed at desktop, laptop, and tablet devices with a larger touchscreen. The layout is the US-International English below, adding a compose key.
> https://en.wikipedia.org/wiki/QWERTY#US-International
> 
> I also referred to the \[Framework Laptop 12\](https://frame.work/laptop12)'s US English layout about the Fn (Function) layer's layout.
> 
> \<img width="615" height="469" alt="framework-laptop-12-international-english" src="https://github.com/user-attachments/assets/6998e257-5d6e-46f3-a074-fa6f1410e793" /\>
> 
> The layout set was created based on the layout set by the user nine7nine (Jordan Johnston) \<https://github.com/nine7nine\>.
> 
> \## Screenshots
> 
> The screenshots are below. I took the screenshots on the \[Sway window manager\](https://swaywm.org/) on Fedora Linux 42 on Framework Laptop 12 (a 2-in-1 laptop with a touchscreen). You can download the original image files \[here\](https://drive.google.com/drive/folders/1xuy4-H4fsJaevShItrUpW\_lI3oFK0mvT?usp=drive\_link) on my Google Drive.
> 
> \### Landscape
> 
> \*\*Layout \`Landscape\` (\`keys\_landscape\`)\*\*
> \<img width="1920" height="1200" alt="wvkbd-desktop-landscape" src="https://github.com/user-attachments/assets/8d943f64-9e7d-4ba4-9458-c880384483f5" /\>
> 
> \*\*Layout \`LandscapeSpecial\` (\`keys\_landscape\_special\`)\*\*
> \<img width="1920" height="1200" alt="wvkbd-desktop-landscape-special" src="https://github.com/user-attachments/assets/721fc105-5463-48f0-a982-598e82e245fa" /\>
> 
> \### Portrait
> 
> \*\*Layout \`Full\` (\`keys\_full\`)\*\*
> \<img width="1200" height="1920" alt="wvkbd-desktop-portrait" src="https://github.com/user-attachments/assets/acc5792e-b06e-4000-8f96-3087bc09f828" /\>
> 
> \*\*Layout \`Special\` (\`keys\_special\`)\*\*
> \<img width="1200" height="1920" alt="wvkbd-desktop-portrait-special" src="https://github.com/user-attachments/assets/b0408bf4-1880-4223-852b-c9f68b5e07ea" /\>
> 
> \## Reply to the comments
> 
> @proycon's comment (https://github.com/jjsullivan5196/wvkbd/pull/67#issuecomment-2027782803):
> 
> \> \> Just credit my part of it in the commit, and we are good!
> \> This was my first thought as well; I understand this
> \> comes from \[@nine7nine\](https://github.com/nine7nine)'s fork with additional improvements by \[@FearlessSpiff\](https://github.com/FearlessSpiff) on
> top. Right now the commit history in this PR doesn't reflect this though.
> ...
> \> \[@FearlessSpiff\](https://github.com/FearlessSpiff): Could you rebase the PR so the original commits are as
> \> they were (carrying the proper Author for attribution)? And then yours
> \> on top of that? (you might still have them in your working tree)
> 
> I added @nine7nine's name as a credit in the commit message. I couldn't find @nine7nine's branch in the forked repository. So, this PR is based on https://github.com/jjsullivan5196/wvkbd/pull/67, and rebased on the latest master branch. And I modified and adjusted the code. 
> 
> \> Some other comments:
> \>
> \> I didn't really notice the line is not straight, but I do notice the
> \> slight border on the left/right yes. I suppose it's a purely aestethic
> \> choice or does it have some functional reason too?
> 
> I adjusted each key's width with \`0.25 \* N\`. I set each row's total width as 14.5 in each layout.
> 
> \> \* I see some of the keys were renamed, which is okay but care has to be
> \> taken to do it consistently for all layers in the desktop layout
> \> then. Changing labels also makes it a bit harder to document keys clearly as
> \> the README refers to Cmp for example, I'd suggest not renaming these
> \> keys unless there's a good reason). I noticed:
> \> \* "Cmp" changed to "\>\<"
> \> \* Sup changed to "\<Arch logo\>"; ideally I think we better keep a distro-neutral label
> \> in wvkbd rather than an Arch/Debian/Gentoo/.. logo
> \> (even though I too mostly use Arch, btw)
> 
> I fixed the above things.
> 
> \> \* though 99% percent of desktop users are probably on a landscape
> \> layout, some 1% have a portrait monitor. The layout that opens
> \> then is still the same as in wvkbd-mobintl. Is this by choice? I'd be inclined to
> \> just use the same new landscape layout in portrait mode since the screen is probably
> \> wide enough on desktop.
> 
> I fixed the above thing. Now, the landscape and portrait modes have the same layouts.
> 
> \> \* Perhaps an AltGr key would be useful on the default layer (right of spacebar)?
> \> It would give alternative access to some special keys users may
> \> already be used too (and as an alterntive for Cmp).
> 
> I fixed the above thing. I added the AltGr key.
> 
> \> \* Currently the keymaps and layouts for the other languages are still in
> \> the code, but not really modified. If they're not used they should be
> \> removed. Ideally though, a desktop layout for cyrillic etc would be
> \> great (if anyone's up for it).
> 
> I removed unused keymaps and layouts for other languages, also some compose layouts (\`ComposeMath\`, \`ComposePunctuation\`, \`ComposeBracket\`, and \`ComposeCyr\*\`) to simplify the layout set. I wanted to show a simple example so that users can modify and extend the \`layout.\*.h\` file easily.
> 
> I see some duplicated codes between \`layout.mobintl.h\` and \`layout.deskintl.h\`. Can we move the code related to the layouts \`Compose\*\` into a header file, such as \`layout\_compose.h\`, and the \`layout.mobintl.h\` and \`layout.deskintl.h\` load the \`layout\_compose.h\`?
> 
> @justinlovinger's comment (https://github.com/jjsullivan5196/wvkbd/pull/67#issuecomment-2645300798):
> 
> \> \`\<\`, \`\>\`, and \`?\` type the wrong symbols.
> 
> I still have no idea about how to fix this issue. Could you tell me how to fix it?
> 
> \## Notes
> 
> I executed \`make format\`. However, after executing the command, I see many changes including the \`keymap.mobintl.h\` and \`layout.mobintl.h\`. So, I didn't apply the changes to \`keymap.deskintl.h\` and \`layout.deskintl.h\`. Because I think it's better to align the content between the \`\*.mobintl.h\` and \`\*.deskintl.h\`.
> 
> \`\`\`
> $ clang-format --version
> clang-format version 20.1.8 (Fedora 20.1.8-3.fc42)
> 
> $ make format
> 
> $ git status
> On branch wip/layout-desktop
> Changes not staged for commit:
> (use "git add \<file\>..." to update what will be committed)
> (use "git restore \<file\>..." to discard changes in working directory)
> modified: config.def.h
> modified: drw.c
> modified: drw.h
> modified: keyboard.c
> modified: keyboard.h
> typechange: keymap.deskintl.h
> modified: keymap.mobintl.h
> modified: layout.deskintl.h
> modified: layout.mobintl.h
> modified: main.c
> modified: os-compatibility.h
> \`\`\`
> 
> So, what do you think?

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 10, 2025, 11:02am UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/5 "2025-08-10T11:02:50Z")

</div>

The above pull request was merged. Now Wvkbd (`wvkbd-deskintl` program) has a US International English-based full keyboard layout. I also added 3 buttons to toggle the virtual keyboard (`wvkbd-deskintl`), to launch apps, and to close the focused window on the Waybar at the top left. The screenshots are below.

Landscape

 ![screenshot_laptop_12_wvkbd_landscape](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/c/2/c2400e4b8f38d13b3a5771e62d1f96b3d93e7652.jpeg)

Portrait

 ![screenshot_laptop_12_wvkbd_portrait](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/f/6/f6083b70970067bc0abaf509c59de4e323f75d6a.jpeg)

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 18, 2025, 5:32pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/6 "2025-08-18T17:32:51Z")

</div>

I created my customized layout sets of the [wvkbd](https://github.com/jjsullivan5196/wvkbd). One of the layout sets is [a 44-key ortholiner split keyboard layout](https://github.com/junaruga/wvkbd-contrib/tree/main/layout/split). The photo is below.

 ![framework_laptop_12_wvkbd_contrib_split](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/4/1/41e75fd3d8323d1c9e743346a213306d178b7d8f.jpeg)

My repository with the layout sets is below.

> **[GitHub - junaruga/wvkbd-contrib: My contributed layout sets for wvkbd](https://github.com/junaruga/wvkbd-contrib)**
>
> My contributed layout sets for wvkbd

You can customize the layout by the following steps:

1. Fork my repository `junaruga/wvkbd-contrib`.
2. Create the `layout/your_layout_name` directory, and create some header files. The `https://github.com/jjsullivan5196/wvkbd`’s `*.deskintl.h`, and `https://github.com/junaruga/wvkbd-contrib/`'s `layout/split/*.h` may be useful to check to create your layout.
3. Run the `make LAYOUT=your_layout_name`.
4. Run the `./wvkbd-your_layout_name`.

---

<div class="post-metadata">

**Author:** ![Theraa](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@Theraa](https://community.frame.work/u/Theraa)\
**Post date:** [September 1, 2025, 11:28pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/7 "2025-09-01T23:28:12Z")

</div>

This is great, thanks for all the work! I was already worrying about the usefullness of tablet mode because switching away from sway wasn’t an option for me

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [September 2, 2025, 6:55pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/8 "2025-09-02T18:55:51Z")

</div>

I am glad you like my contributions. I am motivated to contribute something to make a compact device use case with a touchscreen mature in Linux. This was one of the things that I wanted to do with the Framework Laptop 12.

There are the following 2 fun challenges in the Framework Laptop 12’s tablet mode with Sway, as far as I know.

## Screen lock with virtual keyboard

This topic is discussed at the [What Desktop Environment are you using with your FW12? - #14 by junaruga](https://community.frame.work/t/what-desktop-environment-are-you-using-with-your-fw12/74517/14). Maybe it is possible by using the `gtklock`, `gtklock-virtkb-module`, or `sway-lock-mobile` mentioned on the linked thread. However, we may need some contributions to the `swaylock` or `gtklock` project to make the use case of the virtual keyboard for screen lock more useful and consumable.

## Gestures on touchscreen

Sway has the `bindgesture` syntax. However, it only supports a touchpad, and it doesn’t support a touchscreen for now. There are the following issue tickets for that.

- [Touch screen gestures · Issue #7847 · swaywm/sway · GitHub](https://github.com/swaywm/sway/issues/7847)
- [Touch bindings · Issue #1904 · swaywm/sway · GitHub](https://github.com/swaywm/sway/issues/1904)

For example, the following sway config to enable 3-finger swipe up/down to show/hide the virtual keyboard wvkbd only works for touchpad gestures. For the `~/script/control_wvkbd.sh`, you can check [my framework-laptop-config repository](https://github.com/junaruga/framework-laptop-config).

```auto
# Gesture to show/hide the virtual keyboard wvkvd.
# This setting is only for touchpad. The touchscreen is not supported.
# https://github.com/swaywm/sway/issues/1904
bindgesture swipe:3:up exec ~/script/control_wvkbd.sh SIGUSR2
bindgesture swipe:3:down exec ~/script/control_wvkbd.sh SIGUSR1

```

Someone reported the gesture app [lisgd](https://git.sr.ht/~mil/lisgd) worked for the touchscreen. So, I plan to try the app.

I updated the following wiki page, adding the above topics.

> **[Framework Laptop 12 tablet mode on Sway](https://github.com/junaruga/framework-laptop-config/wiki/Framework-Laptop-12-tablet-mode-on-Sway)**
>
> Contribute to junaruga/framework-laptop-config development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [September 10, 2025, 12:40am UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/9 "2025-09-10T00:40:50Z")

</div>

> [@junaruga](#):
>
> Someone reported the gesture app [lisgd](https://git.sr.ht/~mil/lisgd) worked for the touchscreen. So, I plan to try the app.

I tried the lisgd on my Framework Laptop 12. It works for the touchscreen! I wrote the instructions below. The lisqd supports gestures in specific areas of the edges and corners.

> **[Framework Laptop 12 tablet mode on Sway](https://github.com/junaruga/framework-laptop-config/wiki/Framework-Laptop-12-tablet-mode-on-Sway#gestures-on-touchscreen)**
>
> Contribute to junaruga/framework-laptop-config development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![2disbetter](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/2disbetter/32/1176_2.png) [@2disbetter](https://community.frame.work/u/2disbetter)\
**Post date:** [September 13, 2025, 5:21am UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/10 "2025-09-13T05:21:10Z")

</div>

If you have the time, I wrote an application to handle rotation on Hyprland that should work for Sway as well. (rotates the monitor, touch, and pen support)

> **[GitHub - 2disbetter/FW12Rotate: Framework 12 rotation application specifically for...](https://github.com/2disbetter/FW12Rotate)**
>
> Framework 12 rotation application specifically for Omarchy Linux .

Maybe give it a whirl and see if it does work on Sway? I have only guessed that it would.

---

<div class="post-metadata">

**Author:** ![Berend](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@Berend](https://community.frame.work/u/Berend)\
**Post date:** [September 17, 2025, 5:51pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/11 "2025-09-17T17:51:37Z")

</div>

@junaruga thanks for your work on [wvkbd](https://github.com/jjsullivan5196/wvkbd)! I was wondering if there are some events you can hook into that would listen to the hinge turning? Maybe you know

I would really like to enable `iio-hyperland` only when I have the device flipped around.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [September 17, 2025, 6:55pm UTC](https://community.frame.work/t/sway-on-the-framework-laptop-12/73173/12 "2025-09-17T18:55:15Z")

</div>

> [@Berend](#):
>
> I was wondering if there are some events you can hook into that would listen to the hinge turning? Maybe you know

Are you talking about the display-rotating events, right? The `monitor-sensor` command can listen to the events. The command is in the `iio-sensor-proxy` RPM package on Fedora Linux.

```auto
$ sudo dnf install iio-sensor-proxy

```

Then I am using the following script to auto-rotate the display, hooking the events on Sway. Note that `swaymsg output` is Sway’s command.

You need to install the `mawk` command to run the script.

```auto
$ sudo dnf install mawk

```

> <https://github.com/junaruga/framework-laptop-config/blob/7bf2b801612654aa0d331929fc362be4389ab7d7/home/.config/sway/config.d/00-framework-laptop-12#L7>

> <https://github.com/junaruga/framework-laptop-config/blob/main/home/.config/sway/script/auto_rotate_display.sh>

> **[Framework Laptop 12 tablet mode on Sway](https://github.com/junaruga/framework-laptop-config/wiki/Framework-Laptop-12-tablet-mode-on-Sway#auto-rotating-display)**
>
> Contribute to junaruga/framework-laptop-config development by creating an account on GitHub.

If you are using Hyprland, you can check the following thread to find the equivalent script or program on Hyprland.

> [@Omarchy + Rotation (Framework 12)](https://community.frame.work/t/omarchy-rotation-framework-12/74002):
>
> Omarchy runs perfectly on a Framework 13 out of the box. However, it gets ALMOST there on a Framework 12. If you follow the Framework Arch install guide (essentially installing the Framework specific stuff for the rotation functionality, etc.) then the driver needed for rotation will be installed and will be functional. Hyprland, however, does not have any automatic mechanisms in place to do anything with the info the sensor is outputting. You can write a sh script that you can have hyprland …
