Metadata-Version: 2.1
Name: riverwm-utils
Version: 0.0.5
Summary: Utilities for the River Wayland compositor
Home-page: https://github.com/NickHastings/riverwm-utils
Author: Nick Hastings
Author-email: nicholaschastings@gmail.com
License: GPLv3
Description: # riverwm-utils
        Utilities for the River Wayland compositor. Currently just one utility is included.
        
        ## Usage
        
        ### cycle-focused-tags
        
        Change to either the next or previous focused tags.
        
        As can be seen in a [pull
        request](https://github.com/riverwm/river/pull/506), this
        functionality can easily be built directly into river. However, [as
        explained by Leon
        Plickat](https://github.com/riverwm/river/pull/506#issuecomment-1008021752)
        there is a plan to separate the window management to a separate
        client, and as such new additions are not being accepted. The
        approach implemented here was suggested and sample code was
        provided. That sample code forms the basis of this script.
        
        The script takes two arguments: the first is being the direction
        next|previous, the second being the maximum number of tags at which
        the cycling should wrap back to the first tag (or to the last tag from
        the first tag). 
        
        If the second argument is omitted the maximum number of tags is
        assumed to be 32.  If both arguments are ommited the direction,
        next, will be used.
        
        The script can be called using spawn in the users init file. For example:
        ```
        riverctl map normal Mod4 Up spawn "cycle-focused-tags previous 9"
        riverctl map normal Mod4 Down spawn "cycle-focused-tags next 9"
        ```
        
        
        ## Install
        
        ### Development version
        Clone the repository:
        ```
        git clone https://github.com/NickHastings/riverwm-utils.git
        ```
        Install locally with pip
        ```
        python3 -m pip install ./riverwm-utils
        ```
        ### Stable realeases
        ```
        python3 -m pip install riverwm-utils
        ```
        
        ### Wayland protocols and pywayland
        Before you will be able to run `cycle-focused-tags`, the relevant
        wayland protocol xml files will need to be scanned by
        pywayland. pywayland will automatically be installed by pip as a
        dependency of riverwm-utils, but the wayland protocols may or may not
        already be on your system. The required files are:
        - wayland.xml
        - river-control-unstable-v1.xml
        - river-status-unstable-v1.xml
        
        The first of these should be avaiable from wayland development package
        provided by your systems package manager. Examples of how to install
        (get root permissions in whatever way you would normally):
        
        Debian
        ```
        apt install libwayland-dev
        ```
        Void
        ```
        xbps-install -S wayland-devel
        ```
        Arch
        ```
        pacman -S wayland
        ```
        
        The river protocol files are not installed by the river
        installer. They do however reside in the river source tree under the
        protocol directory.
        
        If you are using a river package from https://www.ne.jp/asahi/nickh/debian/
        they will be under /usr/share/river-protocols/
        
        Once all three files are on your system the pywayland scanner can be run. Eg
        ```
        python3 -m pywayland.scanner -i /usr/share/wayland/wayland.xml \
                 /usr/share/river-protocols/river-control-unstable-v1.xml \
                 /usr/share/river-protocols/river-status-unstable-v1.xml
        ```
        
        Again note that unless using the Debian packages you'll almost
        certainly need to change `/usr/share/river-protocol` to the path to
        the river soruce tree. Eg `~/.local/src/river/protocol`
        
        If all is well, you should see output like:
        ```
        INFO:__main__:Parsed 3 input xml files
        INFO:__main__:Generated protocol: wayland
        INFO:__main__:Generated protocol: river_control_unstable_v1
        INFO:__main__:Generated protocol: river_status_unstable_v1
        ```
        and then run `cycle-focused-tags` to swich tags.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.7
Description-Content-Type: text/markdown
