태그 보관물: yosemite

yosemite

앱 창을 원래 공간으로 복원

앱을 다시 열면 원래 위치에 관계없이 모든 창이 첫 번째 공간에있게됩니다.

원래 레이아웃 : 하나의 앱에는 각각 별도의 공간에 두 개의 창이 열려 있습니다.

+-----[ Space 1 ]-----+  +-----[ Space 2 ]-----+
|                     |  |                     |
|  [Chrome window 1]  |  |  [Chrome window 2]  |
|                     |  |                     |
|                     |  |                     |
+---------------------+  +---------------------+

앱 재시작 후 잘못된 레이아웃 : 두 창 모두 첫 번째 공간에 있습니다.

+-----[ Space 1 ]-----+  +-----[ Space 2 ]-----+
|                     |  |                     |
|  [Chrome window 1]  |  |                     |
|  [Chrome window 2]  |  |                     |
|                     |  |                     |
+---------------------+  +---------------------+

앱이 종료되기 전에 원래 있던 공간에서 앱이 창을 복원하도록하는 설정 또는 앱이 있습니까?



답변

버그 #의 74812 크롬에가. 그것에 투표하십시오!

수퍼 유저와 동일한 질문입니다 .


답변

내 답변이 귀하의 문제를 해결하지 못하지만 가까운 해결 방법이라는 것을 알고 있습니다. 창을 재배치하기 위해 Cinch 및 SizeUp이라는 소프트웨어를 사용하고 있습니다. 공간과 화면에서 창 크기를 조정하는 것은 실제로 빠르고 키보드 단축키를 사용하여 수행됩니다.

이 소프트웨어에는 테스트 버전이 포함되어 있습니다.
http://www.irradiatedsoftware.com/sizeup/


답변

나는 완전한 대답을 얻지 못했지만 오늘은 applescript를 사용 하여이 문제에 대한 적절한 찌르기를 시작했습니다. 다음 Applescript는 거의 절반의 작업을 수행합니다. 모든 데스크탑에서 열려있는 모든 응용 프로그램의 모든 창을보고합니다. 다음 단계는이 모든 것을 파일에 기록한 다음 재부팅 후 창을 재배포하는 스크립트를 구현하는 것입니다.

--This applescript reports a list of application windows present on each desktop
--This is only a sample script intended to eventually be used to restore all application windows to their pre-reboot desktops

tell application "System Events"

    set windows_string to ""
    set numDesktops to (first paragraph of (do shell script "strings ~/Library/Preferences/com.apple.spaces.plist | grep -c ^\\\\$")) + 1
    --the following tcsh command can determine the number of desktops:
    -- @ x = ( `strings ~/Library/Preferences/com.apple.spaces.plist | grep -c '^\$'` + 1 ); echo $x

    -- switch to the first desktop:
    repeat with aDesktop from 1 to numDesktops
        key code 123 using {control down}
    end repeat

    repeat with aDesktop from 1 to numDesktops

        set windows_string to windows_string & return & return & "Desktop " & (aDesktop as string) & return
        delay 1
        get (the name of every application process whose class of windows contains window)

        repeat with P in the result

            set windows_string to windows_string & return & return & P & return

            get (every window of process (contents of P) whose value of attribute "AXMinimized" is false)

            repeat with W in the result

                set window_name to ((name of W) as string)

                --Stickies window names can be multi-line, so this trims from the first hard return onward
                set better_window_name to (my replacePattern:"[\\n].*" inString:window_name usingThis:"")
                if window_name is not equal to "" then
                    try
                        set windows_string to windows_string & better_window_name & return
                    on error
                        set windows_string to windows_string & "couldn't get window name" & return
                    end try
                end if

            end repeat

        end repeat

        --switch to the next desktop
        key code 124 using {control down}

    end repeat

    display dialog "List of windows on this desktop: " & return & return & windows_string

end tell

--Call like this: set res to my replacePattern:"\\s+" inString:"1 subtratcing-these: -2 3 4" usingThis:"-"
use framework "Foundation"
use scripting additions

on replacePattern:thePattern inString:theString usingThis:theTemplate
    set theRegEx to current application's NSRegularExpression's regularExpressionWithPattern:thePattern options:0 |error|:(missing value)
    set theResult to theRegEx's stringByReplacingMatchesInString:theString options:0 range:{location:0, |length|:length of theString} withTemplate:theTemplate
    return theResult as text
end replacePattern:inString:usingThis:

결과 대화 상자가 표시되는 예는 다음과 같습니다.

List of windows on this desktop:



Desktop 1


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
useful commands
System Config Notes
Special characters
Profile where a python scri…
XEMacs Tricks
Terminal Tips


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets


Desktop 2


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
DAI


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets


Desktop 3


iTunes
MiniPlayer


Finder
Searching “Scripts”
Searching “Scripts”
Searching “Scripts”


FluidApp
Found 626 tickets


Stickies
RPST
Issues to resolve with RPST…


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Terminal
Terminal — -csh


TextEdit
Untitled 35.txt
Untitled 34.txt
Untitled 27.txt
Untitled 15.txt


Slack
Slack - Princeton NPLC


Safari
AppleScript: Essential Sub-Routines
Using Applescript to Execute a Complicated Keystroke - Stack Overflow
How to restore windows to their original desktops after reboot? - Ask Different


Script Editor
Untitled.scpt
Untitled 4.scpt
Untitled 3.scpt
paste_file_contents.scpt
Untitled 2.scpt


FluidApp
Found 626 tickets


Automator
Subtract.workflow (Quick Action)


Desktop 4


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
GALAXY


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Terminal
Terminal — -bash
???c7??? 8yc`?h=??'?]b?c??k?k????Ԫ??m??d+ — -bash


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets


Desktop 5


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
TREEVIEW
When you start to work on a…
TreeView stats, legend, & d…
DATE OF SUBMISSION:


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets


Desktop 6


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
ALIZZI


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets


Desktop 7


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
GARCIA


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets


Desktop 8


iTunes
MiniPlayer


FluidApp
Found 626 tickets


Stickies
EMILIA


Messages
Messages (3 unread)


FluidApp
Found 626 tickets


Slack
Slack - Princeton NPLC


FluidApp
Found 626 tickets

답변