lolcathost specific changes
This commit is contained in:
parent
1d4189b040
commit
40864af04f
18 changed files with 580 additions and 1167 deletions
|
|
@ -39,8 +39,9 @@ const AppLauncher = ({ width = 500, height = 500, spacing = 12 }) => {
|
|||
}
|
||||
|
||||
const entry = Widget.Entry({
|
||||
placeholder_text: "Search",
|
||||
hexpand: true,
|
||||
css: `margin-bottom: ${spacing}px;`,
|
||||
css: "min-height: 50px;",
|
||||
|
||||
// launch first item when Enter is pressed
|
||||
on_accept: () => {
|
||||
|
|
@ -48,7 +49,7 @@ const AppLauncher = ({ width = 500, height = 500, spacing = 12 }) => {
|
|||
const results = applications.filter((item) => item.visible);
|
||||
if (results[0]) {
|
||||
App.toggleWindow(WINDOW_NAME);
|
||||
results[0].attribute.app.launcher()
|
||||
results[0].attribute.app.launch()
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -59,29 +60,52 @@ const AppLauncher = ({ width = 500, height = 500, spacing = 12 }) => {
|
|||
})
|
||||
|
||||
return Widget.Box({
|
||||
vertical: true,
|
||||
css: `margin: ${spacing * 2}px;`,
|
||||
vertical: false,
|
||||
children: [
|
||||
entry,
|
||||
// LEFT
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
css: `min-width: ${width}px;`
|
||||
+ `min-height: ${height}px;`
|
||||
+ "background-color: #947BF5;",
|
||||
//+ "background-image: url('../../../wallpaper/kill-my-firstborn/astronaut-pink-blue.png');",
|
||||
//+ "background-size: cover;"
|
||||
//+ "background-position: center;"
|
||||
//+ "background-repeat: no-repeat;",
|
||||
children: [
|
||||
// align the entry field with the app list
|
||||
Widget.Box({
|
||||
css: `margin: ${spacing * 2}px;`,
|
||||
child: entry,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
// make scrollable
|
||||
Widget.Scrollable({
|
||||
hscroll: "never",
|
||||
css: `min-width: ${width}px; min-height: ${height}px;`,
|
||||
child: list,
|
||||
// RIGHT
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
css: `margin: ${spacing * 2}px;`,
|
||||
child:
|
||||
// make scrollable
|
||||
Widget.Scrollable({
|
||||
hscroll: "never",
|
||||
css: `min-width: ${width}px; min-height: ${height}px;`,
|
||||
child: list,
|
||||
}),
|
||||
|
||||
setup: self => self.hook(App, (_, windowName, visible) => {
|
||||
if (windowName !== WINDOW_NAME)
|
||||
return
|
||||
|
||||
// when the launcher becomes visible
|
||||
if (visible) {
|
||||
refresh()
|
||||
entry.text = ""
|
||||
entry.grab_focus()
|
||||
}
|
||||
}),
|
||||
}),
|
||||
],
|
||||
setup: self => self.hook(App, (_, windowName, visible) => {
|
||||
if (windowName !== WINDOW_NAME)
|
||||
return
|
||||
|
||||
// when the launcher becomes visible
|
||||
if (visible) {
|
||||
repopulate()
|
||||
entry.text = ""
|
||||
entry.grab_focus()
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue