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()
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ App.config({
|
|||
style: "./style.css",
|
||||
// icons: "./assets",
|
||||
windows: [
|
||||
Bar(),
|
||||
//Bar(),
|
||||
applauncher,
|
||||
]
|
||||
// gtkTheme: "Adwaita-dark",
|
||||
|
|
|
|||
23
homes/me/ags/fullscreen.js
Normal file
23
homes/me/ags/fullscreen.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
const WINDOW_NAME = "fullscreen";
|
||||
|
||||
const Fullscreen = (children) => Widget.Box({
|
||||
vertical: true,
|
||||
css: "background-image: url('https://images2.alphacoders.com/135/1351579.png');"
|
||||
+ "background-size: cover;"
|
||||
+ "background-position: center;"
|
||||
+ "background-repeat: no-repeat;",
|
||||
children: children,
|
||||
})
|
||||
|
||||
export const fullscreen = Widget.Window({
|
||||
name: WINDOW_NAME,
|
||||
setup: self => self.keybind("Escape", () => {
|
||||
App.closeWindow(WINDOW_NAME)
|
||||
}),
|
||||
anchor: ["top", "bottom", "left", "right"],
|
||||
visible: false,
|
||||
keymode: "exclusive",
|
||||
child: Fullscreen(
|
||||
Widget.Label({"Hello World"});
|
||||
)
|
||||
})
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
../modules/rio.nix
|
||||
../modules/firefox.nix
|
||||
../modules/nixcord.nix
|
||||
#../modules/nixcord.nix
|
||||
|
||||
../modules/hypr/hypridle.nix
|
||||
../modules/hypr/hyprlock.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue