Configuring sway

So that’s how you do it!

Oh yeah mate, I think i did it the hard way when i used i3, but by the time Wayland was a thing and Sway advertised that it’s config was i3 compatible i was halfway there. I grudgingly jumped on board with the whole AI thing too, so i was cutting all sorts of corners with ChatGPT’s help.

I have a bit of an advantage with styling because sway, waybar and rofi all use css for their styling. Is that something i should give a brief crash course on one night?

1 Like

Yes please. New to sway as of this morning, so I’m crawling uphill a little. Getting there, but any help to get things configured sensibly would be greatly appreciated.

(Edit: I managed to get waybar working with all the relevant goodies listed, alacritty going, and figured out how to open and close new windows. Everything else is optional, right? :rofl:. Would definitely appreciate a training session.)

Yes to a crash course on WM styling with CSS!

1 Like

I expect most of us have been using AI for over a year if not for vibe coding at least for vibe searching, vibe administration or vibe configuration. An AI search and its subsequent AI analysis greatly speeds up getting the information you want. A detailed search request within a specified context and then a few follow up questions reduces the time spent solving a problem by over an order of magnitude.

As a result you don’t spend much time on a problem which is great, but you also don’t learn much about the intricacies of the solution; the dozens of other ways to get and not to get to the solution.

The thing that impressed me about Laporte’s demonstration of verbally asking < bad French accent> Claude </bad French accent> to configure his sway desktop is that it altered the config files without his intervention. He spent essentially no time on the problem and had no idea of the solution unless he then went on and looked at what sway had done.

Is this the way of the future? We tell the AI what we want the end result to be and it just does it. I suspect it is and I for one welcome our new AI overlords.

Despite the “help” from an LLM, I’m ultimately no better off on my first foray into sway+waybar than I was when I started by copying and tweaking the default config files. Lots of “Oh, I see the problem, let me rewrite the config file and then it’ll work!” followed by “Oh, I see the problem, let me rewrite the config file and then it’ll work this time!” and so on, with very little success.

I’ve gone back to configuring sway and waybar by hand and will probably get more learning out of that approach anyway. However, one of the challenges I’ve run into is a ton of content along the lines of “wofi/rofi/rofi-wayland/dmenu/mako/grim/swayshot/light/brightnessctl/etc.” is absolutely the best way to do X task, and is a clone of/fork of/similar to [tool I’m unfamiliar with]. I feel like there’s so much information out there, but I don’t have a good “entry point” to start working through it all.

For the sway users out there, what are the useful add-ons that you’re currently using, or have had experience with in the past? Why do you use that particular tool over another one that does something similar?

1 Like

I’ve also had that experience on multiple occasions. Sometimes Perplexity and I get there in the end but on occasions I have abandoned the thread and asked my question on Gemini and got a solution within two or three loops. Yet again, at other times all attempts have failed.

As mentioned above Laporte used Claude code but did not repeatedly prompt for a refinement of the answer to his problem. He just let it do it without review. This is either very brave or foolhardy but Claude has gained a reputation for providing good code. In any event the undo / revert command apparently works flawlessly.

Perplexity is a middleman between user and LLM and offers various options from Sonar, Gemini, GPT, Claude, Grok and Kimi K2. Claude Opus 4.5 is the top tier for coding tasks but getting the Perplexity max subscription to use it bumps the monthly payments from $US17 to $US167 per month.

So … no.

1 Like

Yikes!

Have you (or anyone else) tried any of the locally hosted models? @techman, I think I recall you were using qwen at one stage. Are the “coding specific” models really that much more refined for things like a configuration file?

Yes, I have become fond of “michaelneale/deepseek-r1-goose:70b which is actually 42GB in size. I last used it just to bounce ideas off.

It has a mellow flavor, not pushy, more thoughtful, easy to get along with. I asked it “can you help me with a Sway config” and it just pretty much read the Sway manpage to me.

I found qwen* too pushy and not that helpful, but your mileage may vary.

I haven’t used a local AI for ages now, frankly I find kimi-K2 online with openrouter the best coder I’ve seen yet, and the cheapest online AI. This is a serious tool and fast. The response below was instant.

Note I use Kimi-k2 via ‘Aider’ which controls the AI and doesn’t let it get out of control. I’m 100% happy and confident with Aider.

Aider v0.83.1
Model: openrouter/moonshotai/kimi-k2 with whole edit format
Git repo: none

can you assist with a Sway config ?

I can help with a Sway (i3-compatible Wayland compositor) configuration. However, I don’t have any files from you yet. Please share the config you want to modify
(usually ~/.config/sway/config) or describe what you’d like to achieve, and I’ll provide the updated full file.

Tokens: 607 sent, 65 received. Cost: $0.00046 message, $0.00046 session.

edit: see my post re ‘Fabric’ elsewhere, I think it’s a simpler way to access Kimi-k2 from Unix than Aider.

Cheers

Terry

1 Like

I should add that today I asked perplexity a question about vlans in proxmox for my network. It thought my question was complicated and it offered to run it through Claude Opus 4.5, which I agreed to. The response was a clearer explanation of the problem and a good guide to a solution.

This was done for no extra payment and I interpret it as a way to highlight the value that Opus 4.5 offers and tempt many to upgrade.

I don’t expect this option to last indefinitely since we are in the in pre-enshittification stage of LLMs but I’ll enjoy it while I can.

@jdownie Unfortunately I can’t make it to tonight’s meeting as it clashes with an AI paper reading group. Will have to pick your brain on Sway configuration at the next meeting.

Well actually, i held off on talking about that this month because i figured that a) you’d be particularly interested in that topic, and b) you wouldn’t make it to Carindale anyway :slight_smile:

So, I hope to see you at Chermside in Feb?

Yes, will see you there!

I apologise for how long it has taken me to put this together. I went away for the weekend doing family stuff.

I’ve published the slides from that presentation here, and the HLB home page also offers a link in the minutes for Feb 19th’s meeting.

The .zip that you’ll get will contain a .pdf of the presentation and a .tar.gz of my files. I hope i’ve included everything that people were hoping to get a closer look at, but i can update it if i missed something. Oh, that .tar.gz is unnecessarily large too. I told tar to --deference so you’ll get multiples of my wallpapers (which are symlinked to my Syncthing folder in my environment).

When you un-compress that with a tar xzvf files.tar.gz, it’ll produce a .config and .local folder, so take care not to do that in your home folder. Actually, i should say that you definitely don’t want to do that because my scripts are lousy with /home/jdownie references hard coded throughout :face_with_peeking_eye:. I’ll understand if anybody wants to start whole parallel thread judging me :smile:

I read through my scripts and realised how much my setup is “only as good as i last left it”. The multi monitor stuff is especially rubbish. Please speak up if you’d like more information of guidance.

Probably the only thing in there that i’m passably proud of is the screenshot (Meta + Shift + s - to match Windows). I didn’t even do that myself, i hammered ChatGPT until i got the one-liner that i needed.

1 Like

Thanks, looking forward to playing with this! Anyway, I’ll have to adapt this for NixOS, because it doesn’t allow me to edit the Sway config directly—instead, I’m supposed to specify the Sway options in my Nix (or Home Manager) config file, and these options will be compiled into a Sway config file once I rebuild.

Also, I need to figure out how to stop the cursor from being so tiny (on a HiDPI screen)….

:thinking: This might help…

It should also demonstrate how little claim i have to my current setup. :slight_smile:

I forget how it works in NixOS. I thought NixOS it took care of broad system stuff (like /etc for example). All of my Sway stuff is in my cfg repo, and my ~/.bashrc script (which is symlinked to ~/bin/bashrc) runs the stow command to establish a bunch of symlinks throughout my home folder. My .config/sway folder (for example) really lives in ~/cfg/config/sway.

All of that sounds overly complicated, but what it means is that i can have a fiddle with the config on one machine, commit and push, and on another machine pull and reload and my config has followed me. This goes for config stuff (~/cfg) and scripts (~/bin). Could you say it’s a poor (or rich) man’s “roaming profile”?

I’d be optimistic that some kind of clever solution to managing your $HOME would work well with NixOS.

Surely there’s a t-shirt in that @zeeclor ? Something like “Keep your ~ in order!” ?

I’ve got it: “~ is where the :heart: is!

HLB needs a merch store!

1 Like

Actually, you can use normal config files and just have your Nix config point to them, but it can be a bit complicated to set up, and I’m trying to do things “the Nix way” as far as possible.

I like your idea of a “roaming profile”, and will probably implement it if I ever end up managing multiple Linux desktops :sweat_smile:. Actually, what I could use at the moment is some way of synchronising my Doom Emacs config files across my macOS laptop and my NixOS laptop, but keeping the OS-specific code on each. I’m sure there’s a simple solution involving conditional statements in Elisp (plus Syncthing, Dropbox or Git)….

I asked at the last meeting for a few preferred tools used in conjunction with sway.

One tool which I didn’t hear come up yet in discussions or @jdownie’s presentation is dnkl/fuzzel: App launcher and fuzzy finder for Wayland, inspired by rofi(1) and dmenu(1). - Codeberg.org.

I’ve got it set up on my sway machine and it’s working great, but I’ve admittedly got nothing to compare it with as this is my first go around setting everything up.

1 Like

I’d love to see it in action when i see you next. It wouldn’t take much for me to dump rofi for some new hotness. rofi is pretty basic.

Back when i was a Mac guy i used to love Quicksilver. I think there was Gnome-do or something like that, but you’ve got me wondering now if there’s something lighter again that would fit nicely into Sway.

1 Like

I’ll bring the sway machine with me tomorrow. I’ve not got much further than an install and some very basic theming, so I can’t say whether or not it’ll be better suited to you than rofi.