xmonad only shows wallpaper with no icons - archlinux

So I am testing Arch Linux because I was considering switching. I am running Arch on the latest version of VirtualBox. After I set up the xmonad tiling window manager and rebooted, only the wallpaper popped up. There was no dock, no icons, and no mouse. After reading the manual 2 times over, nothing helped. If anyone knows how to get xmonad to work, that would be great.
Thanks!

I have been using XMonad on Arch for nearly an year now, so I guess I am eligible to answer this.
As per my understanding, you have installed xmonad, xmonad-contrib and xmobar from the Arch official repos. Now, the first thing that you should do is make a configuration file, both for XMonad itself, and XMobar, which is its status bar. Your xmonad configuration goes in ~/.config/xmonad/xmonad.hs (default) or ~/.xmonad/xmonad.hs. XMobar config goes in ~/.config/xmobar/xmobarrc0.hs. If you are using a login manager, xmonad will start as usual, else just use ~/.xinitrc with exec xmonad command for starting xmonad.
Now, as you mentioned, wallpaper is being displayed for you, which might be due to nitrogen or feh or anything similar that is autostarting and setting up your wallpaper. Else, everything you want, you have to set it up yourself in the xmonad config file. The wallpaper also doesn't start by itself if you have a clean install. XMonad just gives a black screen with a black cross for the mouse pointer.
Dock: There isn't any dock on xmonad. If you want a status bar, you can use xmobar or polybar or anything else. I use xmobar with clickable objects, which acts like a dock. Configure it as you want.
Icons: Window managers have a keyboard-driven workflow. You can define workspaces which are clickable, and have your mouse do the switching. But you won't have icons on your Desktop with your files. For that, use any Desktop Environment. You can use xmonad with KDE, Xfce, etc. too, if you want that specific workflow.
Mouse: Well, you should have a cross for a pointer, even if you do not setup anything. If that isn't working, then there is some issue with the drivers that were loaded. But, for a proper arrow-shaped pointer, you can set it up in the xmonad config itself.
Now, you might wonder how you will launch applications if there is nothing to click. For that, you have dmenu, rofi and many other prompts which you can setup. For me, the super key launches rofi in a nice, centered window with application names and icons and fuzzy searching enabled. Configure to your heart's content. A window manager showcases your creativity.
Hope I could give the helping-hand to know what is possible. If you want some ready-made configurations, look for DistroTube's dotfiles.

I am answering because I do not have enough reputation to make a comment. Sorry :|
Xmonad is a tiling window manager and that is all it is. It really doesn't have the concept of desktop icons. Nor does any tiling window manager. A tiling window manager is just all about managing your windows. For status and dock, you usually pair a different program (Xmobar, Polybar etc).
But hold on, if there are no icons, how do I access the applications? Well that's one point about it. Tiling window managers' key selling point is the extensive usage of "Keyboard Shortcuts" People use tiling window manager mostly for the benefits of usage with keyboard.
It takes time to get used to, but has its benefits. If it feels strange and uncomfortable, maybe tiling WMs are not what you want.
Also, this question doesn't belong in here. SO is only for programming related questions. You have other Stack exchange sites for these (SuperUser, Unix/Linux, AskUbuntu, etc)

Related

IntelliJ doesn't display... at all

I have a bug which is completely over the planet. IntellIJ doesn't display. It's on, yet doesn't display.
It worked well before, last thing I did was re-setting up new dependencies on my code and (nothing to do with that) re-setting SDK for other reasons, both of which shouldn't be linked to display properties.
As you can see it's working, I see the pop up windows:
But doesn't display:
Yet I can see IntelliJ windows with Shift + Tab:
and yes, my screen doesn't duplicate, so it's not hidden in another dimension or something
I tried:
restart computer
uninstall install IntelliJ
uninstall install IntelliJ without previous parameters
try other JetBrains software, like DataGrip, it works and displays well
call a homeopathic doctor
Unsuccessfully. So I knee and await before your judgement of this critical situation.
I have this exact same behavior happen to me when I use IntelliJ at work and then go home and try to use it via Remote Desktop. Its very strange (regardless of which monitor I leave it on at work when I leave).
If I hover over it in the task bar and then hover over the thumbnail for the running app, I can right click and tell it to maximize and it magically comes back into focus. Sometimes I have to tell it to restore and then to maximize before this works.
Occasionally even this doesn't work and I have to close it, re-open, and do the same. It makes no sense, so I understand your frustration.
It works
As John Humphreys - w00te mentionned, click right over the thumbnail (I insist: the thumbnail ! Not the taskbar icon) and then select maximize and voilà.
Bon appétit.
Thanks for your contribution and I hope it will help some people in need here.
I have had this issue when I have moved from a dual monitor setup to a single monitor setup or a different dual monitor set up. The issue here that intellij window seems to save and use the coordinates of the last dual window setup to render the window. It doesn't matter you restart your computer, it will always try and render to that position, even if that position is not visible on the new monitor set up. On windows there is an easy way to fix this issue. Go to your display setting and flip the order of the windows. The intellij window should now be visible. you can drag the window to the your other monitor and re-arrange the windows back to the order you had previously. After that, you can place the intellij window wherever you want.
In my case I noticed there is a 1 pixel thick gray line on my screen, turns out that was the IDEA window and I could resize upon hovering that line. Needless to say it wasn't me shrinking it.
I have this same behavior, It happens to me when I connect a monitor in extended mode and move the intellij window to the monitor, then disconnect without moving it back. No other solution other than to connect to monitor again and bring it back to the original window for me works.
On mac, select the app from the app tray so that the menu for it appears up top. Then on the menu up top, go to Windows->Zoom and it should expand to fill the viewport.
From there you can drag it down to size and reposition.

Why does OSX/Cocoa dock icon revert to default before going away?

I'm working on wrapping some Cocoa functionality in an Objective-C library that will be called from a cross-platform C library. One of my goals is to provide someone who does development in C on Linux with the ability to deploy to OSX without having to get into XCode, nib files, etc. I want them to be able to compile and link their code on OSX using the command line tools, and end up with a regular resizeable main window with the usual buttons and so on, an application menu and a dock icon that looks and behaves as expected, etc.
I'm working on OSX 10.8.5. I have XCode 5.0 installed. Here's my gcc --version output:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
I've figured out how to present a main window, how to set up the application menu, and various other things, programmatically, without using XCode or any nib or plist, but I've run into a problem with the dock icon.
I set a custom dock icon image by calling:
[NSApp setApplicationIconImage:dockImage];
When the user quits the app, the dock icon image reverts to something else (some kind of default application icon or view), briefly, before going away. How can I prevent that from happening without using XCode to create a nib or a plist?
I've tried setting the activation policy of NSApp to prohibitted in the app delegate's applicationShouldTerminate method, to try to hide the dock icon before this switch back occurs. That didn't help, it does hide the window and the dock icon, but the dock icon still switches back to the default icon, briefly, as part of the process of hiding. I confirmed this by returning NSTerminateLator, and confirming that setting the activation policy to prohibited does cause the dock and the icon to hide even though the app is not terminating, and not setting it leaves it unhidden.
I've tried subclassing NSApplication and overriding the setApplicationIconImage call. I have confirmed that it is being called a second time, by something other than my code (well, or not directly by my code, anyway), just before the program exits. I've tried preventing the second call to it from working by calling the super function the first time, but not the second time, and I've confirmed that code in that function can prevent my code from changing the application icon, but that didn't fix the problem. It still happens anyway, somehow.
I've also tried removing the application badge, like this:
[[window dockTile] setShowsApplicationBadge: NO];
just in case it was something to do with that, but that didn't work. The docs say that app badges are no longer relevant as of 10.6, but I was grasping at straws.
Being stumped on the programmatic front, I'm now trying to find out how to package an .app from scratch,without using XCode, and see if maybe I can create a plist from scratch that has a reference to application image in it. But a programmatic solution would be preferable, as I'd really like to minimize what goes into the OSX-specific packaging of a deployment.
Another possibility might be to use XCode once, to produce a very generic, bare-bones .app that my deployment scripts copy and alter.
Please don't shoot my question down as being "too broad" or "not constructive" or something like that. I realize I'm reinventing wheels that already exist in various forms, but there's no law against trying to build a better mouse trap, or just a different or even a worse one, for that matter. I realize I'm trying to fix a problem that a lot of people would consider inconsequential, but XCode-produced apps don't have this problem, and I really don't want the tools I'm creating to produce any user-visible artifacts like that. I'm not intending to diss Apple's tool chain or invite debate about whether or not what I'm pursuing should be pursued. I have a specific, technical problem that I'm looking for solution to that is within the constraints of my goals.

IntelliJ IDEA back/forward with mouse

I want to move back/forward between editor tabs, using the two additional ("virtual") mouse buttons I have (RAZER DEATHADDER BLACK).
In Eclipse it's possible by default.
In IDEA I go to File->Settings->Keymap->Main menu->Window->Editor Tabs.
There I have Select Next Tab with the deault Alt+Right shortcut.
Then I open the Add Mouse Shortcut.
In that dialog I try to assign the back button of my mouse but without success. It doesn't react at all.
Anyway, googling a bit I've found this thread. I quote Alexey Gopachenko which seems to be an employee of IntelliJ:
As stated above - we can't support buttons if JDK on your platform
does not support them - and obviously it does not.
Anyway, that is totally wrong. My platform does support these keys - I actually work with them, on the same platform, on Eclipse and any other app, so it's IDEA who ignores them.
I'd appriciate a solution - how do I assign these back/forward mouse buttons?
UPDATE #1
I've found out that IDEA uses its own JAVA distribution (C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.4\jre on Windows 7), instead of the system's one - WHY?!
I'm almost SURE that is the reason I cannot use extended mouse buttons.
I've tried to trick IDEA by creating a custom Windows shortcut. Didn't work. I've also tried to create a SYMLINK in windows to my other, system-wide JRE distribution. Didn't work as well.
If someone come up with an idea on how to make it work with the system's JRE instead of its own - I think that'd solve the issue.
UPDATE #2
The above update #1 is not the issue.
I also had the same problem under OS X El Capitan. I just tried to add a new Keyboard-Shortcut and pressed than the Button 4 on the mouse and this worked.
Back/Forward mouse shortcuts work fine for me with Razer Mamba mouse, for example Back action is assigned to Button4 Click and I can confirm that it is recognized in this dialog when I click on the Click Pad area:
If it doesn't work with your mouse for some reason, you can try to workaround the problem using the Razer Configurator macro or key assignments:
Use the assigned key in IDEA keymap settings instead of the mouse shortcut.
Note that Eclipse is SWT based while IDEA is Swing based, so mouse event management is completely different. If JDK cannot recognize your device button clicks, it will not work in any Java Swing applications (NetBeans, JEdit, etc). In some cases running IDEA under a more recent JDK version may help (if support for your device was added in the newer JDK release).
I'm experiencing the exact same thing suddenly.
I realized my most recent change was to start using idea64.exe rather than idea.exe.
I switched back, and my mouse buttons are working fine again.
So, while this is not a complete answer, it seems as if it has something to do with the 64-bit version.
If the Razer driver's button mapping feature doesn't allow different mappings for a particular program, you can just assign the buttons to the mouse button number choices (mouse button 4 / mouse button 5) and then install a third party app that does support mappings for particular programs, e.g. https://superuser.com/questions/562972/how-to-map-bind-mouse-button-as-keyboard-button-in-windows-7
This question helped me although I have a Logitech Marathon Mouse M705, so I thought that I would share the solution in case other Logitech owners was in search for this.
I have a similar problem with a Logitech mouse and idea64.exe
Fortunately their SetPoint software allows for program specific settings.
This setting will have to be deleted and then reconfigured whenever you update IntelliJ and get a new idea64.exe :-)
I am experiencing a very similar problem and wanted to share my findings. I just bought a new Logitech M705 mouse. Within intelli-j the scroll right and scroll left buttons do not work. The forward and backward buttons also do not work.
I typically run intelli-j as administrator because I need higher privileges to run various tomcat services. When logging in as that user (rather than right clicking and selecting run as admin) all the buttons work! Also, when running as my normal user all the buttons work.
Also very curious is that I have an older generation Logitech mouse (same model, M705). This mouse has no problems with the scroll buttons and forward-back.
My solution for now is to use intelli-j as the user I am logged in as.
Check out this little tutorial from BetterTouchTool here. Basically for some mice (like Logitech ones) using the settings application they come with you can map default button actions to clicks and in doing so set a button number and use it as normal.
This works for my Logitech Performance MX mouse.
You can add mouse shortcuts, just click on an action in keymap and add mouse shortcut.
Alternatively Ctrl+Tab brings up switcher, which may be less clicks to navigate.

Register Double-Click on Desktop (but not on Icons !)

Here's a though question:
I need to find out when the user double-clicked the OS X desktop, but not icons on it.
Now, I have thought of the following solutions, though I am not sure if they are doable:
Using desktop icons position (not sure how to get them), and the size of the desktop icons, we could theoretically check once the user double-clicks on the desktop, if it is inside one of the icon areas. Contra: Might not be flawless as some icons might be transparent or not taking up the entire icon size.
Maybe there is a variable that tells us if a icon from the desktop has been clicked? Then we could just check if that variable has been activated when the user double-clicked the last time the desk.
I am certainly still open to other (better) solutions, but they need to be sandboxable for the Mac App Store.
This is probably not going to be appropriate for the Mac App Store, for a number of reasons.
First, how are you going to intercept clicks outside your window? There are a few different mechanisms for this (e.g., event taps), but none of them are allowed in sandboxed apps. And that's intentional, and for a good reason—you're not supposed to be interfering with other apps or with the OS.
On top of that, it's hard to imagine that whatever you're trying to do wouldn't count as non-standard UI/HIG stuff, which is another reason for rejection.
But, assuming none of that were a problem, and you could intercept clicks on the desktop, there's no documented way to get all the icons on the desktop, so you have to read the .DS_store file directly, which means relying on private implementation information, which is another thing you're not allowed to do.
Finally, you have to get access to that .DS_store file. Unless you're expecting the user to drag the (invisible) file or its parent directory to your app or select it in an NSOpenPanel or something, the only way to get such access from inside the sandbox is via a temporary exception entitlement. Which you can't use unless you can justify to the reviewer why you need it as a workaround for a bug or limitation in the OS. So, what's your justification going to be?

How does "Cinch App" do it?

If you aren't familiar with Cinch, its an application on Mac App Store that allows you to resize ANY window to half/full screen size if you drag the window to the edge of the screen. Exactly like the functionality in windows 7.
Now my question is, how is it done? I have looked all over cocoa apis looking for notifications/delegate methods for whenever a window is being dragged (ALL windows, not just windows owned by the app from which code is running from) but can't find it. Looked in Core Graphics API...Quartz Display Services....but can't find it.
Any help will be greatly appreciated as I have been looking for the past week....Thanks!
Edit: Resize the window is easy since it can be done through applescript bridge..
Are you developer behind i-Snap or some other Mac App Store clone of Cinch?
I'm the developer behind Cinch, and while I try to maintain an "abundance mentality" which basically says "There's enough out there for everyone", I've been upset by the Mac App Store lowering the barrier for entry to this market which has produced a number of half-backed competitors.
I would be thrilled to see some real innovation around the work I have done, and not just clones looking to make a quick buck.
Anyway, you want to look at the Accessibility APIs. It's a Carbon C API. This is probably your best reference: http://developer.apple.com/library/mac/#samplecode/UIElementInspector/Introduction/Intro.html%23//apple_ref/doc/uid/DTS10000728
I've not used the Cinch app, but if I were to do this I'd expect to be using cocoa events. (Also see here) Specifically the mouse handling events, combined with where the mouse is currently on-screen. They probably set a variable when a window is grabbed and then track the mouse pointer until it hits an edge or until they release the mouse button.
Events are very powerful and provide very low level access to what is happening, but can also be very complex. Good luck!
I'm not sure. Maybe the developers combine apple script and carbon events. You can create carbon events to know when the mouse has been clicked or dragged