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.

    • Jediwan@lemy.lolOP
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      1 month ago

      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)

          • olympicyes@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 month ago

            I’d suggest editing these scripts with a tool like VS Code so you can remember exactly what you did.

            • Gormadt@lemmy.blahaj.zone
              link
              fedilink
              arrow-up
              3
              ·
              1 month ago

              Half the fun of fixing my code later is trying to figure out what the hell I was thinking when I wrote my code lol

          • golden_zealot@lemmy.ml
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            1 month ago

            You might also be interested in cron/crontab. You can schedule scripts/software to run at specific times of day, week, month, year etc.

            Also if you want to learn more about the linux command line, three super useful commands for you are ‘man’, ‘help’ and ‘apropos’.

            man followed by a command, like ‘man find’ will show you the manual pages for the command ‘find’, showing you how to use it.

            In some cases man wont work for some commands, in those cases try ‘help theCommandThatDidntWorkWithMan’.

            apropos followed by a query like ‘apropos network’ will show you any commands that have ‘network’ in their short description to help you find commands that you might want to use for something.

          • squid_slime@lemm.ee
            link
            fedilink
            arrow-up
            2
            ·
            1 month ago

            gnome might be tricky to interface with over shell commands, and sadly i use sway so i am limited with advice, checking ubuntu forums would be a good start for you though.

      • Gormadt@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        2
        ·
        1 month ago

        I never knew that was called bash, not sure how I missed the name up to this point lol

        And Udev sounds like something I’m going to get a hell of a lot of use out of given my love of Tasker on Android (basically have it set to do specific things when certain triggers occur (like connecting or disconnecting to or from specific Bluetooth devices, reading specific NFC tags, etc)). I just never thought of trying to set something up like that on my desktops.

    • squid_slime@lemm.ee
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      1 month ago

      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.

    • pete_the_cat@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      8
      ·
      1 month ago

      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.

        • pete_the_cat@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          1 month ago

          Yeah, if you feel like waiting for an answer when you could easily do it yourself in two seconds.

      • golden_zealot@lemmy.ml
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        1 month ago

        Google is helpful when you have questions

        Haha, what’s it like living in 2012 still?

          • golden_zealot@lemmy.ml
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 month ago

            Astounding, apparently you can counter the findings of this paper which proves beyond reasonable doubt that google is progressively getting worse when it comes to returning reliable and accurate search engine results.

            https://downloads.webis.de/publications/papers/bevendorff_2024a.pdf?ref=404media.co

            I’m sure the scientific community would be really glad to see the evidence you have to the contrary, I’ll even peer review your paper for you, let me know when you have a draft ready.

            • pete_the_cat@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 month ago

              Just because it’s becoming less useful doesn’t mean it’s useless. I search for stuff every day and can find the answer I’m looking for in under a few minutes.

              • golden_zealot@lemmy.ml
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 month ago

                You know what? That is actually some sound reasoning and I think that is an acceptable response.

                I intended my original comment to be more a a shot at google than yourself, but I can see why you came back with what you said as a result, and then I got salty about it so I apologize.

                • pete_the_cat@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  1 month ago

                  Apology accepted 🙂

                  Google gets a lot of hate, and they, as a company and as a search engine have gotten worse over the years, but they still do a lot of stuff right. I never took it personally, just giving an example.