Giter VIP home page Giter VIP logo

Comments (6)

igorkulman avatar igorkulman commented on May 19, 2024

I am not really familiar with virtual desktop so what does the utility do right now, set the wallpaper for just one virtual desktop?

from changemenubarcolor.

aleeraser avatar aleeraser commented on May 19, 2024

Yes, exactly, it needs to be moved in every virtual desktop.

But bear in mind that also the "Desktop & Screen Saver" utility from "System Preferences" must be moved in every Virtual Desktop in order to change the background, so I'm not exactly sure that this is something feasible.

from changemenubarcolor.

igorkulman avatar igorkulman commented on May 19, 2024

It looks like it is not that easy even when you want to do it manually https://apple.stackexchange.com/questions/71070/how-to-change-desktop-wallpaper-for-all-virtual-desktops

from changemenubarcolor.

Marsellus19 avatar Marsellus19 commented on May 19, 2024

I don't know if that is the answer you're looking for but if you've got more than one desktop open at all times, you simply have to close all desktops and create new ones. From what I can tell MacOS mirrors wallpaper settings from the first display to all newly created ones. So after changing the wallpaper for desktop 1 the remaining still keep the settings from before making the change if that makes sense.

from changemenubarcolor.

Waitsnake avatar Waitsnake commented on May 19, 2024

I saw in plist file ~/Library/Preferences/com.apple.spaces.plist in array 'Space Properties' you can find the number of spaces and their names (some UUID generated names).

And in the SQLite database file ~/Library/Application Support/Dock/desktoppicture.db they seem to have done some database relations between the spaces and the paths to the pictures.

But here is maybe some more investigation needed to find out how all exactly works.

from changemenubarcolor.

Waitsnake avatar Waitsnake commented on May 19, 2024

As a workaround I made a bash script, but that needs some preconditions done to work.

preconditions:

  1. give Terminal app 'Accessibility' rights (for using the rights with app 'osascript' in terminal from a bash script).
    System Properties -> Security & Privacy -> Privacy -> Accessibility and add 'Terminal' via '+' and activate it.

  2. assign keyboard shortcuts to switch between spaces.
    System Properties -> Keyboard -> Shortcuts -> Mission Control and here assign under 'Mission Control' at least the shortcuts for 'Switch to Desktop 1' to 'control+option+1' and 'Move right a space' to 'control+option+->' (right cursor key) as the batch script will use those two shortcuts.

  3. Have ChangeMenuBarColor installed

Here the quick and dirty bash script:

#!/bin/bash
SPACES=`/usr/libexec/PlistBuddy -c "Print :SpacesDisplayConfiguration:Space\ Properties:" ~/Library/Preferences/com.apple.spaces.plist | grep name -c `

echo "Go to first space"
# go to first space control+option+1 (key code 18) and change menu bar
osascript -e 'tell application "System Events" to key code 18 using {control down, option down}'
mint run igorkulman/ChangeMenuBarColor SolidColor "#CCCCCC" --all-displays

for (( c=2; c<=$SPACES; c++ ))
do
  echo "Go to next space $c"
  # go to next space control+option+left_arrow (key code 124)
  osascript -e 'tell application "System Events" to key code 124 using {control down, option down}'
  mint run igorkulman/ChangeMenuBarColor SolidColor "#CCCCCC" --all-displays
done

echo "Go to first space"
# go to first space control+option+1 (key code 18)
osascript -e 'tell application "System Events" to key code 18 using {control down, option down}'

# clear old temp backgrounds from ChangeMenuBarColor (only those older then 2 minutes)
find ~/Library/Application\ Support/ChangeMenuBarColor -name '*.jpg' -mmin +2 -delete > /dev/null

from changemenubarcolor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.