화합물만이 아름답고 부품이없는 것은 없습니다. 그리고 전체;
여러 부분은 그 자체가 아니라 아름다움을 가질 것입니다.
그러나 함께 일하면서 총액을주는 것만으로도.
그러나 집계의 아름다움은 세부 사항으로 아름다움을 요구합니다.
추악한 상태로 구성 될 수 없습니다. 그 법은 전체적으로 진행되어야합니다.
- Plotinus, 첫 번째 Ennead
Sublime Text 또는 Atom의 "명령 팔레트"를 사용 했습니까? 이 편집자가 열쇠를 눌렀을 때 열리는 편집자가 할 수있는 모든 목록이며 몇 글자를 입력하여 원하는 조치를 찾습니다. 손가락 끝에는 원시입니다.
Plotinus는 시스템의 모든 애플리케이션 (즉, GTK+ 3 툴킷을 사용하는 사람들에게 해당 전원을 제공합니다. 실행중인 애플리케이션을 내성하여 사용 가능한 모든 명령을 자동으로 추출하고 UI 변경에 즉시 적응하고 관련 조치 만 표시합니다. Plotinus를 사용하면 응용 프로그램 자체를 수정할 필요가 없습니다 !
Ctrl+Shift+P (구성 가능)를 누르면 사업을하고 있습니다. 너무 자연스럽게 느껴져서 곧 당신이 그것없이 어떻게 살았는지 궁금해 할 것입니다.
소스에서 Plotinus를 구축하려면 Git, Cmake, Vala 및 GTK+ 3 개발 파일이 필요합니다. 이 모든 것들은 대부분의 최신 Linux 배포판에서 쉽게 얻을 수 있습니다.
sudo dnf install git cmake vala gtk3-devel
sudo apt-get install git cmake valac libgtk-3-dev
git clone https://github.com/p-e-w/plotinus.git
cd plotinus
mkdir build
cd build
cmake ..
make
sudo make install
Linux 환경 변수를 둘러싼 복잡성과 서투름으로 인해 Plotinus는 현재 자동으로 활성화되지 않습니다. 시스템의 모든 응용 프로그램에 대한 Plotinus를 활성화하는 가장 쉬운 방법은 라인을 추가하는 것입니다.
GTK3_MODULES=[libpath]
[libpath] libplotinus.so 의 완전하고 절대적인 경로 인 /etc/environment 에, 명령을 사용하여 찾을 수 있습니다.
whereis -b libplotinus
또는 개별 응용 프로그램을 사용하여 Plotinus를 사용해 볼 수 있습니다.
GTK3_MODULES=[libpath] application
터미널에서.
Plotinus는 전 세계 및 응용 프로그램 당 모두 구성 할 수 있습니다. 응용 프로그램 설정은 글로벌 설정보다 우선합니다. 아래 명령에서 [application] 도있을 수 있습니다
default ,이 경우 설정이 전 세계적으로 적용되거나/usr/bin/gedit > usr.bin.gedit )로 대체 된 응용 프로그램 실행 파일의 경로. 관련 경로는 프로세스 실행 파일 의 경로이며, 실행 가능한 실행 파일과 항상 동일하지는 않습니다. 예를 들어, 모든 Gnome JavaScript 응용 프로그램은 프로세스 /usr/bin/gjs 실행합니다.
gsettings set com.worldwidemann.plotinus:/com/worldwidemann/plotinus/[application]/ enabled [true/false]
gsettings set com.worldwidemann.plotinus:/com/worldwidemann/plotinus/[application]/ hotkeys '[keys]'
[keys] ["<Primary><Shift>P", "<Primary>P"] gtk_accelerator_parse 기대하는 형식의 문자열 배열이어야합니다. 배열의 각 바로 가기는 명령 팔레트를 엽니 다.
gsettings set com.worldwidemann.plotinus:/com/worldwidemann/plotinus/[application]/ dbus-enabled [true/false]
자세한 내용은 다음 섹션을 참조하십시오.
Plotinus는 자체 소프트웨어에서 기능을 사용하려는 개발자에게 간단하지만 완전한 D-BUS API를 제공합니다. API는 com.worldwidemann.plotinus 의 세션 버스에 노출 된 두 가지 방법으로 구성됩니다.
GetCommands(window_path) -> (bus_name, command_paths)
gtk+ 창의 객체 경로 (예 : meta_window_get_gtk_window_object_path 를 통해 머터 윈도우에서 얻을 수 있음)를 취할 수 있습니다) 해당 창에서 추출한 명령을 참조하는 객체 경로와 등록 된 버스의 이름을 반환합니다.
이 방법의 메커니즘은 Ubuntu의 AppMenu 레지스트라와 다소 유사하지만 Wayland와 더 가볍고 호환됩니다. 이 방법을 사용하기 전에 창 등록을 활성화해야합니다.
ShowCommandPalette(commands) -> (bus_name, command_palette_path)
명령 배열 (양식 (path, label, accelerators) 의 Structs)를 취하고 해당 명령을 표시하는 명령 팔레트 창을 엽니 다. 반환 된 객체 경로는 반환 된 버스 이름에 등록 된 제어 객체를 참조하여 창과 사용자 상호 작용에 대한 신호를 제공합니다.
이 방법에 대한 호출은 Plotinus D-BUS 서비스에 의해 처리되며 시작할 수 있습니다.
plotinus
다음 예제는 Python에서 D-BUS API를 사용하는 방법을 보여줍니다. 그들은 pydbus를 설치하고 Plotinus d-bus 서비스를 실행해야합니다.
#!/usr/bin/env python
import sys
from pydbus import SessionBus
bus = SessionBus ()
plotinus = bus . get ( "com.worldwidemann.plotinus" )
bus_name , command_paths = plotinus . GetCommands ( sys . argv [ 1 ])
commands = [ bus . get ( bus_name , command_path ) for command_path in command_paths ]
for i , command in enumerate ( commands ):
print ( "[%d] %s -> %s" % ( i , " -> " . join ( command . Path ), command . Label ))
index = raw_input ( "Number of command to execute: " )
if index :
commands [ int ( index )]. Execute ()이 예제를 실행하기 전에 Window 등록을 활성화하십시오
gsettings set com.worldwidemann.plotinus:/com/worldwidemann/plotinus/default/ dbus-enabled true
그런 다음 Plotinus가 활성화 된 응용 프로그램 (예 : Gedit)을 실행하십시오. 이제 Window Object Path를 사용하여 스크립트를 인수로 실행하십시오.
./application_remote_control.py /org/gnome/gedit/window/1
이 Argos 플러그인을 기반으로 Plotinus의 명령 팔레트를 사용하여 시스템에서 사용 가능한 응용 프로그램 목록을 표시합니다.
#!/usr/bin/env python
import os , re
from pydbus import SessionBus
from gi . repository import GLib , Gio
applications = {}
for app_info in Gio . AppInfo . get_all ():
categories = app_info . get_categories ()
if categories is None :
continue
# Remove "%U" and "%F" placeholders
command_line = re . sub ( "% \ w" , "" , app_info . get_commandline ()). strip ()
app = ( app_info . get_name (), command_line )
for category in categories . split ( ";" ):
if category not in [ "GNOME" , "GTK" , "" ]:
if category not in applications :
applications [ category ] = []
applications [ category ]. append ( app )
break
commands = []
command_lines = []
for category , apps in sorted ( applications . items ()):
for app in sorted ( apps ):
commands . append (([ category ], app [ 0 ], []))
command_lines . append ( app [ 1 ])
bus = SessionBus ()
plotinus = bus . get ( "com.worldwidemann.plotinus" )
bus_name , command_palette_path = plotinus . ShowCommandPalette ( commands )
command_palette = bus . get ( bus_name , command_palette_path )
loop = GLib . MainLoop ()
def command_executed ( index ):
os . system ( command_lines [ index ])
command_palette . CommandExecuted . connect ( command_executed )
def closed ():
# Wait for CommandExecuted signal
GLib . timeout_add ( 500 , loop . quit )
command_palette . Closed . connect ( closed )
loop . run ()GTK+ 모듈에 대한 문서는 본질적으로 존재하지 않습니다. GTKPARASITE 및 GNOME-GLOBALMENU가 배우지 않으면이 프로젝트를 시작하는 것이 훨씬 어려웠을 것입니다.
CMAKE 모듈은 초등학교의 판테온-인스탈라 저장소에서 구두로 복사됩니다.
Vala는 여전히 Linux 데스크탑 개발에 가장 큰 일입니다.
기고자들은 항상 환영합니다. 그러나 특히 새로운 기능에 대한 풀 요청을 열기 전에 추가하려는 내용을 설명하는 문제를 제출하십시오 ! 나는 내가 원하는 것 (그리고 원하지 않는)에 대한 명확한 비전을 가지고 있으므로 잠재적 인 추가를 논의하면 복제 및 낭비 된 작업을 피하는 데 도움이 될 수 있습니다.
기고함으로써 귀하는 프로젝트의 나머지와 동일한 라이센스로 변경 사항을 공개하는 데 동의합니다 (아래 참조).
Copyright © 2016-2017 Philipp Emanuel Weidmann ([email protected])
GNU 일반 공개 라이센스의 조건에 따라 릴리스, 버전 3