Giter Site home page Giter Site logo

hotplug-monitor's Introduction

Hotplug Monitor Handling

This repository captures my fiddling to create a udev rule and a small script that changes the text scaling factor depending on the plug in state of an external monitor.

The script is pretty much configured to my specific needs. To make use of it you will need to adapt the username this runs at, the path where the files are located and the external monitor port (DP-2 in my case).

Credits for the solution that I found for me go to:

Installation

sudo cp etc/udev/rules.d/95-hotplug-monitor.rules /etc/udev/rules.d/95-hotplug-monitor.rules

# Edit rules file
sudo vim /etc/udev/rules.d/95-hotplug-monitor.rules

# Edit script file to do what you need
vim hotplug_monitor.sh

Create a Gnome hotkey

If you want to create a hotkey in Gnome to run the script manually, follow these steps:

  • Open Settings -> Keyboard -> Customize Shortcuts -> Own Shortcuts
  • Click "Add Shortcut"
    • Give it a name: "Hotplug Monitor"
    • Add the complete path to hotplug_monitor.sh including the script name into the command line
    • Choose a shortcut - I use CTRL + SUPER + ALT + h

Notes:

The 2 files ?mon_scale.sh are not really used in this scenario. I created them and added hotkeys in Gnome to manually switch text-scaling when I didn't have the rule working. They are here for historical and sentimental reasons.

hotplug-monitor's People

Contributors

tuhlmann avatar

Watchers

 avatar  avatar

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.