![]() And with that, if I have Emacs on the external monitor, I can switch to a font size of 12. When you don’t use the universal argument then nil is passed. So, if, for example, I use the keybindings C-u 13 M-x switch-font then 13 will be the parameter passed into switch-font. (interactive "P") is a special command that allows to pass whatever is typed as universal argument ( C-u) as a parameter to the function. ( defun set-size-font ( size ) ( set-face-attribute 'default nil :font ( concat "Fira Code-" ( number-to-string size )))) ( defun switch-font ( universal ) "Switches the font between my normal one and the one used to share screen" ( interactive "P" ) ( if ( equal universal nil ) ( progn ( if using-sharing-font ( set-standard-font ) ( set-sharing-font )) ( setq using-sharing-font ( not using-sharing-font ))) ( progn ( set-size-font universal ) ( setq using-sharing-font t )))) So I decided to finally setup a bit of code that I mused then about adding. But that font size is not very nice on my new monitor, and the “sharing” font is too big for normal use. I have written in a previous post about some code to quickly switch fonts on Emacs for when I am sharing my screen. For now, I have to close Emacs before I shutdown the mac and then re-open it again. Not sure why yet, I have to investigate a bit further. ![]() For some reason, if I shutdown the mac with Emacs open and then start it again, it fails to execute the code above. There is an easy solution for this: ( if ( memq window-system ' ( mac ns )) ( setenv "SHELL" "/bin/zsh" ))īut!!! a wrinkle. Which has the annoying effect of not setting up my path or other environment variables. But for some reason, when starting Emacs in GUI mode it uses sh. Zsh is the default shell (which is the one I use, anyway). So it seems macosx has a very weird behaviour. With the new setup I also have a new external monitor for it, though, unlike the one that I was using as primary on my desktpop, is “only” 24” 1920x1080 The shell change I am still using GNU Emacs, as Aquamacs seems to be quite behind, but maybe I should give it a look. ![]() So after four years, a Linux system is not my main development environment (some pfffffffft here). ![]() As I have started working on my new job, I got given a Mac laptop. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |