Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Xmonad support #1732

Open
1 task done
aliazani opened this issue Aug 27, 2022 · 12 comments
Open
1 task done

Request for Xmonad support #1732

aliazani opened this issue Aug 27, 2022 · 12 comments
Labels
os:linux Issues related to Linux type:integration-request Request for an intergration with an existing tool

Comments

@aliazani
Copy link

Sanity checks

Feature Details

Request for Xmonad desktop environment support:

I've mentioned the problem in #1591

@mschrage mschrage added type:integration-request Request for an intergration with an existing tool os:linux Issues related to Linux and removed NEED_TO_LABEL labels Aug 28, 2022
@mschrage
Copy link
Member

This is just a guess, but try configuring Fig to be a floating window in your ~/.config/xmonad/xmonad.hs file.

See this example configuration.

PS. You can use xprop | grep WM_CLASS to determine the class associated with the Fig app.

@mschrage
Copy link
Member

Let's see if r/xmonad has any ideas as well!

@aliazani
Copy link
Author

aliazani commented Aug 28, 2022

I did that but fig auto complete completely disappeared.
I think I should mention that I set ibus env variables in .zshrc because it doesn't working.
The output of fig doctor is like below:
Let's check if you're logged in...
✔ Logged into Fig

Fig is already running
Let's check your dotfiles...
✔ ~/.bashrc contains valid fig hooks
✔ ~/.profile contains valid fig hooks
✔ ~/.bash_profile contains valid fig hooks
✔ ~/.zshrc contains valid fig hooks
✔ ~/.zprofile contains valid fig hooks
✔ ~/.config/fish/conf.d/00_fig_pre.fish contains valid fig hooks
✔ ~/.config/fish/conf.d/99_fig_post.fish contains valid fig hooks

Let's make sure Fig is running...
✔ Fig bin exists
✔ PATH contains ~/.local/bin
✔ Fig Integration
✔ Daemon
✔ Figterm
✔ Insertion lock does not exist
✔ PATH and PseudoTerminal PATH match
✔ Autocomplete dev mode
✔ Plugin dev mode
✔ Mission Control is loading from the correct URL

Let's check if your system is compatible...
● Fig's support for Linux 5.15.60-1-MANJARO - "Manjaro Linux" is in development. It may not work properly on your system.

Let's check fig diagnostic...
✔ Autocomplete is active

Let's check your terminal integrations...

Let's check Linux integrations
✔ IBus Env Check
✔ IBus Check

Fig still not working? Run fig issue to let us know!
Or, email us at hello@fig.io!

@aliazani
Copy link
Author

aliazani commented Aug 28, 2022

After changing configuration for couple of hours, now everything is ok except the position of autosuggestion
2022-08-28-@13-42-13-scrot

@mschrage
Copy link
Member

Setting the ibus variables in your zshrc won't work. Needs to be in /etc/environment so that the Alacritty terminal instance itself sees the ibus environment variables, rather than the shell running inside of it.

Add the variables to /etc/environment and then restart your computer.

@mschrage
Copy link
Member

Looks like the autocomplete window does not properly set an OverrideRedirect flag or something along those lines to tell the window manager that it would like to not be managed.

If it has any kind of property that you can match on (e.g., a distinguished WM_CLASS), you can create a manageHook to automatically float it until upstream has fixed the issue; something like

appName =? "fig-float" --> doFloat

Looks like we might be able to fix this upstream by setting the override-redirect struct, so no xmonad configuration is required. cc @grant0417

@mschrage
Copy link
Member

Is everything working for you now @aliazani?

Also would you mind sharing your xmonad.hs?

@aliazani
Copy link
Author

aliazani commented Aug 28, 2022

Is everything working for you now @aliazani?

Also would you mind sharing your xmonad.hs?

Every thing looks good for me except the position of the autocomplete box.
This is the part of my config file that I've changed.

myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll
  -- use xprop to findout window detail
  [ className =? "confirm"         --> doFloat
  , className =? "Fig" --> doIgnore -- Ignore Fig
  , isFullscreen -->  doFullFloat
  ] <+> namedScratchpadManageHook myScratchPads

my xmonad.hs

I tried 3 options but doIgnore was the best one.
If you wish you can use doFloat, doFullFloat or doCenterFloat but with all of these I found a little blue dot which was annoying for me and also I didn't like the blue shadow around the suggestion box; it would be like below

this
this-one
I think the best option was doIgnore.

I hope that it would be useful.

@mschrage
Copy link
Member

mschrage commented Aug 28, 2022

Also worth trying this? https://unix.stackexchange.com/questions/669224/how-to-set-the-override-redirect-flag-on-existing-window

I think that the window position has to do with ibus not being setup correctly but I'm not sure.

@aliazani
Copy link
Author

aliazani commented Aug 28, 2022

Also worth trying this? https://unix.stackexchange.com/questions/669224/how-to-set-the-override-redirect-flag-on-existing-window

I think that the window position has to do with ibus not being setup correctly but I'm no sure.

It wasn't helpful, I tried that one but nothing happened!
I think it's worth mentioning that when I run terminal via fig desktop to set theme and tab function everything is fine even the position of autocomplete box!

If my mind serves me right for ibus I should add an input named fig or something like this but it was in beta version. In the last version I can't find fig in input lists!

@aliazani
Copy link
Author

After a call with @grant0417, testing a couple of things now it's clear that the problem is with terminals like alacritty and kitty but gnome-terminal is ok.
waiting for fix for alacritty :)
@mschrage

@squili
Copy link

squili commented Sep 14, 2022

If my mind serves me right for ibus I should add an input named fig or something like this but it was in beta version. In the last version I can't find fig in input lists!

This is no longer the case! We have removed the requirement of setting Fig as your input engine. The fix for Kitty should be out with 2.6.0 if you want to check what version your local package manager has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:linux Issues related to Linux type:integration-request Request for an intergration with an existing tool
Projects
None yet
Development

No branches or pull requests

3 participants