Commit Graph

205 Commits

Author SHA1 Message Date
Ksaper 6439e6d3d6 Fix not passing self 2023-02-25 03:30:33 +02:00
Ksaper b300def18c Formatting 2023-02-25 03:23:35 +02:00
Ksaper 86bef7a2d2 Add function to run app as root 2023-02-25 03:23:35 +02:00
Ksaper a992a526b0 Rename AWESOME_SENSIBLE_TERMINASL_PATH TO AWESOME_SENSIBLE_TERMINAL_SCRIPT_PATH 2023-02-25 03:23:35 +02:00
Ksaper 282ce35225 Rename spawn to run 2023-02-25 03:23:35 +02:00
Ksaper 47da489ba8 Change class for terminal apps 2023-02-25 03:23:35 +02:00
Ksaper 3c44c5c056 Use app_info:launch() for non terminal apps to fix issues with launching file managers 2023-02-25 03:23:35 +02:00
Ksaper 9e0c6fd96a Pass the app launcher to the app_template 2023-02-25 03:23:35 +02:00
Ksaper af15c9bc7a Add scroll signal 2023-02-25 03:23:35 +02:00
Ksaper c45e64b795 Rename selected and unselected to select and unselect + add 'page::forward' and 'page::backwards' signals 2023-02-25 03:23:35 +02:00
Ksaper f161aa2092 Expose every useful private local function as a public method + add sort_fn prop 2023-02-24 23:17:45 +02:00
Ksaper a4df7debbc Add more helper functions + remove useless comments 2023-02-24 23:11:53 +02:00
Ksaper c449681cbe Convert the reset function into a public method + fix not respecting the reset_on_hide prop 2023-02-24 23:08:56 +02:00
Ksaper 8c8d96702e Check if the returned table is nil 2023-02-24 22:27:06 +02:00
Ksaper 44af848a9c Define app once 2023-02-24 22:20:58 +02:00
Ksaper 87656129f7 ::press gets called consisntely when holding down a key and that will cause lag when scrolling 2023-02-24 22:20:58 +02:00
Ksaper 7e33e62486 Replace xclip dep using gtk clipboard 2023-02-24 21:24:18 +02:00
Ksaper 7207d9792a Get the text from self, no need to pass it as well 2023-02-24 20:43:10 +02:00
Ksaper 097f007a34 Refresh the app list when settings the favorites 2023-02-24 20:43:10 +02:00
Ksaper 7f34d48a97 Refactor the sorting function + split the sorting part into it's own function 2023-02-24 20:43:10 +02:00
Ksaper 24cdcb9385 No need for the case_insensitive function, can just :lower() the string + use plain matching 2023-02-24 20:43:10 +02:00
Ksaper d7f23096d4 This is a table-array like as well, use ipairs 2023-02-24 20:43:10 +02:00
Ksaper 0978c54321 This should have been ipairs 2023-02-24 20:43:10 +02:00
Ksaper 7f73fc3265 Expose these methods in a nicer way for the app_template 2023-02-24 20:43:10 +02:00
Ksaper 04d7af46b3 Fix prompt disabling other keygrabbers 2023-02-22 05:18:55 +02:00
Ksaper b9576250ee Add the desktop_app_info to the app table 2023-02-21 05:07:11 +02:00
Ksaper fd3ee7a786 Add more props to the app table 2023-02-21 05:01:16 +02:00
Ksaper 582b3c4db8 Adding more props to the app table that this is obslete now, it's better to just use the app.prop_name syntax 2023-02-21 04:55:47 +02:00
Ksaper 2649d0ea0c Rename entry/entries to app/apps 2023-02-21 04:30:38 +02:00
Ksaper e47fbd28d5 Just use set_text 2023-02-20 05:11:45 +02:00
Ksaper 9d5729cc03 Make it consistent with the rest of awesome API 2023-02-20 05:09:34 +02:00
Ksaper 0ae3c65501 Hard code it 2023-02-20 04:54:20 +02:00
Ksaper 3fb0836fc7 Not working 2023-02-20 04:53:41 +02:00
Ksaper 38e3d033cd Make use of the screen prop 2023-02-20 04:51:00 +02:00
Ksaper 87f50e7661 Always_on for default prompt 2023-02-20 04:33:23 +02:00
Ksaper 1a70455656 Remove animation support (can be done manually) + some very weird code? 2023-02-20 04:16:31 +02:00
Ksaper 33576c2b24 Fix scrolling and grid when using widget_template 2023-02-20 04:08:51 +02:00
Ksaper 8b60520536 Better defaults 2023-02-20 03:39:42 +02:00
Ksaper c01b5868d1 Support icon prop in table form or in regular form 2023-02-20 03:39:37 +02:00
Ksaper 5562030754 Use state to know when to show the cursor or not 2023-02-20 02:57:02 +02:00
Ksaper 594610a9f4 Better defaults 2023-02-20 02:29:05 +02:00
Ksaper 8812678c5a Use the new prompt widget and improve widget_template support 2023-02-20 02:29:05 +02:00
Ksaper 68482b16cd Just get it from helpers 2023-02-20 02:29:05 +02:00
Ksaper e5deb85ac3 Not used 2023-02-20 02:29:05 +02:00
Ksaper eb7c1aa409 It's the 1st widget in the layout, no need to search for it 2023-02-20 02:29:05 +02:00
Ksaper b8b3e8a712 Refactor the prompt widget 2023-02-20 02:29:05 +02:00
Ksaper 21f0bd2968 Improve templates support 2023-02-19 18:01:15 +02:00
Ksaper a6c3376694 Formatting 2023-02-19 18:01:15 +02:00
Ksaper 1f5cdbf129 Add a default_value function to improve the syntax of setting defaults 2023-02-19 18:01:15 +02:00
Ksaper 6e77e55d04 No need to recreate the timer 2023-02-19 18:01:15 +02:00
Ksaper d4911c99c2 set raw to true 2023-02-19 18:01:15 +02:00
Ksaper 7a20f91fb6 Rename prompt_color to prompt_bg_color 2023-02-19 18:01:15 +02:00
Ksaper c975a0de9a Reduce amount of configuration options 2023-02-19 18:01:15 +02:00
Ksaper eda3703635 Use the start_new func 2023-02-19 02:25:55 +02:00
Ksaper 85910592e1 Use get_id here, it's just suffixed with .desktop in the end 2023-02-14 03:14:50 +02:00
Ksaper 8de50aefb1 whoooopsi 2023-02-14 02:31:36 +02:00
Ksaper 3cfff61ca6 Refactor the icon theme helper 2023-02-14 02:26:18 +02:00
Ksaper 1e694218df Add method to dynamically update app launcher favorites 2023-02-12 18:16:43 +02:00
Ksaper ee9c8b1283 Better naming 2023-02-12 18:14:35 +02:00
Ksaper 400bd988a8 Fix accessing the wrong self 2023-02-07 14:42:17 +02:00
Ksaper ddd5b27ea9 It might be empty 2023-02-05 16:47:09 +02:00
Ksaper 4499ede6bd Templates 2023-02-05 16:36:31 +02:00
Ksaper 3d3529cddf More formatting 2023-02-05 16:15:14 +02:00
Ksaper 7a5585201e whoops 2023-02-05 15:58:18 +02:00
Ksaper 458cd3c8e7 No need for () 2023-02-05 15:48:13 +02:00
Ksaper f148d9278c hmm 2023-02-05 15:45:31 +02:00
Ksaper c822f16f14 Formatting 2023-02-05 15:45:13 +02:00
Ksaper 98fc2c9829 Not needed anymore 2023-02-05 15:44:21 +02:00
Ksaper cbf8960fe5 Formatting 2023-02-05 15:43:06 +02:00
Ksaper d272561ea1 Make the scroll function accesiable + DRY it 2023-02-05 15:41:51 +02:00
Ksaper 4cbedd6244 Make select and unselect part of the app_widget object 2023-02-05 15:33:55 +02:00
Ksaper 5b8282b82d Refactor scrolling 2023-02-05 15:03:02 +02:00
Ksaper 4cb5972fb4 Not used 2023-02-05 14:57:39 +02:00
Ksaper 281fc8953a Add support app launcher template 2023-02-05 02:36:16 +02:00
Ksaper d134719347 At last 2023-02-05 02:20:23 +02:00
Ksaper 6f1198e75d Add support for passing in a template for the app widget 2023-02-05 02:17:46 +02:00
Ksaper c6a245365b Use _role suffix 2023-02-05 01:35:00 +02:00
Ksaper 61a21a125a Small changes 2023-02-05 01:28:51 +02:00
Ksaper 6c575011cb Pull these out of the function 2023-02-05 00:53:50 +02:00
Ksaper a8a865b3fa Auto detect terminal 2023-02-05 00:49:48 +02:00
Ksaper 611e382ff9 I like page_forward being before backward 2023-02-05 00:44:24 +02:00
Ksaper 0790382524 Use forced_num_col so I don't need to do dumb shit to get the actual amount of rows 2023-02-05 00:42:18 +02:00
Ksaper 52acaf5d79 Some renaming and use _ for unused vars 2023-02-05 00:20:42 +02:00
Jordan Callicoat 14196af7b5
Add popup border config in app_launcher (#190)
* fix(app_launcher): app_name_normal_color on initial entries

* use app_name_normal_color for initial entry names

* feat(app_launcher): allow configuring popup borders

* add border_color and border_width configuration args
2023-01-19 11:41:52 +01:00
Jimmy Cozza e6de047ced
docs(app_launcher): and basic options descriptions (#181)
* add app_launcher docs and basic options descriptions

* add examples for all options and fix typos in actual launcher
2022-11-20 22:36:43 +01:00
Alexandru Ionut Tripon c405103262
Add filterClients and cycleClientsByIdx configuration for window_switcher widget (#162) 2022-06-16 21:40:11 +02:00
Kasper 796845e1a1
App launcher 4 (#149)
* Make the wibox type customizable

* Not used

* No needs for a case insensitive pattern
2022-01-18 23:12:43 -08:00
contribuewwt 165a230b0a
Merge branch 'master' into fixes 2021-11-15 18:35:30 +05:30
Kasper 3c8b3b8cc0
Some more app launcher features (#138)
* Rename init() to reset()

* Regenerate app list when an app is installed/uninstalled

* Fix some issue with inside app content placement

* Add an option to show the generic_name of the app (used a lot in rofi text mode style)

* Set default spacing to 0

* Use a modified prompt to add methods such as :start() :stop() and some uncustomizable behaviour

* Move app_launcher into it's own folder

* Fix default values for various bools

* Why would anyone want to reverse sort alphabetically?

* Maybe someone will want that?

* Make has_value case insensitive

* Add an option to specify favorite apps (will appear first)

* Fix widget placement

* Add ctrl+v paste shortcut

* Add an option to not close the widget when launching an app

* Refactor page scrolling code to add support for wrap scrolling options

* Fix init for bool with false default values

* Fix app name halign not working

* This is padding and not margin

* Increase the height to make space for the new padding property

* Fix bg and fg setting not getting applied for the prompt

* Fix some scrolling bugs

* Add default template for text version

* Yet another scrolling issue

* This should be on by default

* Fix animation flickering
2021-11-08 12:42:38 -08:00
undefinedDarkness f51fbc5e63 export draw_widget from task_preview too 2021-11-05 21:08:29 +05:30
undefinedDarkness b68b95a1ce fixup! add more options to titlebar indicator 2021-11-05 13:23:25 +05:30
Kasper e4fd438e3e
More app launcher improvements (#132)
* Make sure there is always a default icon

* Use get_example_icon_path to get the default icon

* Refactor scrolling to add support for left and right scrolling

* fixup! Make sure there is always a default icon

* Fix calculation happening at the wrong time

* Fix default icons again

* Where did that come from?

* Fix calculation happening at the wrong time for scroll_up as well

* Fix error on scroll right when scrolling to page where amount of rows is smaller than the selected row

* Sort search results by string similarity

* Don't sort by similarity when the search string is empty

* Add hover effects

* try_to_keep_index_after_searching should be false by default

* This should only trigger for lmb

* Add an option to hide the app launcher when clicked with lmb/rmb outside of it

* Use gtk-launch so terminal apps spawn correctly

* Use get_executable instead of get_commandline

* Add an option to set the hover colors

* Further improvements for the spawn function

* Fix scrolling/searching errors when there app list is empty

* This should never be nil anyway

* whitespace

* Refactor show, hide and toggle method + remove support for manually setting x an y (use placement)

* Add arguements for custom icon_theme (defaults to the selected system gtk theme) and icon_size (defaults to 48)

* Pass the app table instead of individual keys to create_app_widget

* Add an arguement to pass the default terminal for terminal apps as gtk-launch only uses xterm

* Reformating

* Rename 'mark_app' and 'unmark_app' to 'select_app' and 'unselect_app'

* Call :hide() from app.spawn() to avoid calling hide() twice on some cases

* Fix escape not closing the launcher after b7e44ec4

* Reduce code duplication and only reset the launcher when the animation is over (if not nil)

* Set active_widget to nil when the grid is empty to prevent from spawning the wrong app

* Override the default exe_callback

* Override the default behaviour for 'Return' via hooks instead because overriding only exe_callback still doesn't stop it from pausing the prompt keygrabber

* Set active_widget to nil on unselect

* Unselect previous app on search to avoid from spawning it when the grid is empty

* Use double quotes for everything
2021-11-05 05:38:54 +02:00
contribuewwt 0d8df18e02
Merge pull request #133 from undefinedDarkness/add_icon_fallback
make tag preview fallback to a awesomewm icon
2021-11-04 21:47:57 +05:30
undefinedDarkness a525299d4f add more options to titlebar indicator 2021-11-04 21:42:06 +05:30
undefinedDarkness 7261f0ba40 Use grid layout in custom_tasklist
Export draw_widget from tag_preview
2021-11-04 21:34:27 +05:30
undefinedDarkness 1f8c3bdcd7 add-create-callback to titlebar_indicator 2021-11-04 21:19:44 +05:30
undefinedDarkness 0a49f7ff43 make tag preview fallback to a awesomewm icon 2021-11-04 20:55:22 +05:30
Kasper ab1a25e676
Fix some issue with the client preview for the tag and task preview widgets (#128) 2021-11-03 14:59:53 -07:00
Gokul Swaminathan 274df77bba Minor edits for the icon_theme and app_launcher PR 2021-11-03 14:44:03 -07:00
Kasper bebb445de6
App launcher ala rofi widget (#103)
* Initial commit

* Fix missing dpi variable

* Add an option to search by command

* Add turn_on and turn_off signals

* Add options to skip apps by their names or commands

* Add an option to skip apps with no icons

* Fix looping over the wrong table

* Refactor to make it into a proper bling like widget

* Fix selecting the wrong app after a search

* Why was this in a seperate check?

* Fix various issues with toggle/show/hide

* Stop it from complaining

* Fix wrong app getting selected after scrolling up/down

* Add an option to spawn the app when pressing on it regardless if it was selected or not

* lol what?

* Don't add widgets that won't be visible after scrolling down

* Yap wasn't needed

* This is a little clearer

* Add an option 'try_to_keep_index_after_search' to mimic rofi behaviour

* Only add widgets that are visible after a search

* Fix search not adding the correct number of widgets

* Add proper customization options

* Add proper customizaiton options for the prompt

* Simplfy scroll down logic and fix possible bugs

* Add animation support

* Fix app list being empty on some occasions

* Default placement when x and y is nil

* Free up ram

* Add a default icon option

* style change

* Not needed and also hurts search peformance by a decent amount

* Fix error when trying to spawn an app when no app is currently marked

* Not needed

* Add a small debounce delay for the search to prevent it from lagging

* Formatting

* Replace menubar with app_info

* Fix the default icon option
2021-11-03 14:38:50 -07:00