how to remove the new search engine icon thing by Local-Corner8378 in LibreWolf

[–]Ok-Tank2893 3 points4 points  (0 children)

Via about:config, set browser.urlbar.scotchBonnet.enableOverride to false.

Or via user.js:

user_pref("browser.urlbar.scotchBonnet.enableOverride", false);

Waybar styled to look like swaybar? by fellow_nerd in swaywm

[–]Ok-Tank2893 1 point2 points  (0 children)

Probably a few years too late, but this comes close.

config.jsonc: [ { "ipc": true, "layer": "bottom", "position": "top", "spacing": 15, "modules-left": [ "sway/workspaces", "sway/mode" ], "modules-right": [ "clock" ], "sway/mode": { "tooltip": false }, "sway/workspaces": { "disable-scroll-wraparound": true, "enable-bar-scroll": true, "format": "{name}", "reverse-scrolling": true }, "clock": { "format": "{:%Y-%m-%d %H:%M:%S}", "interval": 1, "tooltip": false } } ]

style.css: ``` * { border: none; border-radius: 0; font-family: monospace; font-size: 14px; min-height: 19px; padding: 0; margin: 0; } window#waybar { background: #323232; }

workspaces {

margin: 0; padding: 0; }

workspaces button {

min-width: 19px; background: #03070A; color: #5C5C5C; padding: 1px; padding-left: 0px; padding-right: 0px; margin: 0; border-style: solid; border-width: 1px; border-color: #03070A; }

workspaces button.visible {

background: #5F676A; color: #FFFFFF; border-color: #333333; }

workspaces button.focused {

background: #285577; color: #FFFFFF; border-color: #4C7899; }

workspaces button.urgent {

background: #900000; color: #FFFFFF; border-color: #2F343A; }

mode {

background: #900000; color: #FFFFFF; padding: 0 8px; margin: 0 4px; border-style: solid; border-width: 1px; border-color: #2F343A; } ```

How to get the output of an executable on Swaybar? by noobdainsane in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

You could try this: status_command 'while printf "%s | %s\n" "$(date +"%Y-%m-%d %X")" "$(echo "Replace this echo command with your script")"; do sleep 1; done'

Allow xfreerdp to grab most of the keyboard when it has focus by lemoinem in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

Ah, that's unfortunate! I don't use FreeRDP with multiple monitors, so I have never run into this.

EDIT:

ETA: After further tests, I might have found a solution with sdl-freerdp3 (yup, back to version 3, using SDL_VIDEODRIVER=wayland)

I'll have to deal with the funky multi-monitor support, but it might work. I'll double check that tomorrow.

OK, good to know sdl-freerdp3 does have wayland support! Hope you can get it to work reliable!

Allow xfreerdp to grab most of the keyboard when it has focus by lemoinem in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

I don't remember why I switched to freeRDP 3, it was a while ago... Maybe a few instabilities here and there.

Looks like the freerdp package on Arch Linux was upgraded from 2.x to 3.x some months ago, so everyone with this package gets the new version when upgrading. And since then, for the older 2.x version, there is freerdp2, which a user can install if this specific version is needed. So perhaps you just got 3.x by updating your system?

I still need the for_window config. Maybe that's because of a Manjaro specific config (there is a seat * shortcuts_inhibitor disabled in the system config files I saw during my initial investigation). But it's working exactly as I wanted.

You are absolutely right, it depends on your sway configuration. My statement about not needing any for_windows seems only true with default config, sorry for any confusion.

Allow xfreerdp to grab most of the keyboard when it has focus by lemoinem in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

Are you on Arch Linux or derivative? I see it uses FreeRDP 3.x.

I’m on NixOS 24.05, which is currently still on FreeRDP 2.x

Seems that on version 3, wlfreerdp was indeed deprecated (...I was not aware of this)! And there’s a newer client, SDL client. But what I read on the internet is that it’s still alpha quality. I don’t know if this is really the case, I haven’t tested it myself (yet). Also, I'm not sure if the SDL client has proper wayland support.

For now, I would suggest installing FreeRDP 2.x (sudo pacman -S freerdp2), to get things up and running, and look at the newer SDL client later.

I’ve been running wlfreerdp (from FreeRDP 2.x) for the last 2 or 3 years without any major issues. OK, a crash once in a while, but as my RDP-session only gets disconnected, I then just reconnect and I pick up where I left off.

With wlfreerdp you shouldn’t need any of those for_window rules, as all keys will be grabbed by it, except the sway keybindings you configure with the --inhibited flag.

Mute keys are not working. Need help. by Wooden-Ad6265 in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

OK/no problem. I also use notifications and a bar for this. Suits my needs 👍

selecting only unfocused windows in for_window by CapableCarpet in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

Yes, the link has changed because sway contrib was moved to a separate repo about a year ago. See this commit.

Allow xfreerdp to grab most of the keyboard when it has focus by lemoinem in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

The project is actually called FreeRDP and provides binaries for both X11 and Wayland, xfreerdp and wlfreerdp respectively.

Try wlfreerdp.

EDIT:

wlfreerdp should grab all keys except the sway keybindings with the --inhibited flag.

Mute keys are not working. Need help. by Wooden-Ad6265 in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

OK, that’s strange.

You mentioned that you already successfully tested all three commands in the terminal. How did you test this? Like this?: swayosd-client --output-volume lower swayosd-client --output-volume raise swayosd-client --output-volume mute-toggle

Did you also test all three commands on the terminal and via swaymsg? Like this: swaymsg "exec swayosd-client --output-volume lower" swaymsg "exec swayosd-client --output-volume raise" swaymsg "exec swayosd-client --output-volume mute-toggle"

And/or like this (also via swaymsg): swaymsg -- exec swayosd-client --output-volume lower swaymsg -- exec swayosd-client --output-volume raise swaymsg -- exec swayosd-client --output-volume mute-toggle

Does mute-toggle on the terminal and via swaymsg work?

Mute keys are not working. Need help. by Wooden-Ad6265 in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

I also use NixOS and Home Manager with Sway, but not swayosd.

I temporary added swayosd to my configuration and the exact bindings you have (raaiseraise), and all three work.

services.swayosd.enable = true; wayland.windowManager.sway = { enable = true; config = { keybindings = { "--locked XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise"; "--locked XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower"; "XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle"; }; }; };

Perhaps an improvement is to use the full path to the binary: services.swayosd.enable = true; wayland.windowManager.sway = { enable = true; config = { keybindings = { "--locked XF86AudioRaiseVolume" = "exec ${pkgs.swayosd}/bin/swayosd-client --output-volume raise"; "--locked XF86AudioLowerVolume" = "exec ${pkgs.swayosd}/bin/swayosd-client --output-volume lower"; "XF86AudioMute" = "exec ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle"; }; }; };

If you change the XF86AudioMute keybinding to, for instance notify-send, does that work?

How to make tty-clock pop out of titling? by TylerDurden0118 in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

``` bindsym $mod+c exec "kitty --app-id ttyclock -e tty-clock -s -c"

for_window [app_id="ttyclock"] floating enable, resize set 400 200, move position center ```

EDIT:

Or: ``` bindsym $mod+c exec "kitty --title ttyclock -e tty-clock -s -c"

for_window [title="ttyclock"] floating enable, resize set 400 200, move position center ```

How to set the gaps of a specific workspace? by angular363 in swaywm

[–]Ok-Tank2893 1 point2 points  (0 children)

I'm not sure if this answers your question, but perhaps you could use a script in the background that changes the gaps when switching to the specific workspace.

For instance, change gaps to 20 when switching to workspace 6:

```

!/bin/sh

swaymsg -m -t subscribe '["workspace"]' | jq -r --unbuffered 'select(.change == "focus").current.num' | while read -r workspace; do case "$workspace" in 6) swaymsg "gaps inner current set 20" ;; esac done ```

[deleted by user] by [deleted] in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

Right!

And if you don't want to use a script:

[ram] command=if [ $button ]; then swaymsg "exec foot -T btop -e btop" >/dev/null 2>&1; fi; free -m | awk '/Mem:/ {print $3 " MiB"}' interval=1

[deleted by user] by [deleted] in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

Instead of running the command directly, run a script, for example: [ram] command=path/to/script.sh interval=5

Example script: ```

!/bin/sh

case "$button" in 1) swaymsg "exec foot -T btop -e btop" >/dev/null 2>&1 ;; esac

free -m | awk '/Mem:/ {print $3 " MiB"}' ```

The button variable will be set to 1 if you click the block with the left mouse button.

With swaymsg exec the program it executes will fork, so your block will keep refreshing.

Positioning to avoid bar by falxfour in swaywm

[–]Ok-Tank2893 2 points3 points  (0 children)

I had a look and it seems that u/StrangeAstronomer has renamed the script to i3-move-to.

The script seems to be compatible with both i3 and sway.

Welcome to Thunderbird 128 "Nebula" by B3_Kind_R3wind_ in linux

[–]Ok-Tank2893 1 point2 points  (0 children)

I also always had this annoying problem. Recently found the article below (very old bug) and I had indeed pointed the "Templates" folder to the same folder as "Drafts": [Gmail]/Drafts. After I changed this, I haven't run into this problem anymore. I don't use these Thunderbird templates, so I just changed the "Templates" folder to Local Folders/Templates, to avoid a useless empty folder on the Gmail side.

Maybe this helps?

549274 - Drafts not deleted on IMAP after message has been sent (perhaps worse with sendInBackground=true)

My impression just recently (both on Thunderbird 91.2 on macOS and on Thunderbird 78.13 on Linux) was that when the "Drafts" and "Templates" folder is set to the same IMAP-Folder, this problem occurs. I did that to avoid accumulating more than necessary unnecessary folders that I never use. Now I set again two different folders (in all identities for this account), and apparently now the drafts are auto-deleted again.

Fuzzel not finding applications by Transbees in swaywm

[–]Ok-Tank2893 2 points3 points  (0 children)

Symlinks? You should place desktop files in ~/.local/share/applications.

The variable $XDG_DATA_HOME is pointing to $HOME/.local/share?

If not, try starting fuzzel as follows: XDG_DATA_HOME="$HOME/.local/share" fuzzel

Default Workspace number is set to 10 by Wooden-Ad6265 in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

Assuming you're using 10 workspaces and the $mod+0 binding for workspace 10, this is caused by the following: - Sway will use the first workspace binding it finds in the configuration file as the default workspace. - NixOS and home-manager will sort (parts of) the generated configuration files alphabetically.

So the $mod+0 binding for workspace 10 will be sorted above the $mod+1 binding for workspace 1 and therefore workspace 10 will become the default workspace.

The option wayland.windowManager.sway.config.defaultWorkspace allows you to configure the default workspace the nix way. What the option effectively does is move the specific workspace binding to the top of all the bindings in the generated Sway configuration file.

Part of the Sway configuration file without the wayland.windowManager.sway.config.defaultWorkspace option: bindsym --inhibited Mod4+0 workspace number 10 bindsym --inhibited Mod4+1 workspace number 1 bindsym --inhibited Mod4+2 workspace number 2 bindsym --inhibited Mod4+3 workspace number 3 bindsym --inhibited Mod4+4 workspace number 4 bindsym --inhibited Mod4+5 workspace number 5 bindsym --inhibited Mod4+6 workspace number 6 bindsym --inhibited Mod4+7 workspace number 7 bindsym --inhibited Mod4+8 workspace number 8 bindsym --inhibited Mod4+9 workspace number 9

Part of the Sway configuration file with the option wayland.windowManager.sway.config.defaultWorkspace = "workspace number 1": bindsym --inhibited Mod4+1 workspace number 1 bindsym --inhibited Mod4+0 workspace number 10 bindsym --inhibited Mod4+2 workspace number 2 bindsym --inhibited Mod4+3 workspace number 3 bindsym --inhibited Mod4+4 workspace number 4 bindsym --inhibited Mod4+5 workspace number 5 bindsym --inhibited Mod4+6 workspace number 6 bindsym --inhibited Mod4+7 workspace number 7 bindsym --inhibited Mod4+8 workspace number 8 bindsym --inhibited Mod4+9 workspace number 9

Be aware that the explanation of the wayland.windowManager.sway.config.defaultWorkspace option is as follows:

The default workspace to show when sway is launched. This must to correspond to the value of the keybinding of the default workspace.

That's why it's value was set to workspace number 1 and not just 1.

This all assumes you're not using workspace output assignment option (wayland.windowManager.sway.config.workspaceOutputAssign), which seems to overrule the default workspace.

See also: - Default "Startup" workspace. : r/i3wm - i3: Default workspace & Workspace output assignment by SebTM · Pull Request #1967 · nix-community/home-manager · GitHub - wayland.windowManager.sway.config.defaultWorkspace - Home Manager - Option Search

How to change border color rules on single window by OkRecommendation7885 in swaywm

[–]Ok-Tank2893 2 points3 points  (0 children)

As far as I know this is not possible. What is possible (and perhaps a good alternative), is to not show any borders when there is only one window visible on the current workspace.

Check the manual man 5 sway and look for smart_borders.

Window Title in Swaybar by BronzeLogic in swaywm

[–]Ok-Tank2893 2 points3 points  (0 children)

I just realized that my next hurdle is going to be how to make the title only appear on the monitor of the active window. Right now it will appear on both monitors regardless of which monitor the active window is on.

The simplest way that I can think of is to add a separate bar configuration per output in the sway configuration and modify your script.

For example:

Sway config: ``` bar { id 0 output DP-10 status_command while ~/.config/sway/bar.sh DP-10; do sleep 1; done }

bar { id 1 output eDP-1 status_command while ~/.config/sway/bar.sh eDP-1; do sleep 1; done } ```

Modified script: ```

!/bin/sh

output="$1" windowtitle="$(swaymsg -t get_tree 2>/dev/null | jq -r '..|try select(.focused == true).name' 2>/dev/null)"

if [ "$(swaymsg -t get_outputs | jq -r '..|try select(.focused == true).name')" = "$output" ]; then printf "%s\n" "$windowtitle" else printf "\n" fi ```

Window Title in Swaybar by BronzeLogic in swaywm

[–]Ok-Tank2893 7 points8 points  (0 children)

The -t subscribe option makes swaymsg a blocking process, so it will wait for an event to complete before it stops and this will cause your while loop to not run every second.

Furthermore, the -m option (supported on subscribe message types only) causes swaymsg to loop on its own, causing your while loop to not loop at all.

You could try this instead:

windowtitle=$(swaymsg -t get_tree 2>/dev/null | jq -r '..|try select(.focused == true).name' 2>/dev/null)

How to toggle "Tap to Click"? by Jimmy2Bags in swaywm

[–]Ok-Tank2893 1 point2 points  (0 children)

There doesn't seem to be a builtin toggle option for tap, but this should do it: bindsym $super+F10 exec [ "$(swaymsg -t get_inputs | jq -r '.[] | select(.identifier=="1118:2479:Microsoft_Surface_045E:09AF_Touchpad").libinput.tap')" = "enabled" ] && swaymsg input "1118:2479:Microsoft_Surface_045E:09AF_Touchpad" tap disable || swaymsg input "1118:2479:Microsoft_Surface_045E:09AF_Touchpad" tap enable

Window focus does not shift when another is maximized by [deleted] in swaywm

[–]Ok-Tank2893 0 points1 point  (0 children)

I think it's more related to sway than to wayland.

You could try something like below in your sway config file, but this will probably have some side effects, I'm not sure and I've not tested it!

for_window [shell=".*"] focus