swaywm

352 readers
5 users here now

dedicated to the Sway window manager, a drop-in replacement for the i3 window manager, but for Wayland instead of X11.

founded 4 years ago
MODERATORS
1
 
 

I love i3wm and would like to switch to sway for the advantages of not using xorg. But is it worth it with a laptop that has an old nividia/intel hybrid video card? I had read that it was complicated to use nvidia cards with wayland

2
3
 
 

I miss the keyboard friendliness of HUDs and how you could search the menu quickly.

I was wondering if anyone had a wofi/rofi or equivalent HUD for sway.

Back in the day there was plotinus. So far I can't get plasmahud, gnomehud, rofihud or others to work.

4
5
 
 

I noticed this immediately because I use kanshi (highly recommended for laptops running sway!). I don't know the how or why (maybe it's the wlroots bump), but when I upgraded Sway to 1.9 today, the Hex ID form one of my external monitors changed. So I had to update it in the config for kanshi to work again.

Just a heads up for other kanshi users, and people whose scripts may be influenced by this.

6
 
 

So I migrated from i3 to sway. Had a python script that I found on the internets that did this, and really like the functionality. Figured I'd give an attempt at making my own script in bash. My programming skills and bash scripting aren't great, so I had chatGPT help me with some syntax. Thought others might be interested so am sharing here.

#!/bin/bash

# this script moves a container to an empty workspace
#  and switches to that workspace

# Define list of available workspaces
all_workspaces_list=(1 2 3 4 5 6 7 8 9 10)

# get workspaces currently being used
used_workspaces=$(swaymsg -t get_workspaces | grep -oP '"name": "\K\d+')
# create a list from used workspaces
used_workspaces_list=($used_workspaces)

# Check for first of all_workspaces_list not in used_workspaces_list
for workspace in "${all_workspaces_list[@]}"; do
    if [[ ! "${used_workspaces_list[*]}" =~ "$workspace" ]]; then
        free_workspace=$workspace
        break # stop loop after finding first available workspace
    fi
done

swaymsg move container to workspace number $free_workspace
swaymsg workspace number $free_workspace
7
 
 

Okay, I am super new to tiling windows managers, and let me just say - Sway made me an instant convert. I'm obsessed. But I still have no clue what I'm doing.

So I have been trying out every status bar I can to see what looks good, what feels good, and what has the best efficiency for some of my SUPER low-grade hardware.

This brings me to yambar. It is touted as the most resource efficient status bars, and because I only want to see a few things (battery, ram, cpu, volume, time/date), I figured it was a good fit. I downloaded and installed it (used AUR) and I had a few issues getting it installed, but eventually go there. (I should probably say right now that I'm also new to Arch. All my previous Linux experience has been Debian based.)

So now that yambar is installed, I snagged the example config.yaml and moved/renamed it to ~/.config/yambar/config.yaml. Now most of the previous status bars I've been trying required you to add/change something in the ~/.config/sway/config to make them go. usually in between some bar:{status_command }. So I went ahead and tried to add status_command /usr/bin/yambar in there, and I just got errors.

I've read the documentation on yambar's codeberg like 100 times, and there isn't anything in there about how to actually activate this darn bar. I'm guessing I'm missing something totally noob.

Help?

(ps- love the community. Subscribed immediately.)

8
 
 

Hi !

I'm using Firefox Developer edition on sway, and since version 121 it shows a small border on top. I have the option hide_edge_borders both enabled, so this border is displayed by Firefox, not Sway (cf. the terminal on the right end of the screenshot).

Does someone else have this issue? Do you have an idea for a workaround? Is this a bug I should report to Firefox?

PS: I've seen this issue on Arch, NixOS and Firefox 122

9
 
 

Satty has seen a new release v0.2.0. We fixed some bugs, got brand new marker tool and got tooltips (contributed by @noornee).

Check it out:

Let us know what you think and how we can improve :)

10
 
 

I wrote a script and bound it to a key combo so I can draw a rectangle on the screen and map my drawing tablet to that area.

Future improvement: force the mapped area to the same aspect ratio as the tablet. I hope I can find a better way to programmatically get the ratio than running xinput list-devices and parsing out "Size: 160x100mm".

Bound via bindsym $mod+Shift+t exec ~/.config/sway/tablet-map. Is there a better way to reference the way config directory?

11
 
 

As a geriatric user of sway, I don't always remember the keystrokes in the more esoteric corners of my configuration. I find that my script sway-menu helps with the bulk of the uncommon key bindings. But when I drop into a 'mode' (eg "move" mode) I don't always remember all the clever things I programed into it. nwg-wrapper to the rescue - it can display a HUD (Heads-Up-Display) of the keybindings of the mode until I exit it.

Obviously, nwg-wrapper must be installed. Your config file also needs to be changed as described in the help file.

Here's the help:

Usage: sway-mode [-c,--config config-file] [-C,--css css-file] mode
Puts sway into mode 'mode' and displays some help by extracting a
section from the config file.

Options:

-c,--config config_file    location of your config file (/home/bhepple/.config/sway/config)
-C,--css css_file          location of your css file (/home/bhepple/.config/nwg-wrapper/mode-help.css)

Requires nwg-wrapper https://github.com/nwg-piotr/nwg-wrapper

Assumes modes are defined in the config file like this:

mode "foobar" {
...
}

To use this, reassign the bindkey command for the mode like this:

    bindsym  $mod+s  exec sway-mode "swap"

and in the mode definition, change the mode ending keys to

    # back to default mode
    bindsym q      exec pkill nwg-wrapper; mode "default"
    bindsym Return exec pkill nwg-wrapper; mode "default"
    bindsym Escape exec pkill nwg-wrapper; mode "default"

Here's a sample CSS file:

    window {
        font-family: "Monospace";
        color: rgba (255, 255, 255, 1.0);
        background-color: rgba (255, 255, 255, 0.1);
    }

    #box-inner {
        background-color: rgba (23, 53, 63, 0.7);
        border-radius: 5px;
        border-style: dotted;
        border-width: 1px;
        border-color: rgba (156, 142, 122, 0.7);
        padding: 10px;
    }
12
 
 

I'm new to Sway. I don't know how to describe this clearly, but I'd like to get a messaging app to autostart in workspace 3 on every boot. That app runs inside a foot terminal.

If there's a doc available, please give the url. I couldn't find.

13
 
 

Hi, I have 2 monitors with freesync. When I try to enable adative sync on sway, it makes most windows flickers. If I disable it on sway but keep it on in monitor settings, It gets a little bit darker and during game play it won't work because I can see tearings even though FPS is in the range of free sync.

14
 
 

Hello all, I love finding applications that feel minimal and do their job well, i.e. zathura, qview, etc.

Do any of you have applications you feel fit with your swaywm experience well?

15
2
submitted 3 years ago* (last edited 3 years ago) by rek2@lemmy.ml to c/swaywm@lemmy.ml
16
 
 

This article is a guide for achieving a full-as-possible Wayland setup on Arch Linux.

17
1
swaywm Wiki (github.com)
submitted 3 years ago by xe8@lemmy.ml to c/swaywm@lemmy.ml
 
 

Wiki for swaywm, which contains a lot of useful information for setup.

18
19
 
 

Also posted this on Reddit, but doing so as well here for visibility, and also because I like Lemmy and want to see more activity here! :D

Hey there. I'm new to sway, and so far things have been working very well for me. But I can't seem to find exactly how to set a keyboard binding that modifies an input. I know how to set up my inputs and custom bindings. But can't figure out how to put the two together.

Anyone have some advice on how to remap my Fn+F1 binding to toggle the touchpad?

20
21
22
23
 
 

hi!

24
 
 

I've had mixed results trying to use Sway on my pinebook pro. Before I reflashed manjaro recently, Sway seemed to run alright, but now I get a perpetual black screen when trying to log into Sway. If I launch it from within my MATE environment it works fine.