focus follows mouse (NO autoraise) in Mac Sierra - macos

I'm aware of the other threads on this topic but they are autoraised-based and/or all the answers point to software that's no longer being developed. I'm just looking for this simple feature: focus follows mouse WITHOUT autoraise for Mac.
Zooom2 was able to perform this, but they are no longer developing their software.
I'm not using the terminal and need to copy/paste and read between multiple programs with multiple windows, someone please tell you've found a solution to this?

chunkwm has recently added a setting ffm_disable_autoraise which works well for me on macOS Mojave. To enable only the Focus Follows Mouse feature, follow the install steps then edit ~/.chunkwmrc to comment out undesired plugins and enable FFM
# chunkc core::load border.so
# chunkc core::load tiling.so
chunkc core::load ffm.so
and disable autoraise
chunkc set ffm_disable_autoraise 1
The other available plugins are useful but are not the subject of this question.
Edit 2019-09-12:
chunkwm has been superseded by yabai. To install:
brew tap koekeishiya/formulae
brew install yabai
mkdir -p ~/.config/yabai/
printf 'yabai -m config focus_follows_mouse autofocus' >> ~/.config/yabai/yabairc
brew services start yabai

I do miss one thing in Yabai - the ability to focus to a subwindow within a focussed window. That would be gold!

I am using AutoRaise. The modified fork from fredngo works well for me. Check out at https://github.com/sbmpost/AutoRaise/issues/47#issuecomment-1129157693.

Related

Unable to install a kernel even though it compiled successfully

I'm trying to install a linux-Kernel version 4.9.228 in my ubuntu 20.04.
The kernel compiled successfully, without any errors. I also executed the command:
sudo make modules_install install
When I rebooted my system, to check whether it made correct entry, I checked the files under the /boot/ directory:
System.map-4.9.228
vmlinuz-4.9.228
initrd.img-4.9.228
config-4.9.228
I don't know why but when I ran uname -r. It hasn't updated my version. It still says 5.4.0-37-generic.
Please guide me if I am missing something.
Note: The sole purpose of doing all this, is to learn how to add a system call and how to compile a kernel. I'm open to suggestions, if you got any. Thanks.
You might have successfully installed a different kernel version, but in order to boot into it, you need to tell the bootloader to do so.
I'm going to assume that you are using GRUB2 as bootloader, since it's standard on most distributions including Ubuntu. In order to boot the new kernel, you have multiple options.
Option 1
This is the safest and recommended option.
Edit the GRUB configuration file /etc/default/grub (you need to be root, so use something like sudo vi or sudo nano) and make sure that you have GRUB_TIMEOUT=N where N is a number of seconds. If you don't, then just add it in a new line. You want N to be at least 5 or 10 so that you have time to select the correct kernel version when GRUB starts.
Additionally, make sure that you do not have any of the following lines (you shouldn't have them, but if you do, remove or comment them):
GRUB_DISABLE_RECOVERY="true"
GRUB_DISABLE_SUBMENU=y
GRUB_HIDDEN_TIMEOUT=N
GRUB_TIMEOUT_STYLE=hidden
Save the changes to /etc/default/grub and run sudo update-grub. This will detect currently installed kernels and add them to the bootable list when you start the computer and enter GRUB.
Reboot your PC, when GRUB starts you will see a list of options. If you don't do anything, your default kernel will boot, otherwise you can use the arrow keys and the ENTER key to navigate to "Advanced options for Ubuntu", where you will find the list of available kernels and you will be able to select the one you prefer.
It should look something like this:
Option 2
Use only as fallback if option 1 does not work (it should, but you never know). This is not as clean as option 1 because it changes the default kernel, and changes are also probably going to be overridden by an upgrade of your current kernel (which technically does exactly this to update the default version).
Make the kernel you want the default one by changing the two symlinks /initrd.img and /vmilunuz to point to the right versions of the kernel and initrd image. This can be done either manually or through the linux-update-symlinks command.
$ linux-version list --paths
... grab the correct VERSION and PATH ...
$ sudo linux-update-symlinks install VERSION PATH
Run sudo update-grub to let GRUB detect the changes.
Reboot your PC.
Option 3
Manually boot into the kernel you want from the GRUB command line. This is an advanced option and I'm listing it only as a last resort, you should never need to do this unless you have completely broken your system configuration.
Reboot the PC into GRUB, and as soon as you see it, press C to enter the GRUB command line.
Follow this answer from now on.
In any case, remember that playing around with kernel development on your own machine is not a good idea if you are not sure what you are doing. I recommend you use a virtual machine to experiment with the kernel, that way if anything goes wrong you can just throw it away and create a new one.

package-refresh-contents hangs at Contacting host: elpa.gnu.org:80

I'm running Emacs 24.4 for Windows (installed through Chocolatey) and trying to install CIDER.
When I run M-x package-install [RET] cider [RET], I get [No match]. When I run M-x package-refresh-contents [RET], it hangs on Contacting host: elpa.gnu.org:80.
~/.emacs.d is populated with the GitHub repo recommended by braveclojure.com (here). I've reinstalled Emacs and I'm still getting the same problem.
I had this same problem on emacs ELPA wiki they say to set un ELPA you have to modify the emacs init file located at ~/.emacs or _emacs or ~/.emacs.d/init.el for me it was ~/.emacs-live.el since I have this version.
I just updated that file with the following:
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")))
Seems that I needed the configuration from where ELPA is going to look for packages.
After that i just ran M-x package-refresh-contents [RET] and M-x package-install [RET] cider [RET] that installed cider.
This guide fixed it for me: http://www.lonecpluspluscoder.com/2015/08/adding-tls-support-to-emacs-24-5-on-windows/
Basically go to: http://sourceforge.net/projects/ezwinports/files/, grab the gnutls library and just uncompress the archive at the root of your Emacs directory.
Afterwards, doing list-packages became near-instant for me. Using Emacs 24.5.1.
I had the same problem with Emacs 24 in Ubuntu 16.04 and nothing seemed to solve the problem. Finally, installing Emacs 25 solved the problem.
New Emacs packages are available here
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
apt-get install emacs27
The problem is that the ELPA package signing key has expired. A new Emacs version will include a new key. Note that currently (2020 Oct) there is Emacs 27 available for Ubuntu 16.04.
Also make sure that you use https urls (and not plain http).
Another possibility may be to install new keys to an older Emacs version.
Windows binaries may also be available somewhere.
Other than setting up your package archives, like a previous answer mentions (FWIW I'm using HTTPS directly)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")))
one might encounter another problem but with the same symptom of getting stuck at "Contacting host" due to running gpg in batch mode to verify the packages, but needing some input. You can disable that via
(setq package-check-signature nil)
Stack Overflow sometimes deletes chats. Fortunately it seems like I've still got access to a read-only version of the transcript.
From my perspective we didn't get a satisfactory answer. Here are the highlights:
We determined that the variable package-archives contained only GNU ELPA.
After discovering this, the OP wrote
I edited the package.el file. It works!
I suggested that editing a core Emacs Lisp file is not a good solution, but didn't hear anything back from the OP.
Since the referenced init.el file tries to add MELPA, I think there's something else going on. Perhaps the .emacs.d/ directory is in the wrong location, for example.
Editing package.el is certainly not a good solution. Doing more work to determine why the config isn't being properly loaded would be a good approach.
I have faced this issue on Emacs 24.5.1.
I searched here in SO and outside SO, nothing worked for me. I had to circumvent the problem by installing a newer version of Emacs: emacs25.

Changing Background Color in Rstudio

Is it possible to change the background colors in Rstudio? I know it's possible to change the theme of the editor, which is a really nice feature and which I'm already using, but is it possible to change the background color of the other windows (Environment, History, Files, etc...) to something else than white and the text to something darker? Backgrounds that are too light give me a headache.
It isn't, but if you're running Linux, you can have the window manager invert the color of just one window. Target this to the RStudio window and you'll get RStudio with an inverse theme. (This was a common trick employed with Eclipse until it got a dark theme with the release of Eclipse Luna.)
https://askubuntu.com/questions/134668/how-to-trigger-a-color-inversion-effect-for-one-window
Edit:
Hi all
since this is work in progress and i don't want to update this post all the time i moved the project to GitHub. Fell free to download the files from there.
The issues with dropdown menu, autocomplete and popups are solved in the latest Version on GitHub. Still newer builds than version 1.0.143 are not supported. But i will work on it.
Edit (05.05.2017): My custom_style.css works with the actual stable Version of RStudio 1.0.143 .
Newer Preview and Daily Builds got already an upgrade where you can choose out of 3 different Themes. My files don't work with these newer builds at the moment, but I am working on it.
Cause only one of these themes is kind of a dark metal blue but not the dark them i want to have. I will upload it as soon as it works.
I tested my theme yesterday on a Lubuntu 17.04 OS.
Here are the Install instructions for Linux:
Enter your installation folder for rstudio
cd /usr/lib/rstudio
Copy the Dark Theme folder you downloaded to the rstudio install dir
sudo cp -avrf /home/<user>/Downloads/RStudioDarkStyle ./
First save the Original files to a new folder (vanilla) if something goes wrong
sudo mkdir vanilla
sudo cp -avrf ./www/index.htm ./vanilla/index.htm
sudo cp -avrf ./resources/R.css ./vanilla/R.css
sudo cp -avrf ./resources/grid/gridstyles.css ./vanilla/gridstyles.css
If you set own styles before you can also save them if u don't have this may result in an error.
sudo cp -avrf ./www/custom_styles.css ./vanilla/custom_styles.css
Then we replace the original files with the new ones
sudo cp -avrf ./RStudioDarkStyle/index.htm ./www/index.htm
sudo cp -avrf ./RStudioDarkStyle/custom_styles.css ./www/custom_styles.css
sudo cp -avrf ./RStudioDarkStyle/R.css ./resources/R.css
sudo cp -avrf ./RStudioDarkStyle/gridstyles.css ./resources/grid/gridstyles.css
And thats all it should work now.
I found this guide how to make rstudio dark by zencoder on rstudio support
and improved it a little bit.
I edited the custom_styles.css and the gridstyles.css the other files are original as zencoder wrote them.
For Installation guide see the readme file.
I use the "Vibrant Ink" Apperance with it on a Win7 pc.
I didn't even try to change the plot window, because most graphics are used in papers and such and are normaly printed with a white background, for me it is more functional to have a white background for plots.
Have fun with this hope it helps.
DdS
It's simple now.
Tools > Options > Appearance
Choose color.
That's it.

Fail to `(require "COCOA")` with Mac ports Clozure Common Lisp

I have installed the package ccl with Mac ports. Now I want to use the Cocoa bridge.
Welcome to Clozure Common Lisp Version 1.8 (DarwinX8664)!
? (require "COCOA")
> Error: Permission denied : #P"/opt/local/share/ccl/1.8/temp bundle64.app/Contents/252752233492590994.tem"
> While executing: %CREATE-FILE, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
If I start ccl64 with sudo it works all right. But I would like to be able to do this as a normal user. How should I do it?
svn co http://svn.clozure.com/publicsvn/openmcl/release/1.8/darwinx86/ccl
while in ~ is probably the most straightfoward way to achieve what you want.
If you'd like to work with MacPorts to manage ccl (instead of the svn method above), then run
sudo chown -R $USER /opt/local/share/ccl
Note that the latter case does make me a bit uncomfortable, because if you try to sudo port uninstall ccl, MacPorts does not completely remove the share/ccl directory, presumably because the (require :cocoa) call adds compiled binaries to that directory that Macports is not tracking.
To get the MacAppStore version to work, you'd probably need to find the ccl binary buried inside the ccl.app directory, and launch that for slime. Might not be a bad way to go either.
Note that any way you do this, once you (require :cocoa), you'll have a separate cocoa listener pop up while slime is running. I just move it off to the side once it opens. If you find a way to suppress this listener window after (require :cocoa), I'd be interested to know that.
But I'd recommend the first (svn) method. That's the one I use with slimv, and it's the one that Clozure recommends on their downloads page.
If you are on a Mac, the easiest way to run Clozure CL is to load it from Apple's Mac App Store.
https://itunes.apple.com/de/app/clozure-cl/id489900618?mt=12
That way it gets installed in the Applications folder and running the Cocoa-App is no problem, since it is provided. But then you would run the Cocoa-based IDE version of CCL.
If you install CCL from MacPorts, I guess that the App is not existing. You would need to have the rights for the directory to create the necessary files.
Otherwise I would just install a fresh CCL from Clozure's repository:
http://ccl.clozure.com/download.html

How do I install modperl under OS X Leopard's default Apache 2?

My attempts to install modperl under the default vanilla Leopard Apache 2 have failed and all I can find online are variations on this:
I would like if possible not to rely on MacPorts or Fink, though if they can be made to work with the default Apache 2 install that would probably be ok.
Macports has it (think apt-get and the likes on linux, but on OS X)
(you can see it listed here)
Haven't installed myself though....
Why not just give up and build/install your own or port versions of perl, apache2, and mod_perl2? Probably easier than fighting with it. (Worked for me.)
(as per comment)
Mmmkay! Sorry, I didn't intend that to be snarky or imply that it's not a valid question. I guess I'll delete this (if I can.) Would it be useful to edit the question to add your rational rationale for not having a separate installation?
Get the latest mod_perl and set the following var:
export ARCHFLAGS="-arch x86_64"
Compile/install as usual.
Taken from this post, "Building mod_perl2 on Leopard" which also links to further details on how to get Apache2::Request (libapreq) working as well.
-
(Not that I've been able to test it since I'm personally back on Tiger running Apache 1.3!)
(And let's see if stackoverflow manages to lift this answer to the top since it is the only "correct" answer)
I asked a very similar question a few days ago and got some good answers:
"How do I use a vendor Apache with a self-compiled Perl and mod_perl?"
The mc ports install of mod_perl tries to install apache 1.3 even if you specify just the mod perl, so thats not a good option.
Try this:
http://www.unibia.com/unibianet/node/32

Resources