Commit Graph

250 Commits

Author SHA1 Message Date
eylles 7542251b72
Improved swallowing (#140)
* Make swallowing more robust

Changed the flags for the pstree command so it is a single line with all
ancestors.
Removed usage of sed, grep and tr so the iopopen call should be faster.
Find and match of parent pid in the ancestors string is done in lua so
should be faster.

* Improved swallow filter

Now you cna filter window swallowing with 2 tables, one for clients that
cannot be swallowed (dont_swallow_classname_list) and one for clients
that cannot swallow their parents (cant_swallow_classname_list).

* remove occurences of res var

* renamed functions and theme vars more descriptive

* updated module documentation

* check functions combined, is_in_table  1 return

* add old theme vars for compatibility

* short swallow logic and robust filter assignment

* ignore splash and dialog parents

this prevents krita and similar missbehaving programs from swallowing their
splash window.

* consistent docs formatting

* convert module to use an async function

* removed undefined error() function call
this was probably an error handling/logging on the code i used as template for
the async function and it's callback.

* deal with corner case: parent exits before client

if the parent is destroyed "on background" then awesome will show a warning.

* added meself to authors

i don't see my additions as substantial enough to justify this but... ¯\_(ツ)_/¯
2022-01-04 11:14:12 +01:00
Stephen Bolton e0423796b0
Fix handling of signals in scratchpad when client is nil (#148; closes #146) 2021-12-14 20:29:32 +01:00
Cezary Drożak bc26b9ff89
feat: allow disabling tabbar in mstab layout (#145)
closes #143
2021-11-28 10:13:12 +01:00
Kasper 2413bd50a7
Scratchpad stop un and re subscribing (#141)
* Formatting and small improvements

* Refactor to stop resubscribing each time

* Remove prints

* This is less error prone

* Fix abort when tag is switched for the new changes

* Fix animation_turn_off not getting called when only 1 animation is used
2021-11-23 17:43:33 -08:00
contribuewwt 0da8b7b7f0
Merge pull request #135 from undefinedDarkness/fixes
[3/3] Fixes to titlebar indicator and tasklist tabbed indicator
2021-11-16 17:48:28 +05:30
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
Nooo37 92dabc890e
Refactor layout icon path search and also search in package.path (#137, closes #136) 2021-11-06 19:33:58 +01: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
Kasper d1277c10fc
Add a new 'icon-theme' module (#129)
* Add a new 'icon-theme' module

* Chcek for nil on get_gicon_path
2021-11-03 14:38:36 -07:00
gokul f3215bcaec
Update gif for tag_preview docs 2021-10-31 01:22:51 -07:00
gokul 0688673dc4
Update variable in docs and fix syntax errors 2021-10-31 00:18:37 -07:00
gokul f2ec9d9920
Update tag_preview.lua 2021-10-31 00:16:43 -07:00
gokul 4e84a884d9
Added new feature for tag_preview widget (#127)
The tag preview widgets can have a wallpaper background.
2021-10-31 00:14:29 -07:00
Nooo37 2816b2124b chore: update rockspec 2021-10-24 12:42:16 +02:00
nuxsh 2a6afd0594
Add tabbar inactive theme vars to docs (#123) 2021-10-18 09:47:25 +02:00
nuxsh 29d4a87347
Add theme vars to window switcher docs (#122) 2021-10-13 17:28:34 +02:00
Bran 19fa3a2d10
Update docs (#120)
Formatted markdown and lua snippets, removed trailing spaces and made example keybinds compilant with default awesome config

Co-authored-by: Nooo37 <senpai.ackabar@gmail.com>
2021-10-13 17:26:04 +02:00
nuxsh 536009e58e
fix(docs): missing commas in task preview example (#121) 2021-10-11 14:17:58 +02:00
Nooo37 abfd5b8ddd
Add tabbar_{fg,bg}_{normal, focus}_inactive theme vars (#114); closes #112 2021-10-03 16:19:17 +02:00
Kasper 394c3ceeb7
Free ram for widgets with clients previews (#117) 2021-10-03 03:19:48 -07:00
gokul 7f17e7bb8b
Update Docs (#118)
Clarified a few things in the window switcher documentation and added a keybind example.
2021-09-30 12:21:21 -07:00
Nooo37 639c566734
Window switcher docs (#111); closes #106
* add all window switcher theme vars

* add window switcher docs
2021-09-26 12:37:11 +02:00
Kasper 7277f57730
More scratchpad fixes (#109)
* :reset() calls :abort() anyways

* This is no longer needed

* Reduce code duplication

* A more sane name for 'current_tag_on_toggled_scratchpad'

* Don't redefine the functions on every call

* Set stickly to false

* Fix client turning on despite already being on when sticky = true

* Don't set sticky to false when the animation starts, otherwise the client in some cases will immediately disappear

* Set client.sticky = false in helpers.client.turn_off instead

* Remove unused parameter

* Better comment

* Only turn off the client when both animations have ended + stop calling :reset() on the animations

* Correctly animate non floating clients

* Fix scratchpad animations for setups with more than 1 screen

* Try to fix turn off when using multiple screens
2021-09-13 17:22:34 -07:00
Gokul Swaminathan d2e834ae9e Added a max line length to lua files 2021-09-09 00:42:28 -07:00
HeavyRain266 b41284816c
Add .editorconfig (#107)
* Add .editorconfig

* Update README.md

Co-authored-by: gokul <33443763+JavaCafe01@users.noreply.github.com>
2021-09-09 00:26:09 -07:00
Gokul Swaminathan 74dac14a3f Removing the auto formatting
Removing this in favor of editorconfig
2021-09-09 00:24:10 -07:00
github-actions[bot] 1727f1d9f3 Auto: format source code 2021-09-07 20:41:10 +00:00
Kasper ae0a999e1b
Add a window switcher widget (#84) 2021-09-07 22:40:55 +02:00
github-actions[bot] 3fc80c7dfd Auto: format source code 2021-08-27 18:01:22 +00:00
gokul 489f2a3490
Update format.yml 2021-08-27 11:01:07 -07:00
gokul 6dfd669b24
Added workflow for formatting (#102) 2021-08-27 10:45:52 -07:00
Kasper 0fb8534191
Scratchpad improvements (#96)
* Make scratchpads work with rubato

* Set floating to true when animating

* Fix for clients becoming invisible after toggling off on other tags

* Fixes for animations not getting played when opening/closing scratchpad on multiple tags

* Remove old debug code

* Fix for edge case when launching an app (not via a scratchpad) and then toggle it off via a scratchpad

* Handle changing tag mid turn off animation

* Remove disable_floating_on_close

* Reorder some stuff

* Use the new ended event

* Refactor to reduce code duplication

* Fix an issue caused by not unsubscribing when switching tag mid animation

* Animate also when launching the client

* also for 4.3

* Emit the inital_apply signal on unstable

* Rename awestore to animation

* Consistency

* No need for this anymore as we are recalling :apply anyway

* Can't have scratchpads opened up as fullscreen / maximized

* Floating must be true for animations

* Rename awestore to animation

* Fix clients teleporting on turn_off when the position was changed from the initial scratchpad position

* Rename animation to rubato and notify that awestore is no longer supported

* Update documentation

* Update scratchpad.lua

Co-authored-by: gokul <33443763+JavaCafe01@users.noreply.github.com>
2021-08-26 10:31:27 -07:00
Kasper 048cf41e0a
Add playerctl lib signals debounce as a better workaround for #77 (#95)
* A better workaround for BlingCorp/bling#77

* whoops.....
2021-08-22 22:04:40 -07:00
Kasper 5531371501
fix scratchpad rules not being applied when an existing client is not found (#83) 2021-08-22 13:23:38 +02:00
Nooo37 91650152bc add 'docs' for the deck layout 2021-08-19 10:40:47 -07:00
Nooo37 c0ead60b63 add deck layout 2021-08-19 10:40:47 -07:00
Nooo37 bda2e55643
return to previous version for window swallowing; closes #65 (#92)
Window swallowing is still very unreliable (probably by the nature of the task at hand) but at least that makes the module useable again
2021-08-19 12:16:21 +02:00
contribuewwt a96c7ca67a
fixed documentation (#91) 2021-08-18 23:01:31 -07:00
gokul 7387f6d53c
Update _sidebar.md 2021-08-18 11:43:53 -07:00