├── .gitignore ├── src ├── lib │ ├── CMakeLists.txt │ ├── albert │ │ ├── resources │ │ │ └── icons │ │ │ │ ├── plugin_ok.png │ │ │ │ ├── plugin_error.png │ │ │ │ ├── plugin_notloaded.png │ │ │ │ └── gear.svg │ │ ├── resources.qrc │ │ ├── include │ │ │ ├── albert.h │ │ │ ├── shlex.h │ │ │ ├── action.h │ │ │ ├── fallbackprovider.h │ │ │ ├── core_globals.h │ │ │ ├── indexable.h │ │ │ ├── standardindexitem.h │ │ │ ├── standardaction.h │ │ │ ├── extension.h │ │ │ ├── standarditem.h │ │ │ └── item.h │ │ ├── src │ │ │ ├── albert │ │ │ │ ├── trayicon.h │ │ │ │ ├── mainwindow │ │ │ │ │ ├── history.h │ │ │ │ │ ├── proposallist.h │ │ │ │ │ ├── settingsbutton.h │ │ │ │ │ ├── resizinglist.h │ │ │ │ │ └── actionlist.h │ │ │ │ ├── matchcompare.h │ │ │ │ ├── settingswidget │ │ │ │ │ ├── grabkeybutton.h │ │ │ │ │ ├── loadermodel.h │ │ │ │ │ └── settingswidget.h │ │ │ │ ├── querymanager.h │ │ │ │ ├── trayicon.cpp │ │ │ │ └── extensionspec.h │ │ │ ├── standardobjects │ │ │ │ ├── standardindexitem.cpp │ │ │ │ ├── standardaction.cpp │ │ │ │ └── standarditem.cpp │ │ │ └── offlineindex │ │ │ │ ├── indeximpl.h │ │ │ │ └── fuzzysearch.h │ │ └── CMakeLists.txt │ ├── xdg │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ ├── export_xdg.h │ │ │ └── xdgiconlookup.h │ │ └── src │ │ │ └── themefileparser.h │ └── globalshortcut │ │ ├── CMakeLists.txt │ │ ├── include │ │ ├── export_globalshortcut.h │ │ └── hotkeymanager.h │ │ └── src │ │ └── hotkeymanager_x11.h ├── plugins │ ├── debug │ │ ├── resources │ │ │ └── debug.png │ │ ├── debug.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ ├── websearch │ │ ├── resources │ │ │ ├── wolfram.png │ │ │ ├── ebay.svg │ │ │ └── wikipedia.svg │ │ ├── metadata.json │ │ ├── websearch.qrc │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── configwidget.h │ │ │ ├── main.h │ │ │ └── enginesmodel.h │ ├── chromebookmarks │ │ ├── resources │ │ │ └── favicon.png │ │ ├── chromebookmarks.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ ├── firefoxbookmarks │ │ ├── resources │ │ │ └── favicon.png │ │ ├── firefoxbookmarks.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ │ └── configwidget.ui │ ├── ssh │ │ ├── ssh.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ │ └── configwidget.ui │ ├── calculator │ │ ├── calculator.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ ├── configwidget.ui │ │ └── src │ │ │ ├── configwidget.cpp │ │ │ ├── configwidget.h │ │ │ └── main.h │ ├── files │ │ ├── files.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── configwidget.h │ │ │ ├── mimetypedialog.h │ │ │ ├── file.h │ │ │ └── main.h │ ├── terminal │ │ ├── terminal.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── configwidget.cpp │ │ │ ├── configwidget.h │ │ │ └── main.h │ │ └── configwidget.ui │ ├── virtualbox │ │ ├── virtualbox.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── vm.h │ │ │ ├── main.h │ │ │ └── vmitem.h │ ├── mpris │ │ ├── resources │ │ │ ├── 1485099680_playback-play.svg │ │ │ ├── 1485100510_primitive-square.svg │ │ │ ├── 1485099690_playback-pause.svg │ │ │ ├── 1485099687_playback-rewind.svg │ │ │ └── 1485099683_playback-fast-forward.svg │ │ ├── metadata.json │ │ ├── mpris.qrc │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ ├── player.h │ │ │ ├── item.h │ │ │ ├── player.cpp │ │ │ └── main.h │ │ └── forms │ │ │ └── configwidget.ui │ ├── applications │ │ ├── applications.qrc │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ ├── system │ │ ├── metadata.json │ │ ├── system.qrc │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ ├── templateExtension │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ └── main.h │ │ └── configwidget.ui │ ├── externalextensions │ │ ├── metadata.json │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── configwidget.h │ │ │ ├── configwidget.cpp │ │ │ ├── main.h │ │ │ ├── externalextensionmodel.h │ │ │ └── externalextension.h │ │ └── configwidget.ui │ ├── CMakeLists.txt │ └── create_plugin.sh └── application │ ├── CMakeLists.txt │ └── main.cpp ├── data ├── albert.desktop ├── SpotlightTemplate.sh ├── ArcTemplate.sh ├── themes │ ├── Spotlight.qss │ ├── Spotlight Dark.qss │ ├── Yosemite.qss │ ├── Yosemite Dark.qss │ ├── Arc Blue.qss │ ├── Arc Grey.qss │ ├── Arc Dark Blue.qss │ └── Arc Dark Grey.qss └── SpotlightTemplate.qss ├── dist ├── changes-0.9.txt ├── changes-0.10.txt ├── changes-0.8.txt └── changes-0.7.txt ├── ISSUE_TEMPLATE.md ├── .travis.yml ├── README.md └── CMakeLists.txt /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user* 2 | build* 3 | LicenseTemplate 4 | packaging 5 | design 6 | .albertignore 7 | 8 | -------------------------------------------------------------------------------- /src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(albert) 2 | add_subdirectory(xdg) 3 | add_subdirectory(globalshortcut) 4 | -------------------------------------------------------------------------------- /src/plugins/debug/resources/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/plugins/debug/resources/debug.png -------------------------------------------------------------------------------- /src/plugins/websearch/resources/wolfram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/plugins/websearch/resources/wolfram.png -------------------------------------------------------------------------------- /src/lib/albert/resources/icons/plugin_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/lib/albert/resources/icons/plugin_ok.png -------------------------------------------------------------------------------- /src/lib/albert/resources/icons/plugin_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/lib/albert/resources/icons/plugin_error.png -------------------------------------------------------------------------------- /src/lib/albert/resources/icons/plugin_notloaded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/lib/albert/resources/icons/plugin_notloaded.png -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/resources/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/plugins/chromebookmarks/resources/favicon.png -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/resources/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/albert/dev/src/plugins/firefoxbookmarks/resources/favicon.png -------------------------------------------------------------------------------- /src/plugins/ssh/ssh.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/ssh.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/debug/debug.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/debug.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/calculator/calculator.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/calc.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/chromebookmarks.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/favicon.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/files/files.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/inode-directory.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/terminal/terminal.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/terminal.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/virtualbox/virtualbox.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/virtualbox.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/firefoxbookmarks.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/favicon.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/mpris/resources/1485099680_playback-play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/plugins/mpris/resources/1485100510_primitive-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/plugins/applications/applications.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/application-x-executable.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plugins/mpris/resources/1485099690_playback-pause.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/plugins/mpris/resources/1485099687_playback-rewind.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/plugins/mpris/resources/1485099683_playback-fast-forward.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/albert.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Categories=Utility; 4 | Comment=A desktop agnostic launcher 5 | Exec=albert 6 | GenericName=Launcher 7 | Icon=albert 8 | Name=Albert 9 | StartupNotify=false 10 | Type=Application 11 | Version=1.0 12 | -------------------------------------------------------------------------------- /src/plugins/mpris/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.mpris", 3 | "name" : "MPRIS Control", 4 | "version" : "1.0", 5 | "platform" : "Linux", 6 | "group" : "Extensions", 7 | "author" : "Martin Buergmann", 8 | "dependencies" : ["dbus-daemon"] 9 | } 10 | -------------------------------------------------------------------------------- /src/plugins/debug/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.debug", 3 | "name" : "Debug", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": false 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/files/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.files", 3 | "name" : "Files", 4 | "version" : "1.1", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/ssh/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.ssh", 3 | "name" : "Secure Shell", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/system/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.system", 3 | "name" : "System", 4 | "version" : "1.0", 5 | "platform" : "Linux", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/terminal/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.terminal", 3 | "name" : "Terminal", 4 | "version" : "1.0", 5 | "platform" : "Linux", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/websearch/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.websearch", 3 | "name" : "WebSearch", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/templateExtension/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.projectid", 3 | "name" : "Template", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Author missing", 8 | "dependencies" : [], 9 | "enabledbydefault": false 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/applications/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.applications", 3 | "name" : "Applications", 4 | "version" : "1.1", 5 | "platform" : "Linux", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : ["gksu"], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/calculator/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.calculator", 3 | "name" : "Calculator", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : ["libmuparser"], 9 | "enabledbydefault": true 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.chromebookmarks", 3 | "name" : "Chrome bookmarks", 4 | "version" : "1.0", 5 | "platform" : "Linux", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": false 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/virtualbox/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.virtualbox", 3 | "name" : "VirtualBox", 4 | "version" : "1.0", 5 | "platform" : "Linux", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : ["virtualbox"], 9 | "enabledbydefault": false 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.externalextensions", 3 | "name" : "External extensions", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Manuel Schneider", 8 | "dependencies" : [], 9 | "enabledbydefault": false 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "org.albert.extension.firefoxbookmarks", 3 | "name" : "Firefox bookmarks", 4 | "version" : "1.0", 5 | "platform" : "All", 6 | "group" : "Extensions", 7 | "author" : "Martin Buergmann, Manuel Schneider", 8 | "dependencies" : ["firefox"], 9 | "enabledbydefault": false 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/system/system.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/poweroff.svg 4 | resources/reboot.svg 5 | resources/suspend.svg 6 | resources/hibernate.svg 7 | resources/lock.svg 8 | resources/logout.svg 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/plugins/mpris/mpris.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/1485099680_playback-play.svg 4 | resources/1485099683_playback-fast-forward.svg 5 | resources/1485099687_playback-rewind.svg 6 | resources/1485099690_playback-pause.svg 7 | resources/1485100510_primitive-square.svg 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/application/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(albert) 4 | 5 | # Define the target 6 | add_executable(${PROJECT_NAME} main.cpp) 7 | 8 | # Link target to libraries 9 | target_link_libraries(${PROJECT_NAME} albertcore) 10 | 11 | # Set the RPATH for the library lookup 12 | set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/albert") 13 | 14 | # Install target 15 | install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) 16 | 17 | -------------------------------------------------------------------------------- /dist/changes-0.9.txt: -------------------------------------------------------------------------------- 1 | The v0.9 release contains two new extensions, some improvements and bugfixes 2 | 3 | A more detailed list of changes follows below. If you want to know the exact 4 | and complete list of changes, you can check out the sources and check the logs. 5 | 6 | Features: 7 | * New extension: "External extensions", run external scripts 8 | * New extension: "Firefox bookmarks", make firefox bookmarks acessible by albert 9 | * Improvements on the VBox extension 10 | * Several fixes. For details check the git log. 11 | -------------------------------------------------------------------------------- /src/lib/albert/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/icons/plugin_error.png 4 | resources/icons/plugin_notloaded.png 5 | resources/icons/plugin_ok.png 6 | resources/icons/albert.svg 7 | resources/icons/gear.svg 8 | resources/icons/unknown.svg 9 | 10 | 11 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | - Operating system 12 | - Desktop environment 13 | - Qt version 14 | - Albert version 15 | - How you installed Albert (e.g. ppa:name, aur or from source) 16 | - Steps to reproduce 17 | - Expected behaviour 18 | - Actual behaviour 19 | -------------------------------------------------------------------------------- /src/plugins/websearch/websearch.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resources/amazon.svg 4 | resources/default.svg 5 | resources/ebay.svg 6 | resources/google.svg 7 | resources/youtube.svg 8 | resources/octocat.svg 9 | resources/wikipedia.svg 10 | resources/wolfram.png 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/lib/albert/resources/icons/gear.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | sudo: required 3 | dist: trusty 4 | compiler: 5 | - clang 6 | - gcc 7 | 8 | before_install: 9 | - sudo apt-get install -qq cmake qtbase5-dev libqt5x11extras5-dev libqt5svg5-dev libmuparser-dev 10 | 11 | before_script: 12 | - mkdir build 13 | - cd build 14 | - cmake .. -DCMAKE_BUILD_TYPE=Release 15 | 16 | script: 17 | - make 18 | # Test installation process 19 | - make DESTDIR=/tmp/albertbuild install 20 | 21 | notifications: 22 | irc: 23 | channels: 24 | - "chat.freenode.net#albertlauncher" 25 | on_success: never # default: always 26 | on_failure: always # default: always 27 | -------------------------------------------------------------------------------- /data/SpotlightTemplate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TEMPLATE="SpotlightTemplate.qss" 4 | 5 | function makeStyle(){ 6 | cat "$1" | sed \ 7 | -e "s/%background_color%/$2/g" \ 8 | -e "s/%foreground_color%/$3/g" \ 9 | -e "s/%button_color%/$4/g" \ 10 | -e "s/%scroll_color%/$5/g" \ 11 | -e "s/%selection_foreground_color%/$6/g"\ 12 | -e "s/%selection_background_color%/$7/g" > "${8}" 13 | } 14 | 15 | #makeStyle bg fg button scroll sel_fg sel_bg output 16 | makeStyle "$TEMPLATE" "fcfcfc" "808080" "e0e0e0" "c0c0c0" "606060" "e0e0e0" "${1}Spotlight.qss" 17 | makeStyle "$TEMPLATE" "030303" "808080" "202020" "404040" "a0a0a0" "202020" "${1}Spotlight Dark.qss" 18 | -------------------------------------------------------------------------------- /dist/changes-0.10.txt: -------------------------------------------------------------------------------- 1 | The v0.10 release contains a new extension, some features for others and bugfixes 2 | 3 | A more detailed list of changes follows below. If you want to know the exact 4 | and complete list of changes, you can check out the sources and check the logs. 5 | 6 | Features: 7 | * New extension: "MPRIS", control your music player 8 | * completion to expand input by a text set by the selected item. 9 | * Mouse wheel scrollable history in the input box 10 | * New themes 11 | * Terminal extension now indexes aliases too 12 | * Files extension handles paths (input beginning with '/' or '~/') 13 | * App extension allows to ignore the `OnlyShowIn` and `NotShowIn` keys 14 | * New native extension cloning script in pyhton 15 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(externalextensions) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | ) 10 | 11 | qt5_wrap_ui(UI 12 | configwidget.ui 13 | ) 14 | 15 | # Define the target 16 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI}) 17 | 18 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 19 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 20 | 21 | # Link target to libraries 22 | target_link_libraries(${PROJECT_NAME} 23 | ${Qt5Widgets_LIBRARIES} 24 | albertcore 25 | xdg 26 | ) 27 | 28 | # Install target 29 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 30 | -------------------------------------------------------------------------------- /src/plugins/templateExtension/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(projectid) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | ) 10 | 11 | set(LIB 12 | ${Qt5Widgets_LIBRARIES} 13 | albertcore 14 | ) 15 | 16 | qt5_wrap_ui(UI 17 | configwidget.ui 18 | ) 19 | 20 | # Define the target 21 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI}) 22 | 23 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 24 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 25 | 26 | # Link target to libraries 27 | target_link_libraries(${PROJECT_NAME} ${LIB}) 28 | 29 | # Install target 30 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 31 | -------------------------------------------------------------------------------- /src/plugins/mpris/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.11) 2 | 3 | PROJECT(mpris) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | DBus 10 | ) 11 | 12 | qt5_wrap_ui(UI 13 | forms/configwidget.ui 14 | ) 15 | 16 | # Define the target 17 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI}) 18 | 19 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 20 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 21 | 22 | # Link target to libraries 23 | target_link_libraries(${PROJECT_NAME} 24 | ${Qt5Widgets_LIBRARIES} 25 | ${Qt5DBus_LIBRARIES} 26 | albertcore 27 | xdg 28 | ) 29 | 30 | # Install target 31 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 32 | -------------------------------------------------------------------------------- /src/plugins/virtualbox/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(virtualbox) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | Xml 10 | ) 11 | 12 | qt5_add_resources(QRC 13 | ${PROJECT_NAME}.qrc 14 | ) 15 | 16 | # Define the target 17 | add_library(${PROJECT_NAME} SHARED ${SRC} ${QRC}) 18 | 19 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 20 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 21 | 22 | # Link target to libraries 23 | target_link_libraries(${PROJECT_NAME} 24 | ${Qt5Widgets_LIBRARIES} 25 | ${Qt5Xml_LIBRARIES} 26 | albertcore 27 | xdg 28 | ) 29 | 30 | # Install target 31 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 32 | -------------------------------------------------------------------------------- /src/plugins/ssh/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(ssh) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | ) 10 | 11 | qt5_wrap_ui(UI 12 | configwidget.ui 13 | ) 14 | 15 | qt5_add_resources(QRC 16 | ${PROJECT_NAME}.qrc 17 | ) 18 | 19 | # Define the target 20 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 21 | 22 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 23 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 24 | 25 | # Link target to libraries 26 | target_link_libraries(${PROJECT_NAME} 27 | ${Qt5Widgets_LIBRARIES} 28 | albertcore 29 | xdg 30 | ) 31 | 32 | # Install target 33 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 34 | -------------------------------------------------------------------------------- /src/plugins/debug/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(debug) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | ) 10 | 11 | set(LIB 12 | ${Qt5Widgets_LIBRARIES} 13 | albertcore 14 | ) 15 | 16 | qt5_add_resources(QRC 17 | ${PROJECT_NAME}.qrc 18 | ) 19 | 20 | qt5_wrap_ui(UI configwidget.ui) 21 | 22 | # Define the target 23 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 24 | 25 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 26 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 27 | 28 | # Link target to libraries 29 | target_link_libraries(${PROJECT_NAME} ${LIB}) 30 | 31 | # Install target 32 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Albert [![Build Status](https://api.travis-ci.org/albertlauncher/albert.svg?branch=dev)](https://travis-ci.org/albertlauncher/albert) 2 | 3 | [![IRC](https://img.shields.io/badge/chat-on%20freenode-brightgreen.svg)](http://webchat.freenode.net/?channels=%23albertlauncher) 4 | [![Telegram news channel](https://img.shields.io/badge/news%20channel-telegram-0088cc.svg?style=flat)](https://telegram.me/albertlauncher) 5 | [![Telegram community chat](https://img.shields.io/badge/chat-telegram-0088cc.svg?style=flat)](https://telegram.me/albert_launcher_community) 6 | 7 | Access everything with virtually zero effort. Run applications, open files or their paths, open bookmarks in your browser, search the web, calculate things and a lot more. See the [docs](https://albertlauncher.github.io/docs) for more information. 8 | -------------------------------------------------------------------------------- /src/plugins/system/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(system) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | ) 10 | 11 | qt5_wrap_ui(UI 12 | configwidget.ui 13 | ) 14 | 15 | qt5_add_resources(QRC 16 | ${PROJECT_NAME}.qrc 17 | ) 18 | 19 | # Define the target 20 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 21 | 22 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 23 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 24 | 25 | # Link target to libraries 26 | target_link_libraries(${PROJECT_NAME} 27 | ${Qt5Widgets_LIBRARIES} 28 | albertcore 29 | xdg 30 | ) 31 | 32 | # Install target 33 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 34 | -------------------------------------------------------------------------------- /src/plugins/websearch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(websearch) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Widgets 9 | ) 10 | 11 | qt5_wrap_ui(UI 12 | configwidget.ui 13 | ) 14 | 15 | qt5_add_resources(QRC 16 | ${PROJECT_NAME}.qrc 17 | ) 18 | 19 | # Define the target 20 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 21 | 22 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 23 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 24 | 25 | # Link target to libraries 26 | target_link_libraries(${PROJECT_NAME} 27 | ${Qt5Widgets_LIBRARIES} 28 | albertcore 29 | xdg 30 | ) 31 | 32 | # Install target 33 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 34 | -------------------------------------------------------------------------------- /src/plugins/calculator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(calculator) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS Widgets) 8 | 9 | qt5_add_resources(QRC 10 | ${PROJECT_NAME}.qrc 11 | ) 12 | 13 | qt5_wrap_ui(UI 14 | configwidget.ui 15 | ) 16 | 17 | # Define the target 18 | add_library(${PROJECT_NAME} SHARED ${SRC} ${QRC} ${UI}) 19 | 20 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 21 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 22 | 23 | # Link target to libraries 24 | target_link_libraries(${PROJECT_NAME} 25 | ${Qt5Widgets_LIBRARIES} 26 | albertcore 27 | muparser 28 | xdg 29 | ) 30 | 31 | # Install target 32 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 33 | -------------------------------------------------------------------------------- /src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Do not export symbols by default 2 | set(CMAKE_CXX_VISIBILITY_PRESET hidden) 3 | set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) 4 | 5 | # Set the RPATH for the library lookup 6 | set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/albert") 7 | 8 | add_subdirectory(applications) 9 | add_subdirectory(calculator) 10 | add_subdirectory(chromebookmarks) 11 | add_subdirectory(externalextensions) 12 | add_subdirectory(files) 13 | add_subdirectory(firefoxbookmarks) 14 | add_subdirectory(ssh) 15 | add_subdirectory(mpris) 16 | add_subdirectory(system) 17 | add_subdirectory(terminal) 18 | add_subdirectory(virtualbox) 19 | add_subdirectory(websearch) 20 | 21 | # Non-release plugins 22 | if(${BUILD_DEBUG_EXTENSIONS}) 23 | add_subdirectory(templateExtension) 24 | add_subdirectory(debug) 25 | endif(${BUILD_DEBUG_EXTENSIONS}) 26 | 27 | -------------------------------------------------------------------------------- /src/plugins/terminal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(terminal) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Concurrent 9 | Widgets 10 | ) 11 | 12 | qt5_add_resources(QRC 13 | ${PROJECT_NAME}.qrc 14 | ) 15 | 16 | qt5_wrap_ui(UI 17 | configwidget.ui 18 | ) 19 | 20 | # Define the target 21 | add_library(${PROJECT_NAME} SHARED ${SRC} ${QRC} ${UI}) 22 | 23 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 24 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 25 | 26 | # Link target to libraries 27 | target_link_libraries(${PROJECT_NAME} 28 | ${Qt5Widgets_LIBRARIES} 29 | ${Qt5Concurrent_LIBRARIES} 30 | albertcore 31 | xdg 32 | ) 33 | 34 | # Install target 35 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 36 | -------------------------------------------------------------------------------- /src/plugins/terminal/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | -------------------------------------------------------------------------------- /src/plugins/applications/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(applications) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Concurrent 9 | Widgets 10 | ) 11 | 12 | qt5_add_resources(QRC 13 | ${PROJECT_NAME}.qrc 14 | ) 15 | 16 | qt5_wrap_ui(UI 17 | configwidget.ui 18 | ) 19 | 20 | # Define the target 21 | add_library(${PROJECT_NAME} SHARED ${SRC} ${QRC} ${UI}) 22 | 23 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 24 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 25 | 26 | # Link target to libraries 27 | target_link_libraries(${PROJECT_NAME} 28 | ${Qt5Concurrent_LIBRARIES} 29 | ${Qt5Widgets_LIBRARIES} 30 | albertcore 31 | xdg 32 | ) 33 | 34 | # Install target 35 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 36 | 37 | -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(chromebookmarks) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Concurrent 9 | Widgets 10 | ) 11 | 12 | qt5_wrap_ui(UI 13 | configwidget.ui 14 | ) 15 | 16 | qt5_add_resources(QRC 17 | ${PROJECT_NAME}.qrc 18 | ) 19 | 20 | # Define the target 21 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 22 | 23 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 24 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 25 | 26 | # Link target to libraries 27 | target_link_libraries(${PROJECT_NAME} 28 | ${Qt5Concurrent_LIBRARIES} 29 | ${Qt5Widgets_LIBRARIES} 30 | albertcore 31 | xdg 32 | ) 33 | 34 | # Install target 35 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 36 | -------------------------------------------------------------------------------- /src/plugins/files/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(files) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Concurrent 9 | Widgets 10 | ) 11 | 12 | qt5_add_resources(QRC 13 | ${PROJECT_NAME}.qrc 14 | ) 15 | 16 | qt5_wrap_ui(UI 17 | forms/configwidget.ui 18 | forms/mimetypedialog.ui 19 | ) 20 | 21 | # Define the target 22 | add_library(${PROJECT_NAME} SHARED ${SRC} ${QRC} ${UI}) 23 | 24 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 25 | target_include_directories(${PROJECT_NAME} PRIVATE src/ forms/) 26 | 27 | # Link target to libraries 28 | target_link_libraries(${PROJECT_NAME} 29 | ${Qt5Concurrent_LIBRARIES} 30 | ${Qt5Widgets_LIBRARIES} 31 | albertcore 32 | xdg 33 | ) 34 | 35 | # Install target 36 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 37 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | PROJECT(firefoxbookmarks) 4 | 5 | FILE(GLOB_RECURSE SRC src/* metadata.json) 6 | 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Concurrent 9 | Sql 10 | Widgets 11 | ) 12 | 13 | qt5_wrap_ui(UI 14 | configwidget.ui 15 | ) 16 | 17 | qt5_add_resources(QRC 18 | ${PROJECT_NAME}.qrc 19 | ) 20 | 21 | # Define the target 22 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 23 | 24 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 25 | target_include_directories(${PROJECT_NAME} PRIVATE src/) 26 | 27 | # Link target to libraries 28 | target_link_libraries(${PROJECT_NAME} 29 | ${Qt5Concurrent_LIBRARIES} 30 | ${Qt5Sql_LIBRARIES} 31 | ${Qt5Widgets_LIBRARIES} 32 | albertcore 33 | xdg 34 | ) 35 | 36 | # Install target 37 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert/plugins) 38 | -------------------------------------------------------------------------------- /src/application/main.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "albert.h" 18 | 19 | int main(int argc, char **argv) { 20 | return Albert::run(argc, argv); 21 | } 22 | -------------------------------------------------------------------------------- /src/lib/xdg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(xdg) 4 | add_definitions(-DXDG) #export branch 5 | 6 | # Get Qt libraries 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 8 | Core 9 | Gui 10 | ) 11 | 12 | # List files in the source directory 13 | FILE(GLOB SRC src/* include/*) 14 | 15 | # Do not export symbols by default 16 | set(CMAKE_CXX_VISIBILITY_PRESET hidden) 17 | set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) 18 | 19 | # Define the target 20 | add_library(${PROJECT_NAME} SHARED ${SRC}) 21 | 22 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 23 | target_include_directories(${PROJECT_NAME} 24 | PUBLIC include/ 25 | PRIVATE src/ 26 | ) 27 | 28 | # Link target to libraries 29 | target_link_libraries(${PROJECT_NAME} 30 | PRIVATE 31 | ${Qt5Core_LIBRARIES} 32 | ${Qt5Gui_LIBRARIES} 33 | ) 34 | 35 | # Install target 36 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert) 37 | -------------------------------------------------------------------------------- /src/lib/albert/include/albert.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include "core_globals.h" 19 | 20 | namespace Albert { 21 | int EXPORT_CORE run(int argc, char **argv); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /data/ArcTemplate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TEMPLATE="ArcTemplate.qss" 4 | 5 | function makeStyle(){ 6 | cat "$1" | sed \ 7 | -e "s/%background_color%/$2/g" \ 8 | -e "s/%foreground_color%/$3/g" \ 9 | -e "s/%inputline_color%/$4/g" \ 10 | -e "s/%border_color%/$5/g" \ 11 | -e "s/%button_color%/$6/g" \ 12 | -e "s/%scroll_color%/$7/g" \ 13 | -e "s/%selection_background_color%/$8/g" \ 14 | -e "s/%selection_border_color%/$9/g" > "${10}" 15 | } 16 | 17 | #makeStyle bg fg input border button scrollbar sel_bg sel_border output 18 | makeStyle "$TEMPLATE" "e7e8eb" "727A8F" "fdfdfd" "CFD6E6" "ffffff" "b8babf" "95c4fb" "cfd6e6" "themes/Arc Blue.qss" 19 | makeStyle "$TEMPLATE" "e7e8eb" "727A8F" "fdfdfd" "CFD6E6" "ffffff" "b8babf" "F5F6F7" "4084D6" "themes/Arc Grey.qss" 20 | makeStyle "$TEMPLATE" "383C4A" "AFB8C5" "404552" "21252B" "ffffff" "b8babf" "4084D6" "4084D6" "themes/Arc Dark Blue.qss" 21 | makeStyle "$TEMPLATE" "383C4A" "AFB8C5" "404552" "21252B" "ffffff" "b8babf" "404552" "2B2E39" "themes/Arc Dark Grey.qss" -------------------------------------------------------------------------------- /dist/changes-0.8.txt: -------------------------------------------------------------------------------- 1 | The v0.8 release contains a new extension, some features for others and bugfixes 2 | 3 | A more detailed list of changes follows below. If you want to know the exact 4 | and complete list of changes, you can check out the sources and check the logs. 5 | 6 | Features: 7 | * Triggers: Extensions can request to be the sole extension to be run 8 | * Websearch: Order of fallbacks are now movable 9 | * New extension: "System" , control your systems state 10 | 11 | Fixes: 12 | * Current screen. Remember window position. Closes #8 13 | * Please allow fuzzy matching of spaces to underscores #40: 14 | * Remember position if not centered. Closes #33 15 | * Terminate application gracefully on SIGTERM. Closes #65 16 | * Fix fuzzy. Closes #59 17 | * Index text files too. Closes #60 18 | * Drop unneccesary Qt5.5 dependencies. Closes #58 19 | * Check if $XDG_DATA_DIRS exist. Closes #63 20 | * Move after showing widget. Closes #66 21 | * Terminate application gracefully on SIGTERM. Closes #12 22 | * Escape Exec key string in dektop file. Closes #75. 23 | -------------------------------------------------------------------------------- /src/plugins/calculator/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Calculator::ConfigWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | 15 | 16 | 17 | Show group separators 18 | 19 | 20 | 21 | 22 | 23 | 24 | Qt::Vertical 25 | 26 | 27 | 28 | 20 29 | 40 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/plugins/calculator/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | Calculator::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/plugins/applications/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace Applications 22 | { 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ConfigWidget(QWidget *parent = 0); 28 | Ui::ConfigWidget ui; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /src/plugins/calculator/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace Calculator { 22 | 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ConfigWidget(QWidget *parent = 0); 28 | Ui::ConfigWidget ui; 29 | }; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/lib/albert/include/shlex.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "core_globals.h" 21 | 22 | namespace Util { 23 | 24 | class EXPORT_CORE ShellLexer 25 | { 26 | public: 27 | static QString quote(QString input); 28 | static QStringList split(const QString &input); 29 | 30 | }; 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/plugins/system/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace System { 22 | class ConfigWidget final : public QWidget 23 | { 24 | Q_OBJECT 25 | public: 26 | explicit ConfigWidget(QWidget *parent = 0); 27 | ~ConfigWidget(); 28 | Ui::ConfigWidget ui; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /src/plugins/ssh/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace Ssh { 22 | 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ConfigWidget(QWidget *parent = 0); 28 | ~ConfigWidget(); 29 | Ui::ConfigWidget ui; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/plugins/mpris/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert extension mpris - a mpris interface plugin for albert 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace MPRIS { 22 | class ConfigWidget final : public QWidget 23 | { 24 | Q_OBJECT 25 | public: 26 | explicit ConfigWidget(QWidget *parent = 0); 27 | ~ConfigWidget(); 28 | Ui::ConfigWidget ui; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/trayicon.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | 22 | class TrayIcon : public QSystemTrayIcon 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | 28 | TrayIcon(); 29 | 30 | void setVisible(bool = true); 31 | 32 | signals: 33 | 34 | void stateChanged(bool); 35 | }; 36 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace FirefoxBookmarks { 22 | class ConfigWidget final : public QWidget 23 | { 24 | Q_OBJECT 25 | public: 26 | explicit ConfigWidget(QWidget *parent = 0); 27 | ~ConfigWidget(); 28 | Ui::ConfigWidget ui; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /src/plugins/templateExtension/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace ProjectNamespace { 22 | class ConfigWidget final : public QWidget 23 | { 24 | Q_OBJECT 25 | public: 26 | explicit ConfigWidget(QWidget *parent = 0); 27 | ~ConfigWidget(); 28 | Ui::ConfigWidget ui; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace ExternalExtensions { 22 | 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ConfigWidget(QWidget *parent = 0); 28 | ~ConfigWidget(); 29 | Ui::ConfigWidget ui; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/plugins/terminal/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace Terminal { 22 | 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | 27 | public: 28 | 29 | ConfigWidget(QWidget *parent) : QWidget(parent) { 30 | ui.setupUi(this); 31 | } 32 | 33 | Ui::ConfigWidget ui; 34 | 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/plugins/ssh/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | Ssh::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | } 23 | 24 | 25 | 26 | /** ***************************************************************************/ 27 | Ssh::ConfigWidget::~ConfigWidget() { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/plugins/system/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | System::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | } 23 | 24 | 25 | 26 | /** ***************************************************************************/ 27 | System::ConfigWidget::~ConfigWidget() { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /dist/changes-0.7.txt: -------------------------------------------------------------------------------- 1 | The v0.7 release contains the new plugin based backend and bugfixes. 2 | 3 | A more detailed list of changes follows below. If you want to know the exact 4 | and complete list of changes, you can check out the sources and check the logs. 5 | 6 | Core: 7 | * Fix fuzzy 8 | * New directory structure 9 | * Ignore folders .albertignore 10 | * Actions. (tab switches to alternative actions, if any) 11 | 12 | Applications extension: 13 | * Port to plugin infrastucture 14 | * Fix: AppIndex needs rebuilding every time. Closes #45 15 | * Quicklist actions 16 | 17 | Files extension: 18 | * Port to plugin infrastucture 19 | * Filter indexed files by type 20 | * Let the index be build in background thread 21 | * Follow Symlinks 22 | * Fix: Scan interval overrun bug 23 | * Fix: Can't open files with spaces in the filepath. Closes #35 24 | * Detect link loops 25 | 26 | Websearch extension: 27 | * Port to plugin infrastucture 28 | 29 | Bookmarks extension: 30 | * Port to plugin infrastucture 31 | * Fix: Path to bookmarks file not intialized correctly. Closes #44 32 | 33 | Calculator extension: 34 | * Port to plugin infrastucture 35 | * Fix: Internationalisation in calculator module. Closes #46 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/plugins/mpris/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert extension mpris - a mpris interface plugin for albert 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | MPRIS::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | } 23 | 24 | 25 | 26 | /** ***************************************************************************/ 27 | MPRIS::ConfigWidget::~ConfigWidget() { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/plugins/debug/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | #include "main.h" 21 | 22 | namespace Debug 23 | { 24 | class ConfigWidget final : public QWidget 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | 30 | explicit ConfigWidget(Extension * extension_, QWidget * parent = 0); 31 | 32 | private: 33 | 34 | Ui::ConfigWidget ui; 35 | Extension * extension_; 36 | 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | FirefoxBookmarks::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | } 23 | 24 | 25 | 26 | /** ***************************************************************************/ 27 | FirefoxBookmarks::ConfigWidget::~ConfigWidget() { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/plugins/templateExtension/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | ProjectNamespace::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | } 23 | 24 | 25 | 26 | /** ***************************************************************************/ 27 | ProjectNamespace::ConfigWidget::~ConfigWidget() { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/plugins/create_plugin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | usage(){ 4 | echo "Usage:" 5 | echo "$0 " 6 | } 7 | 8 | if [ ! $# -eq 3 ]; then 9 | usage 10 | exit 1 11 | fi 12 | 13 | ID="$1" 14 | NAMESPACE="$2" 15 | PRETTY="$3" 16 | 17 | if [[ ! "$ID" =~ ^[a-z0-9]+$ ]]; then 18 | echo -e "\e[31mid has to be alphanumeric and all lowercase\e[0m" 19 | usage 20 | exit 1 21 | fi 22 | 23 | if [[ ! "$NAMESPACE" =~ ^[A-Za-z][A-Za-z0-9]+$ ]]; then 24 | echo -e "\e[31mNamespace id has to be alphanumeric and must not begin with a number\e[0m" 25 | usage 26 | exit 1 27 | fi 28 | 29 | 30 | echo "Clone template" 31 | cp -r "templateExtension" "$ID" 32 | 33 | echo "Adjust metadata.json" 34 | sed -e "s/template/${ID}/" -e "s/Template/${PRETTY}/" "templateExtension/metadata.json" > "${ID}/metadata.json" 35 | 36 | echo "Adjust CMakeListss.txt" 37 | sed -e "s/template/${ID}/" "templateExtension/CMakeLists.txt" > "${ID}/CMakeLists.txt" 38 | 39 | echo "Adjust namespaces" 40 | 41 | 42 | for FILE in $( ls templateExtension | grep -e ".cpp$" -e ".h$" -e ".ui$" ); do 43 | sed \ 44 | -e "s/namespace Template/namespace ${NAMESPACE}/" \ 45 | -e "s/Template::/${NAMESPACE}::/" \ 46 | "templateExtension/${FILE}" > "${ID}/${FILE}" 47 | done 48 | -------------------------------------------------------------------------------- /src/plugins/mpris/src/player.h: -------------------------------------------------------------------------------- 1 | // albert extension mpris - a mpris interface plugin for albert 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace MPRIS { 22 | 23 | class Player 24 | { 25 | public: 26 | Player(QString& busid); 27 | const QString& getName() const { return name_; } 28 | const QString& getBusId() const { return busid_; } 29 | bool canRaise() const { return canRaise_; } 30 | 31 | private: 32 | QString busid_, name_; 33 | bool canRaise_; 34 | }; 35 | 36 | } // namespace MPRIS 37 | 38 | -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace ChromeBookmarks { 22 | 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ConfigWidget(QWidget *parent = 0); 28 | ~ConfigWidget(); 29 | Ui::ConfigWidget ui; 30 | 31 | private: 32 | void onButton_EditPath(); 33 | 34 | signals: 35 | void requestEditPath(const QString&); 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /src/lib/albert/include/action.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "core_globals.h" 20 | 21 | namespace Core { 22 | 23 | /** 24 | * @brief The action interface 25 | * A base class for actions (and items) 26 | */ 27 | class EXPORT_CORE Action 28 | { 29 | public: 30 | 31 | virtual ~Action() {} 32 | 33 | /** A description */ 34 | virtual QString text() const = 0; 35 | 36 | /** Activates the item */ 37 | virtual void activate() = 0; 38 | }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/lib/albert/src/standardobjects/standardindexitem.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "standardindexitem.h" 18 | using std::vector; 19 | using namespace Core; 20 | 21 | StandardIndexItem::StandardIndexItem(const QString &id) : StandardItem(id) { 22 | 23 | } 24 | 25 | std::vector StandardIndexItem::indexKeywords() const { 26 | return indexKeywords_; 27 | } 28 | 29 | void StandardIndexItem::setIndexKeywords(vector &&indexKeywords) { 30 | indexKeywords_ = indexKeywords; 31 | } 32 | -------------------------------------------------------------------------------- /src/lib/xdg/include/export_xdg.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | 19 | #if defined(_MSC_VER) 20 | #define EXPORT __declspec(dllexport) 21 | #define IMPORT __declspec(dllimport) 22 | #elif defined(__GNUC__) 23 | #define EXPORT __attribute__((visibility("default"))) 24 | #define IMPORT 25 | #else 26 | #define EXPORT 27 | #define IMPORT 28 | #pragma warning Unknown dynamic link import/export semantics. 29 | #endif 30 | 31 | #ifdef XDG 32 | #define EXPORT_XDG EXPORT 33 | #else 34 | #define EXPORT_XDG IMPORT 35 | #endif 36 | -------------------------------------------------------------------------------- /src/plugins/virtualbox/src/vm.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | 19 | #include 20 | #include "vmitem.h" 21 | 22 | namespace VirtualBox { 23 | 24 | class VM 25 | { 26 | public: 27 | VM(const QString vboxFileName); 28 | VMItem* produceItem() const; 29 | bool startsWith(QString other) const; 30 | const QString &uuid() const { return uuid_; } 31 | void probeState() const; 32 | 33 | private: 34 | QString name_; 35 | QString uuid_; 36 | mutable QString state_; 37 | }; 38 | 39 | } // namespace VirtualBox 40 | 41 | -------------------------------------------------------------------------------- /src/lib/albert/include/fallbackprovider.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "core_globals.h" 22 | 23 | namespace Core { 24 | 25 | class Item; 26 | 27 | class EXPORT_CORE FallbackProvider 28 | { 29 | public: 30 | 31 | virtual ~FallbackProvider() {} 32 | 33 | /** 34 | * @brief Fallbacks 35 | * This items show up if a query yields no results 36 | */ 37 | virtual std::vector> fallbacks(const QString &) = 0; 38 | 39 | }; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/mainwindow/history.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | 21 | class History final : public QObject 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | 27 | History(QObject *parent = 0); 28 | 29 | Q_INVOKABLE void add(QString str); 30 | Q_INVOKABLE QString next(); 31 | Q_INVOKABLE QString prev(); 32 | Q_INVOKABLE void resetIterator(); 33 | 34 | private: 35 | 36 | void updateHistory(); 37 | 38 | QStringList lines_; 39 | int currentLine_; 40 | 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /src/plugins/applications/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include 18 | #include "configwidget.h" 19 | 20 | /** ***************************************************************************/ 21 | Applications::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 22 | ui.setupUi(this); 23 | 24 | // Show the app dirs in the label 25 | QStringList standardPaths = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation); 26 | ui.label->setText(ui.label->text().replace("__XDG_DATA_DIRS__", standardPaths.join(", "))); 27 | } 28 | -------------------------------------------------------------------------------- /src/lib/globalshortcut/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(globalshortcut) 4 | add_definitions(-DGLOBALSHORTCUT) #export branch 5 | 6 | # Get Qt libraries 7 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS Gui) 8 | 9 | # List files in the source directory 10 | set(SRC 11 | include/export_globalshortcut.h 12 | include/hotkeymanager.h 13 | src/hotkeymanager.cpp 14 | ) 15 | 16 | set(LIB 17 | ${Qt5Gui_LIBRARIES} 18 | ) 19 | 20 | # Do platform specific pre target stuff 21 | if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 22 | 23 | find_package(Qt5 5.2.0 REQUIRED X11Extras) 24 | 25 | set(SRC ${SRC} src/hotkeymanager_x11.cpp) 26 | set(LIB ${LIB} ${Qt5X11Extras_LIBRARIES} X11) 27 | 28 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") 29 | 30 | set(SRC ${SRC} src/hotkey/hotkeymanager_win.cpp) 31 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNICODE") 32 | 33 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 34 | 35 | # Define the target 36 | add_library(${PROJECT_NAME} SHARED ${SRC}) 37 | 38 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 39 | target_include_directories(${PROJECT_NAME} 40 | PUBLIC include 41 | PRIVATE src 42 | ) 43 | 44 | # Link target to libraries 45 | target_link_libraries(${PROJECT_NAME} PRIVATE ${LIB}) 46 | 47 | # Install target 48 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert) 49 | -------------------------------------------------------------------------------- /src/lib/globalshortcut/include/export_globalshortcut.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | 19 | #if defined(_MSC_VER) 20 | #define EXPORT __declspec(dllexport) 21 | #define IMPORT __declspec(dllimport) 22 | #elif defined(__GNUC__) 23 | #define EXPORT __attribute__((visibility("default"))) 24 | #define IMPORT 25 | #else 26 | #define EXPORT 27 | #define IMPORT 28 | #pragma warning Unknown dynamic link import/export semantics. 29 | #endif 30 | 31 | #ifdef GLOBALSHORTCUT 32 | #define EXPORT_GLOBALSHORTCUT EXPORT 33 | #else 34 | #define EXPORT_GLOBALSHORTCUT IMPORT 35 | #endif 36 | -------------------------------------------------------------------------------- /src/lib/albert/src/offlineindex/indeximpl.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | 22 | namespace Core { 23 | 24 | class Indexable; 25 | 26 | class IndexImpl 27 | { 28 | public: 29 | virtual ~IndexImpl() {} 30 | virtual void add(std::shared_ptr idxble) = 0; 31 | virtual void clear() = 0; 32 | virtual std::vector> search(const QString &req) const = 0; 33 | 34 | protected: 35 | static constexpr const char* SEPARATOR_REGEX = "[!?<>\"'=+*.:,;\\\\\\/ _\\-]+"; 36 | 37 | }; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/mainwindow/proposallist.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "resizinglist.h" 20 | #include 21 | 22 | class ProposalList final : public ResizingList 23 | { 24 | Q_OBJECT 25 | class ItemDelegate; 26 | 27 | public: 28 | 29 | ProposalList(QWidget *parent = 0); 30 | 31 | bool displayIcons() const; 32 | void setDisplayIcons(bool value); 33 | 34 | private: 35 | 36 | bool eventFilter(QObject*, QEvent *event) override; 37 | void showEvent(QShowEvent *event) override; 38 | 39 | ItemDelegate *delegate_; 40 | }; 41 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/matchcompare.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "item.h" 22 | 23 | namespace Core { 24 | 25 | /** 26 | * @brief The MatchOrder class 27 | * The implements the order of the results 28 | */ 29 | class MatchCompare 30 | { 31 | public: 32 | 33 | static void update(); 34 | bool operator()(const std::pair, short>& lhs, 35 | const std::pair, short>& rhs); 36 | 37 | private: 38 | 39 | static std::map order; 40 | }; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/lib/albert/include/core_globals.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | 19 | #if defined(_MSC_VER) 20 | #define EXPORT __declspec(dllexport) 21 | #define IMPORT __declspec(dllimport) 22 | #elif defined(__GNUC__) 23 | #define EXPORT __attribute__((visibility("default"))) 24 | #define IMPORT 25 | #else 26 | #define EXPORT 27 | #define IMPORT 28 | #pragma warning Unknown dynamic link import/export semantics. 29 | #endif 30 | 31 | #ifdef CORE 32 | #define EXPORT_CORE EXPORT 33 | #else 34 | #define EXPORT_CORE IMPORT 35 | #endif 36 | 37 | #define ALBERT_EXTENSION_IID "ExtensionInterface/v1.0-alpha" 38 | 39 | -------------------------------------------------------------------------------- /src/plugins/files/src/configwidget.h: -------------------------------------------------------------------------------- 1 | 2 | // albert - a simple application launcher for linux 3 | // Copyright (C) 2014-2017 Manuel Schneider 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | 18 | #pragma once 19 | #include 20 | #include 21 | #include "ui_configwidget.h" 22 | 23 | namespace Files { 24 | 25 | class Extension; 26 | 27 | class ConfigWidget final : public QWidget 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | 33 | explicit ConfigWidget(Extension *ext, QWidget *parent = 0); 34 | ~ConfigWidget(); 35 | 36 | private: 37 | 38 | Extension *extension; 39 | Ui::ConfigWidget ui; 40 | 41 | signals: 42 | 43 | void requestAddPath(const QString&); 44 | void requestRemovePath(const QString&); 45 | 46 | }; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/plugins/websearch/src/configwidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "ui_configwidget.h" 20 | 21 | namespace Websearch { 22 | 23 | class ConfigWidget final : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ConfigWidget(QWidget *parent = 0); 28 | ~ConfigWidget(); 29 | Ui::ConfigWidget ui; 30 | 31 | private: 32 | void onButton_new(); 33 | void onButton_remove(); 34 | void onButton_moveUp(); 35 | void onButton_moveDown(); 36 | void onButton_setIcon(); 37 | void onButton_restoreDefaults(); 38 | 39 | signals: 40 | 41 | void restoreDefaults(); 42 | }; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "configwidget.h" 18 | 19 | /** ***************************************************************************/ 20 | ExternalExtensions::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 21 | ui.setupUi(this); 22 | ui.tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); 23 | ui.tableView->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); 24 | } 25 | 26 | 27 | 28 | /** ***************************************************************************/ 29 | ExternalExtensions::ConfigWidget::~ConfigWidget() { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/settingswidget/grabkeybutton.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | 22 | class GrabKeyButton final : public QPushButton 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | GrabKeyButton(QWidget * parent = 0); 28 | ~GrabKeyButton(); 29 | 30 | private: 31 | bool waitingForHotkey_; 32 | QString oldText_; 33 | 34 | void grabAll(); 35 | void releaseAll(); 36 | void onClick(); 37 | void keyPressEvent (QKeyEvent *) override; 38 | void keyReleaseEvent ( QKeyEvent* ) override; 39 | 40 | signals: 41 | void keyCombinationPressed(int); 42 | }; 43 | -------------------------------------------------------------------------------- /src/plugins/files/src/mimetypedialog.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | 21 | namespace Files{ 22 | namespace Ui { 23 | class MimeTypeDialog; 24 | } 25 | 26 | class MimeTypeDialog : public QDialog 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | 32 | explicit MimeTypeDialog(const QStringList &filters, QWidget *parent = 0); 33 | ~MimeTypeDialog(); 34 | 35 | QStringList filters() const; 36 | 37 | protected: 38 | 39 | bool eventFilter(QObject *watched, QEvent *event) override; 40 | void keyPressEvent(QKeyEvent *evt) override; 41 | 42 | QStringListModel *filtersModel; 43 | Ui::MimeTypeDialog *ui; 44 | 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /src/lib/albert/include/indexable.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "core_globals.h" 21 | 22 | namespace Core { 23 | 24 | /** 25 | * @brief The Indexable class 26 | * The interface items need to be indexable by the offline index 27 | */ 28 | class EXPORT_CORE Indexable 29 | { 30 | 31 | public: 32 | 33 | struct WeightedKeyword { 34 | WeightedKeyword(const QString& kw, uint32_t r) : keyword(kw), relevance(r){} 35 | QString keyword; 36 | uint32_t relevance; 37 | }; 38 | 39 | virtual ~Indexable() {} 40 | 41 | virtual std::vector indexKeywords() const = 0; 42 | 43 | }; 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/mainwindow/settingsbutton.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | class QPropertyAnimation; 20 | class QSvgRenderer; 21 | 22 | class SettingsButton final : public QPushButton 23 | { 24 | Q_OBJECT 25 | Q_PROPERTY(int angle MEMBER angle_) 26 | 27 | public: 28 | 29 | SettingsButton(QWidget *parent = 0); 30 | ~SettingsButton(); 31 | 32 | protected: 33 | 34 | void hideEvent(QHideEvent * event) override; 35 | void showEvent(QShowEvent * event) override; 36 | 37 | private: 38 | 39 | void paintEvent(QPaintEvent *event) override; 40 | 41 | int angle_; 42 | QPropertyAnimation *animation_; 43 | QSvgRenderer *svgRenderer_; 44 | 45 | }; 46 | -------------------------------------------------------------------------------- /src/lib/albert/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(albertcore) 4 | 5 | add_definitions(-DCORE) #export branch 6 | 7 | # Get Qt libraries 8 | find_package(Qt5 5.2.0 REQUIRED COMPONENTS 9 | Concurrent 10 | Network 11 | Sql 12 | Svg 13 | Widgets 14 | ) 15 | 16 | # List files in the source directory 17 | FILE(GLOB_RECURSE SRC include/* src/*) 18 | 19 | qt5_wrap_ui(UI 20 | src/albert/mainwindow/mainwindow.ui 21 | src/albert/settingswidget/settingswidget.ui 22 | ) 23 | 24 | qt5_add_resources(QRC 25 | resources.qrc 26 | ) 27 | 28 | # Define the target 29 | add_library(${PROJECT_NAME} SHARED ${SRC} ${UI} ${QRC}) 30 | 31 | # Set INCLUDE_DIRS and INTERFACE_INCLUDE_DIRS 32 | target_include_directories(${PROJECT_NAME} 33 | PUBLIC 34 | include/ 35 | PRIVATE 36 | src/ 37 | src/albert/ 38 | src/albert/settingswidget/ 39 | src/albert/mainwindow/ 40 | ) 41 | 42 | # Link target to libraries 43 | target_link_libraries(${PROJECT_NAME} 44 | PRIVATE 45 | ${Qt5Concurrent_LIBRARIES} 46 | ${Qt5Network_LIBRARIES} 47 | ${Qt5Sql_LIBRARIES} 48 | ${Qt5Svg_LIBRARIES} 49 | ${Qt5Widgets_LIBRARIES} 50 | globalshortcut 51 | xdg 52 | ) 53 | 54 | # Set the RPATH for the library lookup 55 | set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/albert") 56 | 57 | # Install target 58 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/albert) 59 | -------------------------------------------------------------------------------- /src/lib/xdg/src/themefileparser.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | 21 | class ThemeFileParser 22 | { 23 | public: 24 | 25 | ThemeFileParser(const QString &iniFile); 26 | 27 | QString path(); 28 | QString name(); 29 | QString comment(); 30 | QStringList inherits(); 31 | QStringList directories(); 32 | bool hidden(); 33 | int size(const QString& directory); 34 | QString context(const QString& directory); 35 | QString type(const QString& directory); 36 | int maxSize(const QString& directory); 37 | int minSize(const QString& directory); 38 | int threshold(const QString& directory); 39 | 40 | private: 41 | 42 | QSettings iniFile_; 43 | 44 | }; 45 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/settingswidget/loadermodel.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | namespace Core { 20 | class ExtensionManager; 21 | } 22 | 23 | class LoaderModel final : public QAbstractListModel 24 | { 25 | public: 26 | LoaderModel(Core::ExtensionManager* pm, QObject *parent = nullptr); 27 | int rowCount(const QModelIndex & parent = QModelIndex()) const override; 28 | QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override; 29 | bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override; 30 | Qt::ItemFlags flags(const QModelIndex & index) const override; 31 | private: 32 | Core::ExtensionManager *extensionManager_; 33 | }; 34 | 35 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/querymanager.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | 22 | namespace Core { 23 | class ExtensionManager; 24 | class Query; 25 | } 26 | 27 | class QueryManager : public QObject 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | 33 | explicit QueryManager(Core::ExtensionManager* em, QObject *parent = 0); 34 | 35 | void setupSession(); 36 | void teardownSession(); 37 | void startQuery(const QString &searchTerm); 38 | 39 | private: 40 | 41 | Core::ExtensionManager *extensionManager_; 42 | Core::Query *currentQuery_; 43 | std::vector pastQueries_; 44 | 45 | signals: 46 | 47 | void resultsReady(QAbstractItemModel*); 48 | }; 49 | 50 | -------------------------------------------------------------------------------- /src/lib/albert/src/standardobjects/standardaction.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "standardaction.h" 18 | using std::function; 19 | 20 | Core::StandardAction::StandardAction(){ 21 | 22 | } 23 | 24 | Core::StandardAction::StandardAction(const QString &text, function f) 25 | : text_(text), action_(f) { 26 | } 27 | 28 | QString Core::StandardAction::text() const { 29 | return text_; 30 | } 31 | 32 | void Core::StandardAction::setText(const QString &text){ 33 | text_ = text; 34 | } 35 | 36 | const function &Core::StandardAction::action() { 37 | return action_; 38 | } 39 | 40 | void Core::StandardAction::setAction(function &&action){ 41 | action_ = action; 42 | } 43 | 44 | void Core::StandardAction::activate() { 45 | action_(); 46 | } 47 | -------------------------------------------------------------------------------- /src/plugins/templateExtension/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProjectNamespace::ConfigWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 480 10 | 320 11 | 12 | 13 | 14 | 15 | 16 | 17 | Qt::Vertical 18 | 19 | 20 | 21 | 20 22 | 40 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | <html><head/><body><p align="center"><span style=" color:#808080;">This is a simple template extension.</span></p></body></html> 31 | 32 | 33 | 34 | 35 | 36 | 37 | Qt::Vertical 38 | 39 | 40 | 41 | 20 42 | 40 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/plugins/terminal/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Terminal::ConfigWidget 4 | 5 | 6 | 7 | 8 | 9 | Qt::Vertical 10 | 11 | 12 | 13 | 20 14 | 40 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | <html><head/><body><p><span style=" color:#808080;">There is nothing to configure here.</span></p><p><span style=" color:#808080;">Just run the extension using the trigger '>'.</span></p></body></html> 23 | 24 | 25 | Qt::AlignCenter 26 | 27 | 28 | 29 | 30 | 31 | 32 | Qt::Vertical 33 | 34 | 35 | 36 | 20 37 | 40 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/mainwindow/resizinglist.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | 20 | class ResizingList : public QListView 21 | { 22 | Q_OBJECT 23 | Q_PROPERTY(int maxItems READ maxItems WRITE setMaxItems MEMBER maxItems_ NOTIFY maxItemsChanged) 24 | 25 | public: 26 | 27 | ResizingList(QWidget *parent = 0) : QListView(parent), maxItems_(5) {} 28 | virtual ~ResizingList() {} 29 | 30 | uint8_t maxItems() const; 31 | void setMaxItems(uint8_t maxItems); 32 | 33 | QSize minimumSizeHint() const override; 34 | QSize sizeHint() const override; 35 | void setModel(QAbstractItemModel * model) override; 36 | 37 | private: 38 | 39 | void updateAppearance(); 40 | 41 | uint8_t maxItems_; 42 | 43 | signals: 44 | 45 | void maxItemsChanged(); 46 | 47 | }; 48 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/trayicon.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include 18 | #include 19 | #include "trayicon.h" 20 | 21 | namespace { 22 | const char* CFG_SHOWTRAY = "showTray"; 23 | const bool DEF_SHOWTRAY = true; 24 | } 25 | 26 | /** ***************************************************************************/ 27 | TrayIcon::TrayIcon() { 28 | setIcon(qApp->windowIcon()); 29 | if (QSettings(qApp->applicationName()).value(CFG_SHOWTRAY, DEF_SHOWTRAY).toBool()) 30 | setVisible(true); 31 | } 32 | 33 | 34 | /** ***************************************************************************/ 35 | void TrayIcon::setVisible(bool enable) { 36 | QSettings(qApp->applicationName()).setValue(CFG_SHOWTRAY, enable); 37 | QSystemTrayIcon::setVisible(enable); 38 | emit stateChanged(enable); 39 | } 40 | -------------------------------------------------------------------------------- /src/lib/xdg/include/xdgiconlookup.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "export_xdg.h" 22 | 23 | class EXPORT_XDG XdgIconLookup 24 | { 25 | public: 26 | 27 | static QString iconPath(QString iconName, QString themeName = QIcon::themeName()); 28 | 29 | private: 30 | 31 | XdgIconLookup(); 32 | static XdgIconLookup *instance(); 33 | 34 | QString themeIconPath(QString iconName, QString themeName = QIcon::themeName()); 35 | QString doRecursiveIconLookup(const QString &iconName, const QString &theme, QStringList *checked); 36 | QString doIconLookup(const QString &iconName, const QString &themeFile); 37 | QString lookupThemeFile(const QString &themeName); 38 | 39 | QStringList iconDirs_; 40 | QMap iconCache_; 41 | }; 42 | -------------------------------------------------------------------------------- /src/plugins/system/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace System { 24 | 25 | class SystemPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of interfaces 43 | */ 44 | 45 | QString name() const override { return "System"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | void handleQuery(Core::Query * query) override; 48 | 49 | private: 50 | 51 | std::unique_ptr d; 52 | 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /src/plugins/calculator/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace Calculator { 24 | 25 | class CalculatorPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of extension interface 43 | */ 44 | 45 | QString name() const override { return "Calculator"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | void handleQuery(Core::Query * query) override; 48 | 49 | private: 50 | 51 | std::unique_ptr d; 52 | 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/mainwindow/actionlist.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "resizinglist.h" 20 | #include 21 | 22 | /** ***************************************************************************/ 23 | class ActionList final : public ResizingList 24 | { 25 | Q_OBJECT 26 | class ActionDelegate; 27 | 28 | public: 29 | 30 | ActionList(QWidget *parent = 0); 31 | 32 | private: 33 | 34 | bool eventFilter(QObject*, QEvent *event) override; 35 | 36 | }; 37 | 38 | 39 | 40 | /** ***************************************************************************/ 41 | class ActionList::ActionDelegate final : public QStyledItemDelegate 42 | { 43 | public: 44 | 45 | ActionDelegate(QObject *parent = nullptr) : QStyledItemDelegate(parent) {} 46 | 47 | void paint(QPainter *painter, const QStyleOptionViewItem &options, const QModelIndex &index) const override; 48 | }; 49 | -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include 18 | #include 19 | #include "configwidget.h" 20 | 21 | /** ***************************************************************************/ 22 | ChromeBookmarks::ConfigWidget::ConfigWidget(QWidget *parent) : QWidget(parent) { 23 | ui.setupUi(this); 24 | 25 | connect(ui.pushButton_editPath, &QPushButton::clicked, 26 | this, &ConfigWidget::onButton_EditPath); 27 | } 28 | 29 | /** ***************************************************************************/ 30 | ChromeBookmarks::ConfigWidget::~ConfigWidget() { 31 | 32 | } 33 | 34 | /** ***************************************************************************/ 35 | void ChromeBookmarks::ConfigWidget::onButton_EditPath() { 36 | QString path = QFileDialog::getOpenFileName(this, tr("Choose path")); 37 | if(path.isEmpty()) return; 38 | emit requestEditPath(path); 39 | } 40 | -------------------------------------------------------------------------------- /src/lib/albert/include/standardindexitem.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "standarditem.h" 20 | #include "core_globals.h" 21 | #include "indexable.h" 22 | 23 | namespace Core { 24 | 25 | /** **************************************************************************** 26 | * @brief A standard index item 27 | * If you dont need the flexibility subclassing the abstract classes provided, 28 | * you can simply use this container, fill it with data. 29 | */ 30 | class EXPORT_CORE StandardIndexItem final : public StandardItem, public Indexable 31 | { 32 | public: 33 | 34 | StandardIndexItem(const QString &id); 35 | 36 | virtual std::vector indexKeywords() const override; 37 | virtual void setIndexKeywords(std::vector &&indexKeywords); 38 | 39 | private: 40 | 41 | std::vector indexKeywords_; 42 | 43 | }; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/plugins/terminal/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace Terminal { 24 | 25 | class Internal; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of extension interface 43 | */ 44 | 45 | QString name() const override { return "Terminal"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | QStringList triggers() const override { return {">"}; } 48 | void handleQuery(Core::Query * query) override; 49 | 50 | private: 51 | 52 | std::unique_ptr d; 53 | 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /src/plugins/mpris/src/item.h: -------------------------------------------------------------------------------- 1 | // albert extension mpris - a mpris interface plugin for albert 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | using std::vector; 21 | #include "standarditem.h" 22 | #include "player.h" 23 | #include 24 | using std::shared_ptr; 25 | using Core::Action; 26 | 27 | namespace MPRIS { 28 | class Item final : public Core::Item 29 | { 30 | public: 31 | Item(Player &p, const QString& title, const QString& subtext, const QString& iconPath, const QDBusMessage& msg); 32 | ~Item(); 33 | 34 | QString id() const override { return id_; } 35 | QString text() const override { return text_; } 36 | QString subtext() const override { return subtext_; } 37 | QString iconPath() const override { return iconPath_; } 38 | vector> actions() override; 39 | 40 | private: 41 | QString id_; 42 | QString text_; 43 | QString subtext_; 44 | QString iconPath_; 45 | QDBusMessage message_; 46 | vector> actions_; 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /src/plugins/virtualbox/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // Contributed to by 2016-2017 Martin Buergmann 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | 18 | #pragma once 19 | #include 20 | #include 21 | #include "extension.h" 22 | #include "queryhandler.h" 23 | 24 | namespace VirtualBox { 25 | 26 | class VirtualBoxPrivate; 27 | class ConfigWidget; 28 | 29 | class Extension final : 30 | public QObject, 31 | public Core::Extension, 32 | public Core::QueryHandler 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 36 | 37 | public: 38 | 39 | Extension(); 40 | ~Extension(); 41 | 42 | /* 43 | * Implementation of extension interface 44 | */ 45 | 46 | QString name() const override { return tr("VirtualBox"); } 47 | QWidget *widget(QWidget *parent = nullptr) override; 48 | void setupSession() override; 49 | void handleQuery(Core::Query *) override; 50 | 51 | private: 52 | 53 | std::unique_ptr d; 54 | 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /src/lib/albert/include/standardaction.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "action.h" 21 | #include "core_globals.h" 22 | 23 | namespace Core { 24 | 25 | 26 | /** **************************************************************************** 27 | * @brief A standard action 28 | * If you dont need the flexibility subclassing the abstract classes provided, 29 | * you can simply use this container, fill it with data. 30 | */ 31 | struct EXPORT_CORE StandardAction final : public Action 32 | { 33 | public: 34 | 35 | StandardAction(); 36 | StandardAction(const QString &text, std::function f); 37 | 38 | QString text() const override; 39 | void setText(const QString &text); 40 | 41 | const std::function &action(); 42 | void setAction(std::function &&action); 43 | 44 | void activate() override; 45 | 46 | private: 47 | 48 | QString text_; 49 | std::function action_; 50 | 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "externalextension.h" 22 | 23 | namespace ExternalExtensions { 24 | 25 | class ExternalExtensionsPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension 31 | { 32 | Q_OBJECT 33 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 34 | 35 | public: 36 | 37 | Extension(); 38 | ~Extension(); 39 | 40 | /* 41 | * Implementation of extension interface 42 | */ 43 | 44 | QString name() const override { return "External extensions"; } 45 | QWidget *widget(QWidget *parent = nullptr) override; 46 | 47 | /* 48 | * Extension specific members 49 | */ 50 | 51 | void reloadExtensions(); 52 | 53 | private: 54 | 55 | std::unique_ptr d; 56 | 57 | signals: 58 | 59 | void extensionsUpdated(); 60 | 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /src/plugins/mpris/src/player.cpp: -------------------------------------------------------------------------------- 1 | // albert extension mpris - a mpris interface plugin for albert 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "player.h" 18 | #include 19 | #include 20 | 21 | /** ***************************************************************************/ 22 | MPRIS::Player::Player(QString &busid) : busid_(busid), name_(busid) { 23 | // Query the name of the media player of which we have the bus id. 24 | QDBusInterface iface(busid, "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2"); 25 | 26 | QVariant prop = iface.property("Identity"); 27 | if (prop.isValid() && !prop.isNull() && prop.canConvert(QVariant::String)) { 28 | name_ = prop.toString(); 29 | } else { 30 | qWarning("DBus: Name is either invalid, null or not instanceof string"); 31 | } 32 | 33 | prop = iface.property("CanRaise"); 34 | if (prop.isValid() && !prop.isNull() && prop.canConvert(QVariant::Bool)) { 35 | canRaise_ = prop.toBool(); 36 | } else { 37 | qWarning("DBus: CanRaise is either invalid, null or not instanceof bool"); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(albertlauncher) 4 | 5 | # Find includes in corresponding build directories 6 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 7 | 8 | # Instruct CMake to run moc automatically when needed. 9 | set(CMAKE_AUTOMOC ON) 10 | 11 | # Set additional compiler flags 12 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic") #-Wconversion -Wunused 13 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0") 14 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DQT_NO_DEBUG_OUTPUT ") 15 | 16 | # Color make output 17 | SET(CMAKE_COLOR_MAKEFILE ON) 18 | 19 | # Do not export symbols by default 20 | set(CMAKE_CXX_VISIBILITY_PRESET hidden) 21 | set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) 22 | 23 | # Suppress gcc details 24 | if(CMAKE_BUILD_TYPE STREQUAL "Debug") 25 | SET(CMAKE_VERBOSE_MAKEFILE ON) 26 | else(CMAKE_BUILD_TYPE STREQUAL "Debug") 27 | SET(CMAKE_VERBOSE_MAKEFILE OFF) 28 | endif(CMAKE_BUILD_TYPE STREQUAL "Debug") 29 | 30 | # Put the binaries in dedicated toplevel directories 31 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) 32 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 33 | 34 | # Build project 35 | add_subdirectory(src/application/) 36 | add_subdirectory(src/lib/) 37 | add_subdirectory(src/plugins/) 38 | 39 | # Do platform specific post target stuff 40 | if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 41 | 42 | # Install desktop entry 43 | install(FILES data/albert.desktop DESTINATION share/applications ) 44 | 45 | # Install icon 46 | install(FILES src/lib/albert/resources/icons/albert.svg DESTINATION share/icons/hicolor/scalable/apps) 47 | 48 | # Define where to install the themes 49 | install(DIRECTORY data/themes DESTINATION share/albert COMPONENT config) 50 | 51 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 52 | -------------------------------------------------------------------------------- /src/plugins/templateExtension/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace ProjectNamespace { 24 | 25 | class ProjectNamespacePrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of extension interface 43 | */ 44 | 45 | QString name() const override { return "Template"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | void setupSession() override; 48 | void teardownSession() override; 49 | void handleQuery(Core::Query * query) override; 50 | 51 | /* 52 | * Extension specific members 53 | */ 54 | 55 | private: 56 | 57 | std::unique_ptr d; 58 | 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /src/lib/albert/include/extension.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "core_globals.h" 21 | 22 | namespace Core { 23 | 24 | /** 25 | * @brief The extension interface 26 | */ 27 | class EXPORT_CORE Extension 28 | { 29 | public: 30 | 31 | Extension(const QString &id) : id(id) {} 32 | virtual ~Extension() {} 33 | 34 | /** 35 | * @brief An immutable application-wide unique identifier 36 | */ 37 | const QString id; 38 | 39 | /** 40 | * @brief A human readable name of the plugin 41 | * @return The human readable name 42 | */ 43 | virtual QString name() const = 0; 44 | 45 | /** 46 | * @brief The settings widget factory 47 | * This has to return the widget that is accessible to the user from the 48 | * albert settings plugin tab. If the return value is a nullptr there will 49 | * be no settings widget available in the settings. 50 | * @return The settings widget 51 | */ 52 | virtual QWidget* widget(QWidget *parent = nullptr) = 0; 53 | 54 | }; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/lib/albert/src/offlineindex/fuzzysearch.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include "prefixsearch.h" 23 | 24 | namespace Core { 25 | 26 | class FuzzySearch final : public PrefixSearch 27 | { 28 | public: 29 | 30 | explicit FuzzySearch(uint q = 3, double d = 1.0/3); 31 | explicit FuzzySearch(const PrefixSearch& rhs, uint q = 3, double d = 1.0/3); 32 | ~FuzzySearch(); 33 | 34 | void add(std::shared_ptr idxble) override; 35 | void clear() override; 36 | std::vector> search(const QString &req) const override; 37 | inline double delta() const {return delta_;} 38 | inline void setDelta(double d){delta_=d;} 39 | 40 | private: 41 | 42 | // Map of qGrams, containing their word references and #occurences 43 | typedef std::map> QGramIndex; 44 | QGramIndex qGramIndex_; 45 | 46 | // Size of the slices 47 | uint q_; 48 | 49 | // Maximum error 50 | double delta_; 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/plugins/debug/src/configwidget.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include 18 | #include 19 | #include 20 | #include "configwidget.h" 21 | 22 | Debug::ConfigWidget::ConfigWidget(Extension * extension, QWidget * parent) 23 | : QWidget(parent), extension_(extension) 24 | { 25 | ui.setupUi(this); 26 | ui.spinBox_delay->setValue(extension_->delay()); 27 | connect(ui.spinBox_delay, static_cast(&QSpinBox::valueChanged), 28 | extension_, &Extension::setDelay); 29 | 30 | ui.spinBox_count->setValue(extension_->count()); 31 | connect(ui.spinBox_count, static_cast(&QSpinBox::valueChanged), 32 | extension_, &Extension::setCount); 33 | 34 | ui.groupBox_async->setChecked(extension_->async()); 35 | connect(ui.groupBox_async, &QGroupBox::toggled, 36 | extension_, &Extension::setAsync); 37 | 38 | ui.lineEdit_trigger->setText(extension_->trigger()); 39 | connect(ui.lineEdit_trigger, &QLineEdit::textChanged, 40 | extension_, &Extension::setTrigger); 41 | } 42 | -------------------------------------------------------------------------------- /src/plugins/websearch/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "extension.h" 20 | #include "queryhandler.h" 21 | #include "fallbackprovider.h" 22 | 23 | namespace Websearch { 24 | 25 | struct Internal; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler, 32 | public Core::FallbackProvider 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 36 | 37 | public: 38 | 39 | Extension(); 40 | ~Extension(); 41 | 42 | QString name() const override { return "Websearch"; } 43 | QWidget *widget(QWidget *parent = nullptr) override; 44 | QStringList triggers() const override; 45 | void handleQuery(Core::Query * query) override; 46 | std::vector> fallbacks(const QString &) override; 47 | 48 | private: 49 | 50 | bool deserialize(); 51 | bool serialize(); 52 | void restoreDefaults(); 53 | 54 | std::unique_ptr d; 55 | 56 | }; 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FirefoxBookmarks::ConfigWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 480 10 | 320 11 | 12 | 13 | 14 | 15 | 16 | 17 | Select your firefox profile: 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Fuzzy Search 28 | 29 | 30 | true 31 | 32 | 33 | 34 | 35 | 36 | 37 | Open with firefox by default 38 | 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | 47 | Qt::Vertical 48 | 49 | 50 | 51 | 20 52 | 40 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/plugins/mpris/src/main.h: -------------------------------------------------------------------------------- 1 | // albert extension mpris - a mpris interface plugin for albert 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "player.h" 21 | #include "command.h" 22 | #include "extension.h" 23 | #include "queryhandler.h" 24 | #include 25 | using Core::Query; 26 | 27 | class QDBusMessage; 28 | 29 | namespace MPRIS { 30 | 31 | class MPRISPrivate; 32 | class ConfigWidget; 33 | 34 | class Extension final : 35 | public QObject, 36 | public Core::Extension, 37 | public Core::QueryHandler 38 | { 39 | Q_OBJECT 40 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 41 | 42 | public: 43 | Extension(); 44 | ~Extension(); 45 | 46 | /* 47 | * Implementation of extension interface 48 | */ 49 | 50 | QWidget *widget(QWidget *parent = nullptr) override; 51 | void setupSession() override; 52 | void handleQuery(Query *query) override; 53 | QString name() const override; 54 | 55 | 56 | /* 57 | * Extension specific members 58 | */ 59 | 60 | private: 61 | 62 | std::unique_ptr d; 63 | 64 | }; 65 | } 66 | -------------------------------------------------------------------------------- /src/plugins/ssh/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace Ssh { 24 | 25 | class SshPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of extension interface 43 | */ 44 | 45 | QString name() const override { return "SecureShell"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | QStringList triggers() const override { return {"ssh "}; } 48 | void handleQuery(Core::Query * query) override; 49 | 50 | /* 51 | * Extension specific members 52 | */ 53 | 54 | void rescan(); 55 | 56 | bool useKnownHosts(); 57 | void setUseKnownHosts(bool b = true); 58 | 59 | private: 60 | 61 | std::unique_ptr d; 62 | 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /src/plugins/ssh/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ssh::ConfigWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 480 10 | 320 11 | 12 | 13 | 14 | 15 | 16 | 17 | <html> 18 | <head/> 19 | <body> 20 | <p>This extension scans your /etc/ssh/config and ~/.ssh/config<br>and makes your ssh hosts accessible by Albert.</p> 21 | </body> 22 | </html> 23 | 24 | 25 | true 26 | 27 | 28 | 29 | 30 | 31 | 32 | Use 'known_hosts' 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 43 | 44 | 45 | Rescan 46 | 47 | 48 | 49 | 50 | 51 | 52 | Qt::Vertical 53 | 54 | 55 | 56 | 20 57 | 40 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/lib/globalshortcut/include/hotkeymanager.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "export_globalshortcut.h" 22 | 23 | class HotkeyManagerPrivate; 24 | 25 | class EXPORT_GLOBALSHORTCUT HotkeyManager final : public QObject 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | HotkeyManager(QObject *parent = 0); 31 | ~HotkeyManager(); 32 | 33 | bool registerHotkey(const QString&); 34 | bool registerHotkey(const QKeySequence&); 35 | bool registerHotkey(const int); 36 | bool unregisterHotkey(const QString&); 37 | bool unregisterHotkey(const QKeySequence&); 38 | void unregisterHotkey(const int); 39 | QSet hotkeys() {return hotkeys_;} 40 | void enable(){ setEnabled(true); } 41 | void disable(){ setEnabled(false); } 42 | void setEnabled(bool enabled = true){enabled_ = enabled;} 43 | bool isEnabled() const {return enabled_;} 44 | 45 | private: 46 | void onHotkeyPressed(); 47 | 48 | bool enabled_; 49 | QSet hotkeys_; 50 | 51 | std::unique_ptr d; 52 | 53 | signals: 54 | void hotKeyPressed(); 55 | }; 56 | -------------------------------------------------------------------------------- /src/plugins/applications/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace Applications { 24 | 25 | class ApplicationsPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of interfaces 43 | */ 44 | 45 | QString name() const override { return "Applications"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | void handleQuery(Core::Query * query) override; 48 | 49 | /* 50 | * Extension specific members 51 | */ 52 | 53 | bool fuzzy(); 54 | void setFuzzy(bool b = true); 55 | 56 | void updateIndex(); 57 | 58 | private: 59 | 60 | std::unique_ptr d; 61 | 62 | signals: 63 | 64 | void statusInfo(const QString&); 65 | 66 | }; 67 | } 68 | -------------------------------------------------------------------------------- /src/lib/globalshortcut/src/hotkeymanager_x11.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | 22 | struct _XDisplay; 23 | typedef _XDisplay Display; 24 | 25 | class HotkeyManagerPrivate final : public QObject, public QAbstractNativeEventFilter 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | 31 | HotkeyManagerPrivate(QObject* parent = 0); 32 | ~HotkeyManagerPrivate(); 33 | 34 | bool registerNativeHotkey(quint32 hk); 35 | void unregisterNativeHotkey(quint32 hk); 36 | 37 | private: 38 | 39 | bool nativeEventFilter(const QByteArray&, void*, long*) override; 40 | std::set nativeKeycodes(uint QtKey); 41 | uint nativeModifiers(uint QtKbdMods); 42 | 43 | std::set> grabbedKeys; 44 | std::set offendingMasks; 45 | 46 | struct Masks { 47 | unsigned int alt; 48 | unsigned int meta; 49 | unsigned int numlock; 50 | unsigned int super; 51 | unsigned int hyper; 52 | unsigned int iso_level3_shift; 53 | } masks; 54 | 55 | signals: 56 | 57 | void hotKeyPressed(); 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /src/plugins/websearch/resources/ebay.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/extensionspec.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | 22 | namespace Core { 23 | 24 | class Extension; 25 | 26 | class ExtensionSpec final 27 | { 28 | public: 29 | 30 | enum class State { 31 | Loaded, 32 | NotLoaded, 33 | Error 34 | }; 35 | 36 | ExtensionSpec(const QString &path); 37 | ~ExtensionSpec(); 38 | 39 | State state() { return state_; } 40 | bool load(); 41 | bool unload(); 42 | QString lastError() const; 43 | QObject *instance(); 44 | QString path() const; 45 | 46 | // Metadata 47 | QString id() const; 48 | QString name() const; 49 | QString version() const; 50 | QString author() const; 51 | QStringList dependencies() const; 52 | bool enabledByDefault() const; 53 | 54 | private: 55 | 56 | QPluginLoader loader_; 57 | State state_; 58 | QString lastError_; 59 | 60 | // Metadata 61 | QString id_; 62 | QString name_; 63 | QString version_; 64 | QString author_; 65 | QStringList dependencies_; 66 | bool enabledByDefault_; 67 | 68 | }; 69 | 70 | } 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/lib/albert/src/albert/settingswidget/settingswidget.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include "ui_settingswidget.h" 19 | namespace Core { 20 | class ExtensionManager; 21 | } 22 | class HotkeyManager; 23 | class MainWindow; 24 | class TrayIcon; 25 | 26 | class SettingsWidget final : public QWidget 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | 32 | SettingsWidget(MainWindow *mainWindow, 33 | HotkeyManager *hotkeyManager, 34 | Core::ExtensionManager *extensionManager, 35 | TrayIcon *trayIcon, 36 | QWidget * parent = 0, Qt::WindowFlags f = 0); 37 | 38 | private: 39 | 40 | void keyPressEvent(QKeyEvent * event) override; 41 | void closeEvent(QCloseEvent * event) override; 42 | void onThemeChanged(int); 43 | void onPluginDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles); 44 | void changeHotkey(int); 45 | void updatePluginInformations(const QModelIndex & curr); 46 | 47 | MainWindow *mainWindow_; 48 | HotkeyManager *hotkeyManager_; 49 | Core::ExtensionManager *extensionManager_; 50 | TrayIcon *trayIcon_; 51 | Ui::SettingsDialog ui; 52 | 53 | }; 54 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/src/externalextensionmodel.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "externalextension.h" 22 | 23 | namespace ExternalExtensions { 24 | 25 | class ExternalExtensionsModel : public QAbstractTableModel 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | 31 | ExternalExtensionsModel(const std::vector> &exts, QObject *parent = Q_NULLPTR) 32 | : QAbstractTableModel(parent), externalExtensions_(exts) {} 33 | 34 | int rowCount(const QModelIndex & parent = QModelIndex()) const override; 35 | int columnCount(const QModelIndex & parent = QModelIndex()) const override; 36 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 37 | QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override; 38 | Qt::ItemFlags flags(const QModelIndex & index) const override; 39 | 40 | void onActivated(const QModelIndex &); 41 | 42 | private: 43 | 44 | const std::vector> &externalExtensions_; 45 | enum class Section{Name, Trigger, Path, Count}; 46 | }; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/plugins/mpris/forms/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MPRIS::ConfigWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 480 10 | 320 11 | 12 | 13 | 14 | 15 | 16 | 17 | Qt::Vertical 18 | 19 | 20 | 21 | 20 22 | 40 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | <html><head/><body><p align="center"><span style=" color:#808080;">How to use MPRIS Control Center:</span></p><p align="center"><span style=" color:#808080;">If you have MPRIS-capable media players running (like Rhythmbox, VLC, ...) just type any of &quot;play&quot;, &quot;pause&quot;, &quot;stop&quot;, &quot;next&quot;, &quot;previous&quot; and you can send these commands directly to your player from albert.</span></p></body></html> 31 | 32 | 33 | true 34 | 35 | 36 | 37 | 38 | 39 | 40 | Qt::Vertical 41 | 42 | 43 | 44 | 20 45 | 40 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/plugins/virtualbox/src/vmitem.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | 19 | #include "item.h" 20 | using std::vector; 21 | using std::shared_ptr; 22 | using Core::Action; 23 | using Core::Item; 24 | 25 | namespace VirtualBox { 26 | 27 | typedef vector> ActionSPtrVec; 28 | 29 | class VMItem : public Item 30 | { 31 | public: 32 | VMItem(const QString &name, const QString &uuid, int &mainAction, const ActionSPtrVec actions, const QString &state); 33 | 34 | 35 | /* 36 | * Implementation of AlbertItem interface 37 | */ 38 | 39 | QString id() const override { return idstring_; } 40 | QString text() const override { return name_; } 41 | QString subtext() const override; 42 | QString iconPath() const override { return iconPath_; } 43 | ActionSPtrVec actions() override { return actions_; } 44 | 45 | /* 46 | * Item specific members 47 | */ 48 | 49 | static QString iconPath_; 50 | static const int VM_START; 51 | static const int VM_PAUSE; 52 | static const int VM_RESUME; 53 | static const int VM_STATE_CHANGING; 54 | 55 | private: 56 | QString name_; 57 | QString uuid_; 58 | QString idstring_; 59 | ActionSPtrVec actions_; 60 | int mainAction_; 61 | }; 62 | 63 | } // namespace VirtualBox 64 | -------------------------------------------------------------------------------- /src/plugins/firefoxbookmarks/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2016-2017 Martin Buergmann 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include "extension.h" 20 | #include "queryhandler.h" 21 | #include 22 | #include 23 | namespace Core { 24 | class StandardIndexItem; 25 | } 26 | 27 | namespace FirefoxBookmarks { 28 | 29 | class FirefoxBookmarksPrivate; 30 | class ConfigWidget; 31 | 32 | class Extension final : 33 | public QObject, 34 | public Core::Extension, 35 | public Core::QueryHandler 36 | { 37 | Q_OBJECT 38 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 39 | 40 | public: 41 | 42 | Extension(); 43 | ~Extension(); 44 | 45 | /* 46 | * Implementation of interfaces 47 | */ 48 | 49 | QString name() const override { return "Firefox bookmarks"; } 50 | QWidget *widget(QWidget *parent = nullptr) override; 51 | void handleQuery(Core::Query * query) override; 52 | 53 | /* 54 | * Extension specific members 55 | */ 56 | 57 | void setProfile(const QString &profile); 58 | void changeFuzzyness(bool fuzzy); 59 | void changeOpenPolicy(bool withFirefox); 60 | 61 | private: 62 | 63 | std::unique_ptr d; 64 | 65 | signals: 66 | 67 | void statusInfo(const QString&); 68 | }; 69 | } 70 | -------------------------------------------------------------------------------- /src/plugins/chromebookmarks/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | 24 | namespace ChromeBookmarks { 25 | 26 | class ChromeBookmarksPrivate; 27 | class ConfigWidget; 28 | 29 | class Extension final : 30 | public QObject, 31 | public Core::Extension, 32 | public Core::QueryHandler 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 36 | 37 | public: 38 | 39 | Extension(); 40 | ~Extension(); 41 | 42 | /* 43 | * Implementation of extension interface 44 | */ 45 | 46 | QString name() const override { return "Chrome bookmarks"; } 47 | QWidget *widget(QWidget *parent = nullptr) override; 48 | void handleQuery(Core::Query * query) override; 49 | 50 | /* 51 | * Extension specific members 52 | */ 53 | 54 | const QString &path(); 55 | void setPath(const QString &path); 56 | void restorePath(); 57 | 58 | bool fuzzy(); 59 | void setFuzzy(bool b = true); 60 | 61 | void updateIndex(); 62 | 63 | private: 64 | 65 | std::unique_ptr d; 66 | 67 | signals: 68 | 69 | void pathChanged(const QString&); 70 | void statusInfo(const QString&); 71 | 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /src/plugins/files/src/file.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include "indexable.h" 23 | #include "item.h" 24 | 25 | namespace Files { 26 | 27 | class File final : public Core::Item, public Core::Indexable 28 | { 29 | public: 30 | 31 | File() {} 32 | File(QString path, QMimeType mimetype) 33 | : path_(path), mimetype_(mimetype){} 34 | 35 | /* 36 | * Implementation of Item interface 37 | */ 38 | 39 | QString id() const override { return path_; } 40 | QString text() const override; 41 | QString subtext() const override; 42 | QString completionString() const override; 43 | QString iconPath() const override; 44 | std::vector indexKeywords() const override; 45 | std::vector> actions() override; 46 | 47 | /* 48 | * Item specific members 49 | */ 50 | 51 | /** Return the path of the file */ 52 | const QString &path() const { return path_; } 53 | 54 | /** Return the mimetype of the file */ 55 | const QMimeType &mimetype() const { return mimetype_; } 56 | 57 | private: 58 | 59 | QString path_; 60 | QMimeType mimetype_; 61 | static std::map iconCache_; 62 | }; 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/albert/src/standardobjects/standarditem.cpp: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "standarditem.h" 18 | #include "action.h" 19 | using std::vector; 20 | using std::shared_ptr; 21 | 22 | Core::StandardItem::StandardItem(const QString &id) : id_(id) { } 23 | 24 | QString Core::StandardItem::id() const { 25 | return id_; 26 | } 27 | 28 | QString Core::StandardItem::text() const { 29 | return text_; 30 | } 31 | 32 | void Core::StandardItem::setText(const QString &text){ 33 | text_ = text; 34 | } 35 | 36 | QString Core::StandardItem::subtext() const { 37 | return subtext_; 38 | } 39 | 40 | void Core::StandardItem::setSubtext(const QString &subtext){ 41 | subtext_ = subtext; 42 | } 43 | 44 | QString Core::StandardItem::completionString() const { 45 | return (completion_.isNull()) ? text_ : completion_; 46 | } 47 | 48 | void Core::StandardItem::setCompletionString(const QString &completion) { 49 | completion_ = completion; 50 | } 51 | 52 | QString Core::StandardItem::iconPath() const { 53 | return iconPath_; 54 | } 55 | 56 | void Core::StandardItem::setIconPath(const QString &iconPath){ 57 | iconPath_ = iconPath; 58 | } 59 | 60 | vector> Core::StandardItem::actions(){ 61 | return actions_; 62 | } 63 | 64 | void Core::StandardItem::setActions(vector > &&actions){ 65 | actions_ = actions; 66 | } 67 | -------------------------------------------------------------------------------- /src/plugins/debug/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2015 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace Debug { 24 | 25 | class DebugPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of extension interface 43 | */ 44 | 45 | QString name() const override { return "Debug"; } 46 | QWidget *widget(QWidget *parent = nullptr) override; 47 | QStringList triggers() const override; 48 | void handleQuery(Core::Query * query) override; 49 | bool isLongRunning() const override { return true; } 50 | 51 | /* 52 | * Extension specific members 53 | */ 54 | 55 | int count() const; 56 | void setCount(const int &count); 57 | 58 | bool async() const; 59 | void setAsync(bool async); 60 | 61 | int delay() const; 62 | void setDelay(const int &delay); 63 | 64 | const QString& trigger() const; 65 | void setTrigger(const QString &trigger); 66 | 67 | private: 68 | 69 | std::unique_ptr d; 70 | 71 | }; 72 | } 73 | -------------------------------------------------------------------------------- /src/lib/albert/include/standarditem.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "core_globals.h" 22 | #include "item.h" 23 | 24 | namespace Core { 25 | 26 | class Action; 27 | 28 | /** 29 | * @brief A standard item 30 | * If you dont need the flexibility subclassing the abstract classes provided, 31 | * you can simply use this container, fill it with data. 32 | */ 33 | class EXPORT_CORE StandardItem : public Item 34 | { 35 | public: 36 | 37 | StandardItem(const QString &id = QString()); 38 | 39 | QString id() const override final; 40 | 41 | QString text() const override; 42 | void setText(const QString &text); 43 | 44 | QString subtext() const override; 45 | void setSubtext(const QString &subtext); 46 | 47 | QString completionString() const override; 48 | void setCompletionString(const QString &completion); 49 | 50 | QString iconPath() const override; 51 | void setIconPath( const QString &iconPath); 52 | 53 | std::vector> actions() override; 54 | void setActions(std::vector> &&actions); 55 | 56 | protected: 57 | 58 | QString id_; 59 | QString text_; 60 | QString subtext_; 61 | QString completion_; 62 | QString iconPath_; 63 | std::vector> actions_; 64 | 65 | }; 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/plugins/websearch/src/enginesmodel.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | 20 | namespace Websearch { 21 | 22 | struct SearchEngine { 23 | bool enabled; 24 | QString name; 25 | QString trigger; 26 | QString iconPath; 27 | QString url; 28 | }; 29 | 30 | class EnginesModel final : public QAbstractTableModel 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | 36 | EnginesModel(std::vector&, QObject *parent = Q_NULLPTR); 37 | 38 | int rowCount(const QModelIndex & parent = QModelIndex()) const override; 39 | int columnCount(const QModelIndex & parent = QModelIndex()) const override; 40 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 41 | QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override; 42 | bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override; 43 | Qt::ItemFlags flags(const QModelIndex & index) const override; 44 | bool insertRows (int position, int rows, const QModelIndex & parent = QModelIndex()) override; 45 | bool removeRows (int position, int rows, const QModelIndex & parent = QModelIndex()) override; 46 | bool moveRows(const QModelIndex &sourceRow, int srcRow, int cnt, const QModelIndex & dst, int destinationChild) override; 47 | 48 | private: 49 | 50 | std::vector &searchEngines_; 51 | 52 | }; 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/src/externalextension.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include "queryhandler.h" 23 | 24 | namespace ExternalExtensions { 25 | 26 | class ExternalExtension final : public QObject, public Core::QueryHandler 27 | { 28 | 29 | public: 30 | 31 | ExternalExtension(const QString &path, const QString &id); 32 | ~ExternalExtension(); 33 | 34 | /* 35 | * Implementation of extension interface 36 | */ 37 | 38 | QStringList triggers() const override { return {trigger_}; } 39 | void setupSession() override; 40 | void teardownSession() override; 41 | void handleQuery(Core::Query *query) override; 42 | 43 | /* 44 | * Extension specific members 45 | */ 46 | 47 | 48 | const QString &path() { return path_; } 49 | const QString &id() { return id_; } 50 | const QString &name() { return name_; } 51 | const QString &author() { return author_; } 52 | const QString &version() { return version_; } 53 | const QStringList &dependencies() { return dependencies_; } 54 | 55 | private: 56 | 57 | QString runOperation(const QString &); 58 | 59 | QString path_; 60 | QString id_; 61 | QString name_; 62 | QString author_; 63 | QString version_; 64 | QStringList dependencies_; 65 | QString trigger_; 66 | std::map variables_; 67 | QMutex processMutex_; 68 | }; 69 | 70 | } 71 | -------------------------------------------------------------------------------- /data/themes/Spotlight.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: Manuel Schneider 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #808080; 12 | background-color: #fcfcfc; 13 | } 14 | 15 | #frame { 16 | padding: 6px 0px; 17 | border-radius: 8px; 18 | background-color: #fcfcfc; 19 | min-width:640px; 20 | max-width:640px; 21 | } 22 | 23 | #inputLine { 24 | padding: 0px 8px; 25 | font-size: 36px; 26 | selection-color: #fcfcfc; 27 | selection-background-color: #808080; 28 | background-color: transparent; 29 | } 30 | 31 | #settingsButton { 32 | margin: 6px 6px 0px 0px; 33 | color: #e0e0e0; 34 | background-color: transparent; 35 | padding: 2px; 36 | min-width:14px; 37 | min-height:14px; 38 | max-width:14px; 39 | max-height:14px; 40 | } 41 | 42 | /********** ListViews ************/ 43 | 44 | QListView { 45 | background: transparent; 46 | selection-color: #606060; 47 | } 48 | 49 | QListView::item:selected { 50 | background: #e0e0e0; 51 | } 52 | 53 | QListView QScrollBar:vertical { 54 | width: 3px; 55 | background: transparent; 56 | } 57 | 58 | QListView QScrollBar::handle:vertical { 59 | background: #c0c0c0; 60 | border-radius: 1px; 61 | min-height: 24px; 62 | } 63 | 64 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 65 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 66 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 67 | border: 0px; 68 | width: 0px; 69 | height: 0px; 70 | background: transparent; 71 | } 72 | 73 | /********** proposalList **********/ 74 | 75 | QListView#proposalList { 76 | icon-size: 40px; 77 | font-size: 24px; 78 | } 79 | 80 | QListView#proposalList::item{ 81 | padding: 8px 0px 0px 0px; 82 | } 83 | 84 | /********** actionList **********/ 85 | 86 | QListView#actionList { 87 | font-size: 20px; 88 | } 89 | -------------------------------------------------------------------------------- /data/themes/Spotlight Dark.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: Manuel Schneider 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #808080; 12 | background-color: #030303; 13 | } 14 | 15 | #frame { 16 | padding: 6px 0px; 17 | border-radius: 8px; 18 | background-color: #030303; 19 | min-width:640px; 20 | max-width:640px; 21 | } 22 | 23 | #inputLine { 24 | padding: 0px 8px; 25 | font-size: 36px; 26 | selection-color: #030303; 27 | selection-background-color: #808080; 28 | background-color: transparent; 29 | } 30 | 31 | #settingsButton { 32 | margin: 6px 6px 0px 0px; 33 | color: #202020; 34 | background-color: transparent; 35 | padding: 2px; 36 | min-width:14px; 37 | min-height:14px; 38 | max-width:14px; 39 | max-height:14px; 40 | } 41 | 42 | /********** ListViews ************/ 43 | 44 | QListView { 45 | background: transparent; 46 | selection-color: #a0a0a0; 47 | } 48 | 49 | QListView::item:selected { 50 | background: #202020; 51 | } 52 | 53 | QListView QScrollBar:vertical { 54 | width: 3px; 55 | background: transparent; 56 | } 57 | 58 | QListView QScrollBar::handle:vertical { 59 | background: #404040; 60 | border-radius: 1px; 61 | min-height: 24px; 62 | } 63 | 64 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 65 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 66 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 67 | border: 0px; 68 | width: 0px; 69 | height: 0px; 70 | background: transparent; 71 | } 72 | 73 | /********** proposalList **********/ 74 | 75 | QListView#proposalList { 76 | icon-size: 40px; 77 | font-size: 24px; 78 | } 79 | 80 | QListView#proposalList::item{ 81 | padding: 8px 0px 0px 0px; 82 | } 83 | 84 | /********** actionList **********/ 85 | 86 | QListView#actionList { 87 | font-size: 20px; 88 | } 89 | -------------------------------------------------------------------------------- /src/plugins/externalextensions/configwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ExternalExtensions::ConfigWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 274 10 | 210 11 | 12 | 13 | 14 | 15 | 16 | 17 | <html><head/><body><p><span style=" color:#808080;">External extensions allow the user to rapidly write custom extensions. External extensions are basically programs that follow a specific communication protocol. For the details see the wiki. The list below contains the found extensions.</span></p></body></html> 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | QAbstractScrollArea::AdjustToContents 28 | 29 | 30 | true 31 | 32 | 33 | QAbstractItemView::SingleSelection 34 | 35 | 36 | QAbstractItemView::SelectRows 37 | 38 | 39 | Qt::ElideLeft 40 | 41 | 42 | false 43 | 44 | 45 | false 46 | 47 | 48 | false 49 | 50 | 51 | true 52 | 53 | 54 | false 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /data/SpotlightTemplate.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: Manuel Schneider 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #%foreground_color%; 12 | background-color: #%background_color%; 13 | } 14 | 15 | #frame { 16 | padding: 6px 0px; 17 | border-radius: 8px; 18 | background-color: #%background_color%; 19 | min-width:640px; 20 | max-width:640px; 21 | } 22 | 23 | #inputLine { 24 | padding: 0px 8px; 25 | font-size: 36px; 26 | selection-color: #%background_color%; 27 | selection-background-color: #%foreground_color%; 28 | background-color: transparent; 29 | } 30 | 31 | #settingsButton { 32 | margin: 6px 6px 0px 0px; 33 | color: #%button_color%; 34 | background-color: transparent; 35 | padding: 2px; 36 | min-width:14px; 37 | min-height:14px; 38 | max-width:14px; 39 | max-height:14px; 40 | } 41 | 42 | /********** ListViews ************/ 43 | 44 | QListView { 45 | background: transparent; 46 | selection-color: #%selection_foreground_color%; 47 | } 48 | 49 | QListView::item:selected { 50 | background: #%selection_background_color%; 51 | } 52 | 53 | QListView QScrollBar:vertical { 54 | width: 3px; 55 | background: transparent; 56 | } 57 | 58 | QListView QScrollBar::handle:vertical { 59 | background: #%scroll_color%; 60 | border-radius: 1px; 61 | min-height: 24px; 62 | } 63 | 64 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 65 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 66 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 67 | border: 0px; 68 | width: 0px; 69 | height: 0px; 70 | background: transparent; 71 | } 72 | 73 | /********** proposalList **********/ 74 | 75 | QListView#proposalList { 76 | icon-size: 40px; 77 | font-size: 24px; 78 | } 79 | 80 | QListView#proposalList::item{ 81 | padding: 8px 0px 0px 0px; 82 | } 83 | 84 | /********** actionList **********/ 85 | 86 | QListView#actionList { 87 | font-size: 20px; 88 | } 89 | -------------------------------------------------------------------------------- /data/themes/Yosemite.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: Manuel Schneider 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | font-family:"DejaVu Sans"; 12 | font-weight: 200; 13 | color : #000000; 14 | background-color: #fcfcfc; 15 | } 16 | 17 | #frame { 18 | padding: 12px; 19 | border-radius: 5px; 20 | background-color: #fcfcfc; 21 | border: 1px solid #20808080; 22 | 23 | /* Workaround for Qt to get fixed size button*/ 24 | min-width:640px; 25 | max-width:640px; 26 | } 27 | 28 | #inputLine { 29 | font-size: 36px; 30 | selection-color: #fcfcfc; 31 | selection-background-color: #000000; 32 | background-color: transparent; 33 | } 34 | 35 | #settingsButton { 36 | color: #bdbdbd; 37 | background-color: transparent; 38 | padding: 8px; 39 | 40 | /* Workaround for Qt to get fixed size button*/ 41 | min-width:14px; 42 | min-height:14px; 43 | max-width:14px; 44 | max-height:14px; 45 | } 46 | 47 | /********** ListViews ************/ 48 | 49 | QListView { 50 | selection-color: #000000; 51 | } 52 | 53 | QListView::item:selected { 54 | background: #eeeeee; 55 | } 56 | 57 | QListView QScrollBar:vertical { 58 | width: 2px; 59 | background: transparent; 60 | } 61 | 62 | QListView QScrollBar::handle:vertical { 63 | background: #e2e2e2; 64 | min-height: 24px; 65 | } 66 | 67 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 68 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 69 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 70 | border: 0px; 71 | width: 0px; 72 | height: 0px; 73 | background: transparent; 74 | } 75 | 76 | /********** actionList **********/ 77 | 78 | QListView#actionList { 79 | font-size: 20px; 80 | } 81 | 82 | QListView#actionList::item{ 83 | height:28px; 84 | } 85 | 86 | /********** proposalList **********/ 87 | 88 | QListView#proposalList { 89 | icon-size: 40px; 90 | font-size: 22px; 91 | } 92 | 93 | QListView#proposalList::item{ 94 | height:48px; 95 | } 96 | -------------------------------------------------------------------------------- /data/themes/Yosemite Dark.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: Manuel Schneider 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | font-family:"DejaVu Sans"; 12 | font-weight: 200; 13 | color : #ffffff; 14 | background-color: #f4000000; 15 | } 16 | 17 | #frame { 18 | padding: 12px; 19 | border-radius: 5px; 20 | background-color: #f4000000; 21 | border: 1px solid #20808080; 22 | 23 | /* Workaround for Qt to get fixed size button*/ 24 | min-width:640px; 25 | max-width:640px; 26 | } 27 | 28 | #inputLine { 29 | font-size: 36px; 30 | selection-color: #f4000000; 31 | selection-background-color: #ffffff; 32 | background-color: transparent; 33 | } 34 | 35 | #settingsButton { 36 | color: #484848; 37 | background-color: transparent; 38 | padding: 8px; 39 | 40 | /* Workaround for Qt to get fixed size button*/ 41 | min-width:14px; 42 | min-height:14px; 43 | max-width:14px; 44 | max-height:14px; 45 | } 46 | 47 | /********** ListViews ************/ 48 | 49 | QListView { 50 | selection-color: #ffffff; 51 | } 52 | 53 | QListView::item:selected { 54 | background: #262626; 55 | } 56 | 57 | QListView QScrollBar:vertical { 58 | width: 2px; 59 | background: transparent; 60 | } 61 | 62 | QListView QScrollBar::handle:vertical { 63 | background: #484848; 64 | min-height: 24px; 65 | } 66 | 67 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 68 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 69 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 70 | border: 0px; 71 | width: 0px; 72 | height: 0px; 73 | background: transparent; 74 | } 75 | 76 | /********** actionList **********/ 77 | 78 | QListView#actionList { 79 | font-size: 20px; 80 | } 81 | 82 | QListView#actionList::item{ 83 | height:28px; 84 | } 85 | 86 | /********** proposalList **********/ 87 | 88 | QListView#proposalList { 89 | icon-size: 40px; 90 | font-size: 22px; 91 | } 92 | 93 | QListView#proposalList::item{ 94 | height:48px; 95 | } 96 | -------------------------------------------------------------------------------- /src/lib/albert/include/item.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include 21 | #include "core_globals.h" 22 | 23 | namespace Core { 24 | 25 | class Action; 26 | 27 | /** **************************************************************************** 28 | * @brief The item interface 29 | * Subclass this class to make your object displayable in the results list. 30 | */ 31 | class EXPORT_CORE Item 32 | { 33 | 34 | public: 35 | 36 | /** 37 | * An enumeration of urgency levels 38 | * Notifications are placed on top. Alert too but additionally get an visual 39 | * emphasis. Normal items are not handled in a special way. 40 | */ 41 | enum class Urgency : unsigned char { Normal, Notification, Alert }; 42 | 43 | virtual ~Item() {} 44 | 45 | /** An persistant, extensionwide unique identifier, "" if item is dynamic */ 46 | virtual QString id() const = 0; 47 | 48 | /** The icon for the item */ 49 | virtual QString iconPath() const = 0; 50 | 51 | /** The title for the item */ 52 | virtual QString text() const = 0; 53 | 54 | /** The declarative subtext for the item */ 55 | virtual QString subtext() const = 0; 56 | 57 | /** The string to use for completion */ 58 | virtual QString completionString() const { return text(); } 59 | 60 | /** Urgency level of the item, defautls to "Normal" */ 61 | virtual Urgency urgency() const { return Urgency::Normal; } 62 | 63 | /** The alternative actions of the item*/ 64 | virtual std::vector> actions() = 0; 65 | 66 | }; 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/plugins/websearch/resources/wikipedia.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /data/themes/Arc Blue.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: ubervison 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #727A8F; 12 | background-color: #e7e8eb; 13 | } 14 | 15 | #frame { 16 | padding: 4px; 17 | border-radius: 3px; 18 | background-color: #e7e8eb; 19 | 20 | /* Workaround for Qt to get fixed size button*/ 21 | min-width:640px; 22 | max-width:640px; 23 | } 24 | 25 | #inputLine { 26 | padding: 2px; 27 | border-radius: 2px; 28 | border: 1px solid #CFD6E6; 29 | font-size: 36px; 30 | selection-color: #e7e8eb; 31 | selection-background-color: #727A8F; 32 | background-color: #fdfdfd; 33 | } 34 | 35 | #settingsButton { 36 | color : #ffffff; 37 | background-color: #e7e8eb; 38 | padding: 4px; 39 | 40 | /* Respect the frame border */ 41 | margin: 6px 6px 0px 0px; 42 | border-top-right-radius: 6px; 43 | border-bottom-left-radius: 10px; 44 | 45 | /* Workaround for Qt to get fixed size button*/ 46 | min-width:13px; 47 | min-height:13px; 48 | max-width:13px; 49 | max-height:13px; 50 | } 51 | 52 | /********** ListViews **********/ 53 | 54 | QListView { 55 | selection-color: #727A8F; 56 | } 57 | 58 | QListView::item:selected { 59 | background: #95c4fb; 60 | border: 1px solid #cfd6e6; 61 | } 62 | 63 | QListView QScrollBar:vertical { 64 | width: 5px; 65 | background: transparent; 66 | } 67 | 68 | QListView QScrollBar::handle:vertical { 69 | background: #b8babf; 70 | min-height: 24px; 71 | } 72 | 73 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 74 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 75 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 76 | border: 0px; 77 | width: 0px; 78 | height: 0px; 79 | background: transparent; 80 | } 81 | 82 | /********** actionList **********/ 83 | 84 | QListView#actionList { 85 | font-size: 20px; 86 | } 87 | 88 | QListView#actionList::item{ 89 | height:28px; 90 | } 91 | 92 | /********** proposalList **********/ 93 | 94 | QListView#proposalList { 95 | icon-size: 44px; 96 | font-size: 26px; 97 | } 98 | 99 | QListView#proposalList::item{ 100 | height:48px; 101 | } 102 | -------------------------------------------------------------------------------- /data/themes/Arc Grey.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: ubervison 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #727A8F; 12 | background-color: #e7e8eb; 13 | } 14 | 15 | #frame { 16 | padding: 4px; 17 | border-radius: 3px; 18 | background-color: #e7e8eb; 19 | 20 | /* Workaround for Qt to get fixed size button*/ 21 | min-width:640px; 22 | max-width:640px; 23 | } 24 | 25 | #inputLine { 26 | padding: 2px; 27 | border-radius: 2px; 28 | border: 1px solid #CFD6E6; 29 | font-size: 36px; 30 | selection-color: #e7e8eb; 31 | selection-background-color: #727A8F; 32 | background-color: #fdfdfd; 33 | } 34 | 35 | #settingsButton { 36 | color : #ffffff; 37 | background-color: #e7e8eb; 38 | padding: 4px; 39 | 40 | /* Respect the frame border */ 41 | margin: 6px 6px 0px 0px; 42 | border-top-right-radius: 6px; 43 | border-bottom-left-radius: 10px; 44 | 45 | /* Workaround for Qt to get fixed size button*/ 46 | min-width:13px; 47 | min-height:13px; 48 | max-width:13px; 49 | max-height:13px; 50 | } 51 | 52 | /********** ListViews **********/ 53 | 54 | QListView { 55 | selection-color: #727A8F; 56 | } 57 | 58 | QListView::item:selected { 59 | background: #F5F6F7; 60 | border: 1px solid #4084D6; 61 | } 62 | 63 | QListView QScrollBar:vertical { 64 | width: 5px; 65 | background: transparent; 66 | } 67 | 68 | QListView QScrollBar::handle:vertical { 69 | background: #b8babf; 70 | min-height: 24px; 71 | } 72 | 73 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 74 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 75 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 76 | border: 0px; 77 | width: 0px; 78 | height: 0px; 79 | background: transparent; 80 | } 81 | 82 | /********** actionList **********/ 83 | 84 | QListView#actionList { 85 | font-size: 20px; 86 | } 87 | 88 | QListView#actionList::item{ 89 | height:28px; 90 | } 91 | 92 | /********** proposalList **********/ 93 | 94 | QListView#proposalList { 95 | icon-size: 44px; 96 | font-size: 26px; 97 | } 98 | 99 | QListView#proposalList::item{ 100 | height:48px; 101 | } 102 | -------------------------------------------------------------------------------- /data/themes/Arc Dark Blue.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: ubervison 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #AFB8C5; 12 | background-color: #383C4A; 13 | } 14 | 15 | #frame { 16 | padding: 4px; 17 | border-radius: 3px; 18 | background-color: #383C4A; 19 | 20 | /* Workaround for Qt to get fixed size button*/ 21 | min-width:640px; 22 | max-width:640px; 23 | } 24 | 25 | #inputLine { 26 | padding: 2px; 27 | border-radius: 2px; 28 | border: 1px solid #21252B; 29 | font-size: 36px; 30 | selection-color: #383C4A; 31 | selection-background-color: #AFB8C5; 32 | background-color: #404552; 33 | } 34 | 35 | #settingsButton { 36 | color : #ffffff; 37 | background-color: #383C4A; 38 | padding: 4px; 39 | 40 | /* Respect the frame border */ 41 | margin: 6px 6px 0px 0px; 42 | border-top-right-radius: 6px; 43 | border-bottom-left-radius: 10px; 44 | 45 | /* Workaround for Qt to get fixed size button*/ 46 | min-width:13px; 47 | min-height:13px; 48 | max-width:13px; 49 | max-height:13px; 50 | } 51 | 52 | /********** ListViews **********/ 53 | 54 | QListView { 55 | selection-color: #AFB8C5; 56 | } 57 | 58 | QListView::item:selected { 59 | background: #4084D6; 60 | border: 1px solid #4084D6; 61 | } 62 | 63 | QListView QScrollBar:vertical { 64 | width: 5px; 65 | background: transparent; 66 | } 67 | 68 | QListView QScrollBar::handle:vertical { 69 | background: #b8babf; 70 | min-height: 24px; 71 | } 72 | 73 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 74 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 75 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 76 | border: 0px; 77 | width: 0px; 78 | height: 0px; 79 | background: transparent; 80 | } 81 | 82 | /********** actionList **********/ 83 | 84 | QListView#actionList { 85 | font-size: 20px; 86 | } 87 | 88 | QListView#actionList::item{ 89 | height:28px; 90 | } 91 | 92 | /********** proposalList **********/ 93 | 94 | QListView#proposalList { 95 | icon-size: 44px; 96 | font-size: 26px; 97 | } 98 | 99 | QListView#proposalList::item{ 100 | height:48px; 101 | } 102 | -------------------------------------------------------------------------------- /data/themes/Arc Dark Grey.qss: -------------------------------------------------------------------------------- 1 | /* 2 | * author: ubervison 3 | * 4 | * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: 5 | * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) 6 | * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) 7 | */ 8 | 9 | * { 10 | border: none; 11 | color : #AFB8C5; 12 | background-color: #383C4A; 13 | } 14 | 15 | #frame { 16 | padding: 4px; 17 | border-radius: 3px; 18 | background-color: #383C4A; 19 | 20 | /* Workaround for Qt to get fixed size button*/ 21 | min-width:640px; 22 | max-width:640px; 23 | } 24 | 25 | #inputLine { 26 | padding: 2px; 27 | border-radius: 2px; 28 | border: 1px solid #21252B; 29 | font-size: 36px; 30 | selection-color: #383C4A; 31 | selection-background-color: #AFB8C5; 32 | background-color: #404552; 33 | } 34 | 35 | #settingsButton { 36 | color : #ffffff; 37 | background-color: #383C4A; 38 | padding: 4px; 39 | 40 | /* Respect the frame border */ 41 | margin: 6px 6px 0px 0px; 42 | border-top-right-radius: 6px; 43 | border-bottom-left-radius: 10px; 44 | 45 | /* Workaround for Qt to get fixed size button*/ 46 | min-width:13px; 47 | min-height:13px; 48 | max-width:13px; 49 | max-height:13px; 50 | } 51 | 52 | /********** ListViews **********/ 53 | 54 | QListView { 55 | selection-color: #AFB8C5; 56 | } 57 | 58 | QListView::item:selected { 59 | background: #404552; 60 | border: 1px solid #2B2E39; 61 | } 62 | 63 | QListView QScrollBar:vertical { 64 | width: 5px; 65 | background: transparent; 66 | } 67 | 68 | QListView QScrollBar::handle:vertical { 69 | background: #b8babf; 70 | min-height: 24px; 71 | } 72 | 73 | QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, 74 | QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 75 | QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 76 | border: 0px; 77 | width: 0px; 78 | height: 0px; 79 | background: transparent; 80 | } 81 | 82 | /********** actionList **********/ 83 | 84 | QListView#actionList { 85 | font-size: 20px; 86 | } 87 | 88 | QListView#actionList::item{ 89 | height:28px; 90 | } 91 | 92 | /********** proposalList **********/ 93 | 94 | QListView#proposalList { 95 | icon-size: 44px; 96 | font-size: 26px; 97 | } 98 | 99 | QListView#proposalList::item{ 100 | height:48px; 101 | } 102 | -------------------------------------------------------------------------------- /src/plugins/files/src/main.h: -------------------------------------------------------------------------------- 1 | // albert - a simple application launcher for linux 2 | // Copyright (C) 2014-2017 Manuel Schneider 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma once 18 | #include 19 | #include 20 | #include "extension.h" 21 | #include "queryhandler.h" 22 | 23 | namespace Files { 24 | 25 | class FilesPrivate; 26 | class ConfigWidget; 27 | 28 | class Extension final : 29 | public QObject, 30 | public Core::Extension, 31 | public Core::QueryHandler 32 | { 33 | Q_OBJECT 34 | Q_PLUGIN_METADATA(IID ALBERT_EXTENSION_IID FILE "metadata.json") 35 | 36 | public: 37 | 38 | Extension(); 39 | ~Extension(); 40 | 41 | /* 42 | * Implementation of extension interface 43 | */ 44 | 45 | QString name() const override { return "Files"; } 46 | QStringList triggers() const override { return {"/", "~"}; } 47 | QWidget *widget(QWidget *parent = nullptr) override; 48 | void handleQuery(Core::Query * query) override; 49 | 50 | /* 51 | * Extension specific members 52 | */ 53 | 54 | const QStringList &paths() const; 55 | void setPaths(const QStringList &); 56 | void restorePaths(); 57 | 58 | bool indexHidden() const; 59 | void setIndexHidden(bool b = true); 60 | 61 | bool followSymlinks() const; 62 | void setFollowSymlinks(bool b = true); 63 | 64 | uint scanInterval() const; 65 | void setScanInterval(uint minutes); 66 | 67 | bool fuzzy() const; 68 | void setFuzzy(bool b = true); 69 | 70 | const QStringList &filters() const; 71 | void setFilters(const QStringList &); 72 | 73 | void updateIndex(); 74 | 75 | private: 76 | 77 | std::unique_ptr d; 78 | 79 | signals: 80 | 81 | void rootDirsChanged(const QStringList&); 82 | void statusInfo(const QString&); 83 | 84 | }; 85 | } 86 | --------------------------------------------------------------------------------