Changing PC settings if laptop is docked/a second monitor is connected?
Changing PC settings if laptop is docked/a second monitor is connected?
I have a laptop that spends some of it's time docked to a monitor and keyboard/mouse. I would like to know how to change some settings depending on if it's connected to the dock or not. Is there a program that can help with this?
Some possible use-cases include:
- Changing size of the taskbar to smaller/bigger
- Changing the behavior of the taskbar to auto-hide
- Changing the font size smaller/bigger
- Changing power settings performance/battery saver
- Enabling/disabling auto brightness
- Enabling/disabling keyboard backlight
These are just a few things I can think of but can provide more.
Something like Android's Tasker but for Linux would be great.
Udev rules and a bash script
I'm a bit (maybe a lot) of a noob to Linux
What are Udev rules and bash scripts?
A bash script is like a shell script in Windows. It is a text file that runs multiple commands in order. As if you opened the terminal and typed them in yourself.
Udev rules I need to learn about but based on context I have to assume it's a tool for running scripts when specific events happen (like a monitor being plugged in)
bash is one of many ways to interface with linux from shell/terminal, it is what you use to install updates in terminal and can be used to create scripts for automation.
udev is like an admin tool, udev rules allows a user to apply rules to systems, like if keyboard is removed launch x-application.
Google is helpful when you have questions 😉
It seems that you need to read up on the basics of Linux if you don't know what a bash script is.
Thanks. I know my way around bash scripts but I guess it's time to learn Udev rules. Are you aware of any examples I can find online?