Desktop-Config speichern

bastain

bastain

Aktives Mitglied
Thread Starter
Dabei seit
05.10.2007
Beiträge
273
Reaktionspunkte
1
Hallo,

ich habe im Büro einen externen Monitor am MBP angeschlossen und Programme auf die vier Spaces und die zwei Monitore verteilt. Klar, wenn ich das externe Display abklemme, werden alle Fenster der zwei Displays (extern und MBP-Screen) auf den jeweiligen Space des MBP-Screens zusammengeworfen.

Gibt es eine Möglichkeit, eine Software, die Desktop-Konfigurationen bzw. Fenster-Konfigurationen speichert (wo sind welche Fenster wie groß angeordnet), sodass ich meine jeweiligen Konfigurationen im MBP-alone, bzw. mit externem Display-Modus wieder laden kann.

Bastian
 
Hallo Bastian,
genau Die Frage habe ich mir vor 5 Tagen auch gestellt. Habe da den Tip bekommen das mal mit applescript zu probieren. Danach habe ich dann diesen Thread eröffnet: https://www.macuser.de/threads/fenstereigenschaften-mit-applescript-aendern.409440/.

Bisher sieht es bei mir so aus:

Code:
set Profil to display dialog ¬
    "Welche Umgebung?" buttons {"Arbeit mit Monitor", "Mobil"}
set Umgebung to button returned of Profil

-- set width to 1280

--Die Menuleiste nimmt die ersten 22 Pixel in y-Richtung in Anspruch, Werte < 22 Pixel werden automatisch auf 22 Pixel gesetzt !

if Umgebung is "Arbeit mit Monitor" then
    tell application "Finder"
        set bounds of front window to {20, 62, 1260, 725}
    end tell
    tell application "Terminal"
        set position of front window to {20, 450}
    end tell
    tell application "Safari"
        set bounds of every window to {20, 40, 1260, 725}
    end tell
    tell application "Mail"
        set bounds of front window to {20, 40, 1260, 725}
    end tell
    tell application "iTunes"
        set bounds of front window to {20, 40, 1260, 725}
    end tell
    tell application "iPhoto"
        set bounds of front window to {20, 40, 1260, 725}
    end tell
    tell application "iCal"
        set bounds of front window to {20, 40, 995, 725}
    end tell
    tell application "TeXShop"
        set bounds of every window whose name contains "pdf" to {200, 40, 1260, 725}
        set bounds of every window whose name contains "tex" to {20, 62, 1260, 725}
        set bounds of every window whose name contains "console" to {310, 178, 970, 578}
    end tell
else
    tell application "Finder"
        set bounds of the first window to {20, 62, 995, 725}
        try
            set bounds of the second window to {25, 67, 995, 725}
        end try
    end tell
    tell application "TeXShop"
        set bounds of every window whose name contains "pdf" to {600, 40, 1260, 725}
        set bounds of every window whose name contains "tex" to {20, 40, 800, 725}
        set bounds of every window whose name contains "console" to {310, 178, 970, 578}
    end tell
end if

Das kannst Du Dir ja mal als Anregung anschauen. Das ist auf gar keinen Fall perfekt, aber so kannst Du schon mal je nach Profil verschiedene Fensterpositionen realisieren. Leider habe ich im Moment nicht so viel Zeit meine weiteren Wünsche einzubauen. Da ich mich in der letzten Woche das erste Mal mit applescript beschäftigt habe dauert bei mir auch alles ein bischen länger ...

Viele Grüße

André

P.S. Falls Du was findest halt mich auf dem laufendem !
 
Ich bins nochmal,

falls Du noch nicht mit applescript gearbeitet hast: Du musst den Text in den Scripteditor einfügen (Programme/AppleScript/Skripteditor.app).

Du kannst auch erstmal mit dem Folgendem experimentieren:

Dazu sollte ein Finder Fenster offen sein!

Code:
set Profil to display dialog ¬
	"Welche Umgebung?" buttons {"Arbeit mit Monitor", "Mobil"}
set Umgebung to button returned of Profil

if Umgebung is "Mobil" then
	tell application "Finder"
		set bounds of front window to {20, 62, 1260, 725}
	end tell
else
	tell application "Finder"
		set bounds of the first window to {x1, y1, x2, y2}
end if

x1, y1, x2, und y2 setzt Du auf Werte (Pixelkoordinaten) die auf Deinem externen Display liegen ! Anschliessend beim Skripteditor auf "Ausführen" gehen und Button drücken ...
 
Zurück
Oben Unten