我想寫一個腳本,讓我在屏幕上的特定位置啓動一組特定大小的終端(例如,四個終端分佈在我的屏幕上,每個網格模型都處於活動狀態)。如果已經有一個工具可以做到這一點,那也會很棒......有什麼建議嗎?以特定方式啓動終端?
1
A
回答
3
我相信會有更好的答案,但有一件事我沒有找到有用的是這樣的:
:gnome-terminal --geometry=130x25+20+525
所以我的大屏幕上時,是給我兩個漂亮的終端以下
#!/bin/sh
gnome-terminal --geometry=150x125+20+25
gnome-terminal --geometry=150x125+1020+25
而下面是從man page解釋爲快速參考:
-geometry WIDTHxHEIGHT+XOFF+YOFF
(where WIDTH, HEIGHT, XOFF,
and YOFF are numbers) for specifying a preferred size and location for
this application's main window.
The WIDTH and HEIGHT parts of the geometry specification are usually
measured in either pixels or characters, depending on the application.
The XOFF and YOFF parts are measured in pixels and are used to specify
the distance of the window from the left or right and top and bottom
edges of the screen, respectively. Both types of offsets are measured
from the indicated edge of the screen to the corresponding edge of the
window. The X offset may be specified in the following ways:
+XOFF The left edge of the window is to be placed XOFF pixels in from
the left edge of the screen (i.e., the X coordinate of the win-
dow's origin will be XOFF). XOFF may be negative, in which
case the window's left edge will be off the screen.
-XOFF The right edge of the window is to be placed XOFF pixels in
from the right edge of the screen. XOFF may be negative, in
which case the window's right edge will be off the screen.
The Y offset has similar meanings:
+YOFF The top edge of the window is to be YOFF pixels below the top
edge of the screen (i.e., the Y coordinate of the window's ori-
gin will be YOFF). YOFF may be negative, in which case the
window's top edge will be off the screen.
-YOFF The bottom edge of the window is to be YOFF pixels above the
bottom edge of the screen. YOFF may be negative, in which case
the window's bottom edge will be off the screen.
這種方法非常簡單,使用如下命令:
gnome-terminal -x sh -c "ls|less"
除了上面的命令,一個可以做更多花哨的東西:)例如,你可以把它自己發射到一個特定的目錄(如果您在一個窗口中編輯源代碼並使用另一個窗口調試另一個窗口,則非常有用)。
1
Terminitor是解決此一項目:https://github.com/achiu/terminitor
不幸的是,它沒有GNOME終端支持,但(只是OS X和Konsole的)。
+0
+1謝謝。我正在研究它。 – Legend 2010-11-23 20:52:36
相關問題
- 1. 以編程方式將終端擴展至特定大小
- 2. .emacs編輯以始終在終端模式下啓動Emacs?
- 3. 如何以編程方式啓動控制檯/終端並將其當前目錄更改爲特定路徑?
- 4. Cloud9 IDE - 啓動導軌服務器的終端快捷方式
- 5. 如何以編程方式在Android中啓動特定主頁
- 6. 以特定方式
- 7. 以特定方式
- 8. 如何啓動終端並以編程方式傳遞命令? | Swift3,MACOS
- 9. 從Matlab啓動Linux終端
- 10. 啓動GNOME終端12.04
- 11. 如何以編程方式打開特定的bloomberg終端頁面?
- 12. 使圖像以特定方式移動
- 13. 如何從終端啓動命令以使終端不是父節點?
- 14. 啓用以特定方式調用的類方法
- 15. 的JavaScript以特定方式
- 16. 如何以特定方向啓動外國活動/申請?
- 17. 如何在已打開的特定終端上啓動shell命令?
- 18. 啓動雜種服務器在終端
- 19. 啓動Python腳本終端樹莓派
- 20. 啓動終端時運行腳本
- 21. 終端:shell啓動文件在哪裏?
- 22. 用SSH終端啓動R腳本
- 23. 命令啓動的彩色終端線
- 24. 連接終端並啓動docker組成?
- 25. 從應用程序啓動終端
- 26. 用Bash腳本啓動新終端
- 27. NoClassDefFoundError當從終端啓動時(Java)
- 28. 在新終端中啓動Python腳本
- 29. PATH消失時重新啓動終端
- 30. 如何從終端啓動AppCode?
爲什麼不只是使用平鋪窗口管理器:http://dwm.suckless.org – cthom06 2010-11-23 20:38:03
@ cthom06:+1看起來很有趣。我會研究它。謝謝。 – Legend 2010-11-23 20:52:13