mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 07:19:27 -05:00
rename
This commit is contained in:
@@ -4,7 +4,7 @@ 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, startsWithNumber, launchCustomCommand } from './miscfunctions.js';
|
||||
import { execAndClose, couldBeMath, launchCustomCommand } from './miscfunctions.js';
|
||||
|
||||
export const DirectoryButton = ({ parentPath, name, type, icon }) => {
|
||||
const actionText = Widget.Revealer({
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
|
||||
import Applications from 'resource:///com/github/Aylur/ags/service/applications.js';
|
||||
const { execAsync, exec } = Utils;
|
||||
import { execAndClose, expandTilde, hasUnterminatedBackslash, startsWithNumber, launchCustomCommand, ls } from './miscfunctions.js';
|
||||
import { execAndClose, expandTilde, hasUnterminatedBackslash, couldBeMath, launchCustomCommand, ls } from './miscfunctions.js';
|
||||
import {
|
||||
CalculationResultButton, CustomCommandButton, DirectoryButton,
|
||||
DesktopEntryButton, ExecuteCommandButton, SearchButton
|
||||
@@ -104,7 +104,7 @@ export const SearchAndWindows = () => {
|
||||
const isAction = text.startsWith('>');
|
||||
const isDir = (['/', '~'].includes(entry.text[0]));
|
||||
|
||||
if (startsWithNumber(text)) { // Eval on typing is dangerous, this is a workaround
|
||||
if (couldBeMath(text)) { // Eval on typing is dangerous, this is a workaround
|
||||
try {
|
||||
const fullResult = eval(text);
|
||||
// copy
|
||||
@@ -166,7 +166,7 @@ export const SearchAndWindows = () => {
|
||||
_appSearchResults = Applications.query(text);
|
||||
|
||||
// Calculate
|
||||
if (startsWithNumber(text)) { // Eval on typing is dangerous; this is a small workaround.
|
||||
if (couldBeMath(text)) { // Eval on typing is dangerous; this is a small workaround.
|
||||
try {
|
||||
const fullResult = eval(text);
|
||||
resultsBox.add(CalculationResultButton({ result: fullResult, text: text }));
|
||||
|
||||
Reference in New Issue
Block a user