Skip to content

Idea/Question: Quick and easy way to launch spacefn #4

Description

@maciejmotyka

I wanted to share my way of quickly launching spacefn and ask if it's safe to do it this way. This is all very basic Linux magic, but maybe less experienced users can learn something from it.
I have 2 scripts sfn and sfn2, which enable spacefn for either my laptop keyboard or an external keyboard. I put them into /usr/local/bin. Both are the same except for my_device

#! bin/env bash
nohup spacefn /dev/input/my_device &
exit

Then I do

sudo chmod +x /usr/local/bin/sfn{1,2}
sudo chown root:root /path/to/spacefn
sudo chmod u+s /path/to/spacefn

and I'm able to launch spacefn without specifying the device, typing password, having to keep a terminal open or put the process to the background to be able to close the terminal.

Do you see any downsides? How do you launch spacefn?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions