]>
code.delx.au - show-app-menu-on-key-press/blob - extension.js
9fcc55dbc17d7b52071a86c6e0dc015c65de3de0
1 const St
= imports
.gi
.St
;
2 const Main
= imports
.ui
.main
;
8 // show apps on startup
9 Main
.layoutManager
.connect('startup-complete', () => {
10 Main
.overview
._overview
._controls
._toggleAppsPage();
13 // show apps on key press when there are no windows
14 global
.stage
.connect('key-press-event', () => {
15 if (!hasVisibleWindows() && !Main
.overview
.visible
) {
16 Main
.overview
.showApps();
20 // keyboard focus for apps view
21 Main
.overview
.connect('shown', () => {
22 if (Main
.overview
._overview
.dash
.showAppsButton
.checked
) {
23 Main
.overview
._overview
._controls
.appDisplay
.navigate_focus(null, St
.DirectionType
.TAB_FORWARD
, false)
26 Main
.overview
._overview
.controls
.appDisplay
.connect('view-loaded', () => {
27 Main
.overview
._overview
._controls
.appDisplay
.navigate_focus(null, St
.DirectionType
.TAB_FORWARD
, false)
34 function hasVisibleWindows() {
35 return global
.display
.get_tab_list(0, null).find((w
) => !w
.is_hidden());