Giter VIP home page Giter VIP logo

gala-alt-tab-plus's Introduction

Gala Alt Tab Plus

Replace the default alt-tab behavior of gala/elementary os with a simpler UI inspired by the Gnome switcher and MacOS.

Example of application switcher

⚠️ If you are looking for an Elementary 6 Odin compatible version check out small-tech/catts. ⚠️

This is based off of tom95/gala-alternate-alt-tab

Build Requirements

  • elementary-sdk
  • libclutter-1.0-dev
  • libwnck-3-dev

Make sure you apt install all of the above requirements before trying to build.

Install

build from sources:

mkdir build
cd build
cmake ..
make
sudo make install

# Restart gala
sudo gala --replace &

Running tests

Modifying the primary gala instance can result in a broken desktop that requires a restart to fix. To avoid this, you should use xephyr:

sudo apt install xserver-xephyr
# Run the test script starts up xephyr, calculator and xterm
./test.sh

With xephyr active you can give it focus with ctrl-shift and test out the new alt-tab behavior.

Once you're done testing you can remove the plugin with.

./cleanup.sh

Troubleshooting

Alt + Shift + Tab doesn't work

Elementary ships with Alt + Shift bound 'switch layouts'. Make sure you go into 'Settings > Keyboard > Layout' and remove/reassign this keybinding.

Tested versions

  • Elementary OS 5.1.6

gala-alt-tab-plus's People

Contributors

aral avatar markstory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

small-tech

gala-alt-tab-plus's Issues

Apps that launch while switcher is active should appear in switcher

  1. Launch an app that takes a few moments to launch (e.g., VSCod(e/ium))
  2. Open the task switcher (note that app is not there as it hasn’t launched yet)
  3. App launches

What should happen

App icon should appear in switcher and you should be able to switch to it.

What actually happens

Nothing.

Workaround

Close switcher and open it again to have the app show up.

"meta/screen.h: No such file or directory" compiling error

I installed all the dependencies stated at the docmentation , then tried compiling the application but i was prompted with this error

>> pwd
/home/nixnode/Documents/gala-alt-tab-plus/build

>> cmake ..
-- checking for a minimum Vala version of 0.22
--   found Vala, version 0.48.18
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nixnode/Documents/gala-alt-tab-plus/build

>> make 
[ 25%] Building C object CMakeFiles/gala-alt-tab-plus.dir/src/Main.c.o
/home/nixnode/Documents/gala-alt-tab-plus/build/src/Main.c:32:10: fatal error: meta/screen.h: No such file or directory
   32 | #include <meta/screen.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/gala-alt-tab-plus.dir/build.make:71: CMakeFiles/gala-alt-tab-plus.dir/src/Main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/gala-alt-tab-plus.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Use left / right arrows to select tabs

Hello there, would it be possible to implement selection via arrow keys in the switcher view?

I'm coming back to pantheon after a few years on gnome shell and there's this little thing missing that I've found super useful: when using alt + tab, then we're able to use left and right arrow keys to navigate to the previous / next tabs in the switcher.

For backward switching, it's way easier to reach the left arrow than the sift + tab keys.

I should be able to drag and drop into apps using the switcher

Use case

I have something I want to open in one of my running apps.

  1. I start dragging in the source app
  2. I open the task switcher and drop onto the icon of the app I want as the target of my drag and drop

What should happen

A drop should register on the target app

What actually happens

Nothing.

(I’m actually unable to even carry out Step 2 due to #8).

Should show status when only one app is active

Just now I found myself wondering if my alt key had stopped working as I had a single app open by pressing alt + tab didn’t do anything.

My expectation is that it would show that app.

(In this case, of course, you cannot do anything with the switcher but it does reinforce the fact that there is one app running and it also differs from the behaviour of no apps running – in the same workspace, in the case of elementary OS.)

I’m preparing a pull request for this as we speak.

Switcher breaks drag and drop (it should not react to mouse input outside its own view)

Use case

I want to drag and drop something from one app to another (which is not on screen).

  1. I start dragging from the source app
  2. I open the switcher to try alt+tab to the target app

What should happen

I should be able to alt+tab to the other app and complete my drag and drop.

What actually happens

A battle commences between the task switcher and my drag and drop action. I’m unable to switch to the target app.

Workaround

Make sure the target app is not hidden before starting a drag and drop.

Screen corruption when no windows are open

To reproduce

  1. Make sure there are no open windows in the current workspace
  2. Press alt + tab

What should happen

Nothing.

What actually happens

The screen goes black.

Proposed solution

The plugin is currently not checking for this edge case. I’ve fixed it locally and will submit a pull request shortly.

Does not activate

Hi there,

I followed the build and installation instructions on 5.1.7 and I can’t seem to activate it. The build succeeds (with deprecation warnings) and the installation and replacing gala work but I see the default alt-tab behaviour.

Output of cmake ..:

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vala: /usr/bin/valac  
-- checking for a minimum Vala version of 0.22
--   found Vala, version 0.40.24
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for modules 'gala;granite;libwnck-3.0'
--   Found gala, version 3.3.2
--   Found granite, version 5.5.0
--   Found libwnck-3.0, version 3.24.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aral/sandbox/gala-alt-tab-plus/build

Output of make:

[ 25%] Generating src/Main.c, src/Widgets/RoundedActor.c
/home/aral/sandbox/gala-alt-tab-plus/src/Main.vala:435.13-436.35: warning: `Gdk.Display.get_device_manager' has been deprecated since 3.20.
/home/aral/sandbox/gala-alt-tab-plus/src/Main.vala:435.13-437.35: warning: `Gdk.DeviceManager.get_client_pointer' has been deprecated since 3.20
Compilation succeeded - 2 warning(s)
Scanning dependencies of target gala-alt-tab-plus
[ 50%] Building C object CMakeFiles/gala-alt-tab-plus.dir/src/Main.c.o
/home/aral/sandbox/gala-alt-tab-plus/build/src/Main.c: In function ‘gala_plugins_alt_tab_plus_main_get_current_modifiers’:
/home/aral/sandbox/gala-alt-tab-plus/build/src/Main.c:1571:2: warning: ‘gdk_display_get_device_manager’ is deprecated: Use 'gdk_display_get_default_seat' instead [-Wdeprecated-declarations]
  _tmp2_ = gdk_display_get_device_manager (_tmp1_);
  ^~~~~~
In file included from /usr/include/gtk-3.0/gdk/gdkscreen.h:32:0,
                 from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from /usr/include/mutter/meta/common.h:34,
                 from /usr/include/mutter/meta/boxes.h:26,
                 from /usr/include/mutter/meta/compositor.h:27,
                 from /usr/include/mutter/meta/meta-plugin.h:26,
                 from /usr/include/gala/gala.h:11,
                 from /home/aral/sandbox/gala-alt-tab-plus/build/src/Main.c:29:
/usr/include/gtk-3.0/gdk/gdkdisplay.h:171:20: note: declared here
 GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/aral/sandbox/gala-alt-tab-plus/build/src/Main.c:1572:2: warning: ‘gdk_device_manager_get_client_pointer’ is deprecated [-Wdeprecated-declarations]
  _tmp3_ = gdk_device_manager_get_client_pointer (_tmp2_);
  ^~~~~~
In file included from /usr/include/gtk-3.0/gdk/gdkdisplay.h:32:0,
                 from /usr/include/gtk-3.0/gdk/gdkscreen.h:32,
                 from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from /usr/include/mutter/meta/common.h:34,
                 from /usr/include/mutter/meta/boxes.h:26,
                 from /usr/include/mutter/meta/compositor.h:27,
                 from /usr/include/mutter/meta/meta-plugin.h:26,
                 from /usr/include/gala/gala.h:11,
                 from /home/aral/sandbox/gala-alt-tab-plus/build/src/Main.c:29:
/usr/include/gtk-3.0/gdk/gdkdevicemanager.h:44:14: note: declared here
 GdkDevice *  gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 75%] Building C object CMakeFiles/gala-alt-tab-plus.dir/src/Widgets/RoundedActor.c.o
In file included from /home/aral/sandbox/gala-alt-tab-plus/build/src/Widgets/RoundedActor.c:25:0:
/usr/include/granite/granite.h:2090:1: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations]
 gchar* granite_text_style_get_stylesheet (GraniteTextStyle self,
 ^~~~~
/usr/include/granite/granite.h:586:15: note: declared here
 typedef enum  {
               ^
/usr/include/granite/granite.h:2110:1: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations]
 void granite_widgets_utils_apply_text_style_to_label (GraniteTextStyle text_style,
 ^~~~
/usr/include/granite/granite.h:586:15: note: declared here
 typedef enum  {
               ^
[100%] Linking C shared library libgala-alt-tab-plus.so
[100%] Built target gala-alt-tab-plus

Output of sudo make install:

[100%] Built target gala-alt-tab-plus
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/x86_64-linux-gnu/gala/plugins/libgala-alt-tab-plus.so
-- Set runtime path of "/usr/local/lib/x86_64-linux-gnu/gala/plugins/libgala-alt-tab-plus.so" to ""

Output of G_MESSAGES_DEBUG=all gala --replace:

** (gala:4379): DEBUG: 12:15:18.790: Settings.vala:164: Loading settings from schema 'org.gnome.desktop.background'
** (gala:4379): DEBUG: 12:15:18.791: Settings.vala:164: Loading settings from schema 'org.pantheon.desktop.gala.appearance'
** (gala:4379): DEBUG: 12:15:18.792: Settings.vala:164: Loading settings from schema 'org.pantheon.desktop.gala.keybindings'
Window manager warning: Trying to re-add keybinding "switch-to-workspace-last".
Window manager warning: Trying to re-add keybinding "move-to-workspace-last".
** (gala:4379): DEBUG: 12:15:18.792: Settings.vala:164: Loading settings from schema 'org.pantheon.desktop.gala.shadows'
** (gala:4379): DEBUG: 12:15:18.793: Settings.vala:164: Loading settings from schema 'org.pantheon.desktop.gala.behavior'
** (gala:4379): DEBUG: 12:15:18.796: PluginManager.vala:126: Loaded plugin Mask Corners (libgala-maskcorners.so)
** (gala:4379): DEBUG: 12:15:18.798: PluginManager.vala:126: Loaded plugin Notify (libgala-notify.so)
** (gala:4379): DEBUG: 12:15:18.799: PluginManager.vala:126: Loaded plugin Popup Window (libgala-pip.so)
** (gala:4379): DEBUG: 12:15:18.801: PluginManager.vala:126: Loaded plugin Zoom (libgala-zoom.so)
** (gala:4379): DEBUG: 12:15:18.803: PluginManager.vala:126: Loaded plugin wingpanel-interface (libwingpanel-interface.so)
** (gala:4379): DEBUG: 12:15:18.803: Settings.vala:164: Loading settings from schema 'org.pantheon.desktop.gala.mask-corners'
** (gala:4379): DEBUG: 12:15:18.852: Settings.vala:53: Bind 'PlankDockPreferences' to '/net/launchpad/plank/docks/dock1/'

** (gala:4379): WARNING **: 12:15:18.853: Preferences.vala:192: '/usr/share/themes/elementary/plank/dock.theme' is read-only!
** (gala:4379): DEBUG: 12:15:18.853: Preferences.vala:349: Loading preferences from file '/usr/share/themes/elementary/plank/dock.theme'
(gala:4379): wingpanel-DEBUG: 12:15:18.911: Main.vala:76: DBus service registered.

(gala:4379): GLib-GObject-WARNING **: 12:15:19.171: invalid cast from 'CoglTexture2D' to '(null)'

System details:

OS: elementary OS 5.1.7 Hera x86_64 
Host: LabTop Mk IV 
Kernel: 5.4.0-56-generic 
Uptime: 1 min 
Packages: 2013 
Shell: zsh 5.4.2 
Resolution: 3840x2160 
DE: Pantheon 
WM: Mutter(Gala) 
Terminal: io.elementary.t 
CPU: Intel i7-10710U (12) @ 4.700GHz 
GPU: Intel Device 9bca 
Memory: 1425MiB / 15883MiB 

Hera 5.1.7 start errors

Hera 5.1.7 Launch Failure

Compiles and installs without a hitch, but throws an 'unsupported session type' on gala --replace &

I don't have a 5.1.6 iso to check whether the problem is specific to the 5.1.7 build :(

Screenshot from 2021-01-08 18 07 28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.