GithubHelp home page GithubHelp logo

linux-convertible's Introduction

linux-convertible

Tools for using 2-in-1 convertible laptops with Linux

Features

  • Auto-rotation and rotation lock (if DE doesn't provide it)
  • Detecting orientation change
  • Auto-maximizing windows in tablet mode (optional)
  • Toggle between laptop and tablet mode manually
  • Recovering xrandr orientation and scaling from abnormal xrandr changes

Requirements

  • notify-send (libnotify)

For X11 (not required for Wayland):

  • xinput, xrandr (xinput)
  • wmctrl, xdotool (Not required for GNOME)

Install

git clone https://gitlab.com/kosmospredanie/linux-convertible.git
cd linux-convertible
./install.sh

You might need to add $HOME/.local/bin to your PATH:

mkdir -p ~/.config/environment.d
echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.config/environment.d/path.conf

And restart your session. (log-out & log-in again)

Usage

Use application entries Tablet Mode and Rotation Lock created in the applications menu.

  • Tablet Mode: Toggle tablet mode
  • Rotation Lock: Toggle screen rotation lock

Configuration

There are callback script files in ~/.convertible:

  • ~/.convertible/landscape: Called when changed to landscape orientation.

  • ~/.convertible/portrait: Called when changed to portrait orientation.

  • ~/.convertible/laptop: Called when switched to laptop mode.

By default, it enables keyboards, touchpads, and trackpoints.

  • ~/.convertible/tablet: Called when switched to tablet mode.

By default, it starts auto-maximizing and disables keyboards, touchpads, and trackpoints.

  • ~/.convertible/display: Called once on session startup, before linux-convertible starts.

You can put your display settings to this script, and linux-convertible keeps the settings. e.g.:

#!/bin/sh
[ "$XDG_SESSION_TYPE" = "x11" ] && xrandr --output eDP1 --scale 1.6

linux-convertible's People

Contributors

apebl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

belamu

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.