aboutsummaryrefslogtreecommitdiffstats
path: root/config/ags/modules/overview/searchbuttons.js
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2025-07-15 19:48:59 +0900
committerGitHub <noreply@github.com>2025-07-15 19:48:59 +0900
commit30f73308e232b49cfb30dc8015b315ea24e6b80c (patch)
tree69e8b1f219b2638d3119c70aea870730d7dae105 /config/ags/modules/overview/searchbuttons.js
parentccc57814f5b72f5481d5ea7fe4de4958dc80f553 (diff)
parentd3a59bcfac1f24b0f44e4bc798a59ac494bfedeb (diff)
Merge pull request #762 from JaKooLit/dev-quickshell
Merging Dev-quickshell to development
Diffstat (limited to 'config/ags/modules/overview/searchbuttons.js')
-rw-r--r--config/ags/modules/overview/searchbuttons.js163
1 files changed, 0 insertions, 163 deletions
diff --git a/config/ags/modules/overview/searchbuttons.js b/config/ags/modules/overview/searchbuttons.js
deleted file mode 100644
index f5892f31..00000000
--- a/config/ags/modules/overview/searchbuttons.js
+++ /dev/null
@@ -1,163 +0,0 @@
-const { Gtk } = imports.gi;
-import App from 'resource:///com/github/Aylur/ags/app.js';
-import Widget from 'resource:///com/github/Aylur/ags/widget.js';
-import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
-const { execAsync, exec } = Utils;
-import { searchItem } from './searchitem.js';
-import { execAndClose, couldBeMath, launchCustomCommand } from './miscfunctions.js';
-
-export const DirectoryButton = ({ parentPath, name, type, icon }) => {
- const actionText = Widget.Revealer({
- revealChild: false,
- transition: "crossfade",
- transitionDuration: userOptions.animations.durationLarge,
- child: Widget.Label({
- className: 'overview-search-results-txt txt txt-small txt-action',
- label: 'Open',
- })
- });
- const actionTextRevealer = Widget.Revealer({
- revealChild: false,
- transition: "slide_left",
- transitionDuration: userOptions.animations.durationSmall,
- child: actionText,
- });
- return Widget.Button({
- className: 'overview-search-result-btn',
- onClicked: () => {
- App.closeWindow('overview');
- execAsync(['bash', '-c', `xdg-open '${parentPath}/${name}'`, `&`]).catch(print);
- },
- child: Widget.Box({
- children: [
- Widget.Box({
- vertical: false,
- children: [
- Widget.Box({
- className: 'overview-search-results-icon',
- homogeneous: true,
- child: Widget.Icon({
- icon: icon,
- }),
- }),
- Widget.Label({
- className: 'overview-search-results-txt txt txt-norm',
- label: name,
- }),
- Widget.Box({ hexpand: true }),
- actionTextRevealer,
- ]
- })
- ]
- }),
- setup: (self) => self
- .on('focus-in-event', (button) => {
- actionText.revealChild = true;
- actionTextRevealer.revealChild = true;
- })
- .on('focus-out-event', (button) => {
- actionText.revealChild = false;
- actionTextRevealer.revealChild = false;
- })
- ,
- })
-}
-
-export const CalculationResultButton = ({ result, text }) => searchItem({
- materialIconName: '󱖦 ',
- name: `Math result`,
- actionName: "Copy",
- content: `${result}`,
- onActivate: () => {
- App.closeWindow('overview');
- execAsync(['wl-copy', `${result}`]).catch(print);
- },
-});
-
-export const DesktopEntryButton = (app) => {
- const actionText = Widget.Revealer({
- revealChild: false,
- transition: "crossfade",
- transitionDuration: userOptions.animations.durationLarge,
- child: Widget.Label({
- className: 'overview-search-results-txt txt txt-small txt-action',
- label: 'Launch',
- })
- });
- const actionTextRevealer = Widget.Revealer({
- revealChild: false,
- transition: "slide_left",
- transitionDuration: userOptions.animations.durationSmall,
- child: actionText,
- });
- return Widget.Button({
- className: 'overview-search-result-btn',
- onClicked: () => {
- App.closeWindow('overview');
- app.launch();
- },
- child: Widget.Box({
- children: [
- Widget.Box({
- vertical: false,
- children: [
- Widget.Box({
- className: 'overview-search-results-icon',
- homogeneous: true,
- child: Widget.Icon({
- icon: app.iconName,
- }),
- }),
- Widget.Label({
- className: 'overview-search-results-txt txt txt-norm',
- label: app.name,
- }),
- Widget.Box({ hexpand: true }),
- actionTextRevealer,
- ]
- })
- ]
- }),
- setup: (self) => self
- .on('focus-in-event', (button) => {
- actionText.revealChild = true;
- actionTextRevealer.revealChild = true;
- })
- .on('focus-out-event', (button) => {
- actionText.revealChild = false;
- actionTextRevealer.revealChild = false;
- })
- ,
- })
-}
-
-export const ExecuteCommandButton = ({ command, terminal = false }) => searchItem({
- materialIconName: `${terminal ? 'terminal' : ' '}`,
- name: `Run command`,
- actionName: `Execute ${terminal ? 'in terminal' : ''}`,
- content: `${command}`,
- onActivate: () => execAndClose(command, terminal),
- extraClassName: 'techfont',
-})
-
-export const CustomCommandButton = ({ text = '' }) => searchItem({
- materialIconName: ' ',
- name: 'Action',
- actionName: 'Run',
- content: `${text}`,
- onActivate: () => {
- App.closeWindow('overview');
- launchCustomCommand(text);
- },
-});
-
-export const SearchButton = ({ text = '' }) => searchItem({
- materialIconName: '󰜏 ',
- name: 'Search the web',
- actionName: 'Go',
- content: `${text}`,
- onActivate: () => {
- App.closeWindow('overview');
- execAsync(['bash', '-c', `xdg-open '${userOptions.search.engineBaseUrl}${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
- },
-}); \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage