Making (Manjaro) KDE look like macOS, Part 2

I always liked the macOS look but somehow preferred the open approach of Linux. To get the best of both worlds, I made my KDE desktop look like macOS. While the first part covers basic settings, this second part digs deeper into details like global menu for Firefox, scheduled wallpaper changes and displaying mapped drives on the desktop.


Firefox

Global Menu 

Firefox does not support a global menu natively. Additional libraries need to be installed to change this behavior.

Manjaro (Arch)

First of all, install the new libraries. In a console run:

sudo pacman -S appmenu-gtk-module libdebusmenu-glib libdbusmenu-gtk3

Now reboot (logging out and back in again should be enough - I had already rebooted, so couldn't check this). After reboot, install a different Firefox version:

sudo pacman -S firefox-kde-opensuse

Confirm the replacement of the installed version.

Kubuntu (Ubuntu)

Simply install an additional package. In a console run:

sudo apt install firefox-globalmenu

Result

When done, start Firefox and the menu will have moved to the top panel:

Safari Look

To make Firefox look a bit more like Safari, you need to modify a few settings and change the general appearance with a userChrome.css file.

From the menu (button on the top right with three horizontal lines), select Customize.... In the drop-downs on the bottom of the window select:
  • Themes: Light
  • Density: Compact
For additional customization, use a userChrome.css file (you can download my userChrome.css here). In a console window perform these steps:

cd ~/.mozilla/firefox/*.default
mkdir chrome
cp ~/Downloads/userChrome.css chrome

After restarting Firefox, you should have the new look:

The Console on Login

There may be cleverer ways of doing this, but the console window showing after login annoys me a lot. I prefer to start a shell when I need one. So, in a shell (one I opened myself):

sudo pacman -R yakuake

Done!

Login Screen

The default login screen is nice, but there are better looking alternatives. Go to System Settings: Startup and Shutdown / Login Screen (SDDM). Click Get New Theme, search for "chili" and install the Chili for Plasma theme. Then select the Chili for Plasma theme and click Apply - you will need to supply the root password twice (once for installing the theme, the second time for activating it). Next time you log on, you will see this beautiful screen:

Cursor Theme

You still have the default Manjaro cursor theme on your login screen. That's not good... A small edit and that's fixed. In /etc/sddm.conf change the CursorTheme setting (commenting the original value and setting the new one):

#CursorTheme=breeze_cursors
CursorTheme=El Capitan


You need root permissions to change the file, e.g. sudo vi /etc/sddm.conf. The next time you log in, you'll have a proper mouse cursor.

Gnome and GTK

Gnome Toolkit (GTK) based applications use different settings than those configured in KDE. You have to configure those separately.

System Settings

Go to System Settings: Appearance / Application Style / GNOME Application Style (GTK).
First click Get New Themes > Download GTK3 themes... and search for "mojave". Now install the macOS Mojave (Mojave-light.tar.xz) theme.

Then set both GTK2 Theme and GTK3 Theme to Mojave-light. Set the Font to San Francisco Display, Medium weight, 10px size. Set the Cursor Theme to El_Captian_CursorsMODNEW and the Icon Theme to MacOs-Sierra-CT-light. Disable both Show icons in GTK buttons and Show icons in GTK menus. Finally click Apply:

Additional Settings

You still need to change the widget layout for your windows. Run the following command in a console:

gsettings set org.gnome.desktop.wm.preferences button-layout close,minimize,maximize:appmenu

Edit ~/.config/gtk-3.0/settings.ini and add the following line to the Settings section:

gtk-decoration-layout=close,minimize,maximize:menu

Gnome Applications

Some Gnome applications feel more like macOS and my preferred email program is Geary anyway. So time to install Geary email client, Nautilus file manager and Eye of Gnome image viewer:

sudo pacman -S geary seahorse nautilus eog

Dynamic Wallpaper

Unlike the Gnome desktop used in Ubuntu MATE, KDE does not support a scheduled wallpaper change. Looks like it was time to write a script. I wanted to be compatible with the XML format used in Gnome, so I downloaded the XML file from Github - btw. the second line also contains a link to the Mojave background images.

Here are the required steps to unpack the background images (including the installation of unzip if you haven't done so before). In a console window run these commands:

sudo pacman -S unzip
mkdir -P ~/Pictures/wallpapers/mojave-background
cd ~/Pictures/wallpapers/mojave-background
unzip ~/Downloads/mojave_dynamic.zip
rm -r __MACOSX

Now copy the XML code into ~/Pictures/wallpapers/mojave-background/mojave_dynamic.xml. Make sure to replace each reference /home/thanh with your home folder, e.g. /home/konrad.

Now download the Python script and run those commands in a console window:

mkdir ~/scripts
cd ~/scripts
cp ~/Downloads/wallpaper.py .
chmod +x wallpaper.py
./wallpaper.py

If you did everything right, you should now have a Mojave background reflecting the current time of day:


Right, so I need to run this script myself every time? Nope - create a cron entry and it will do this for you. Install kcron or use crontab -e to create the entry. I will describe the the kcron process; so install it first, then start it:

sudo pacman -S kcron

Run the Task Scheduler, click New Task... to create a new scheduled task. Choose to run the task every month, every day of the month, every hour, every day, and every 5 minutes:
Click OK to save the new task and OK again to install the new crontab and exit kcron. The wallpaper will now be checked every 5 minutes and changed if necessary. You will have to live with the wallpaper you had when you last logged out, but this will change after 5 minutes at the most (you can also change your task schedule to every minute, if you want to speed this up).

Finally, the wallpaper doesn't adjust on login - yet. Go to System Settings: Startup and Shutdown / Autostart. Add the wallpaper.py script using the Add Script... button. 

User Pictures

Let's be honest - the user pictures supplied with Manjaro KDE (/usr/share/user-manager/avatars) are not pretty, to say the least. If you have access to a real Mac (like the one under my desk), copy the user pictures from /Library/User Pictures and convert them to Portable Network Grafics format (png):

cd ~/Downloads/Library/User\ Pictures
find . -name \*.tiff | while read SOURCE; do convert "$SOURCE" "`echo $SOURCE | sed "s/tiff$/png/"`"; done

Now change your user image via System Settings: Personalization / Account Details / User Manager. Click on the image and select Load from file...:

Mounted Devices

In macOS environment, mounted devices are shown on the desktop - as are in the Gnome desktop. KDE however, does not provide this feature. Time for another script!

My script checks three aspects of mounted devices and creates links on the desktop:
  1. Locally mounted drives, including removable media
  2. GVFS mounts (created e.g. by Nautilus)
  3. Link to network resources created by Dolphin
Simply download the script from here and perform these steps in a console:

cd ~/scripts
cp ~/Downloads/mounted.py .
chmod +x mounted.py
./mounted.py

You should have some links on your desktop now. You need to manually move those to the right, but they will stay there, even if the script is run again:



Run the Task Scheduler, click New Task... to create a new scheduled task. Choose to run the task every month, every day of the month, every hour, every day, and every minute:
Click OK to save the new task and OK again to install the new crontab and exit kcron. The mounted devices will now be checked every minute. I'm also investigating some system events to reflect the changes immediately, but haven't gotten very far yet.

Updates

The various themes used here are updated frequently. Check your System Settings once in a while and you'll notice that - although you installed a theme and you're using it - it's "not installed anymore". This is because it has been updated. Just install it again and you're set.

Related Items

Kommentare

  1. Excellent guide. Thank you!
    About the mount script - maybe it is reasonable to look if listening udev events on attached devices solves the purpose? One example from stackoverflow:
    https://stackoverflow.com/questions/469243/how-can-i-listen-for-usb-device-inserted-events-in-linux-in-python

    Listening on udev events takes away need of scheduling anything...only daemon process needs to be started upon login.

    AntwortenLöschen

Kommentar veröffentlichen

Beliebte Posts aus diesem Blog

Working with OSX El Capitan Mouse Cursors

Hello Manjaro KDE - Instructions Part 1 Done!

Good Bye Ubuntu MATE - Hello Manjaro KDE