{"id":20152704,"url":"https://github.com/ozankiratli/controlsfromterminal","last_synced_at":"2026-02-08T01:33:14.466Z","repository":{"id":183299026,"uuid":"173892501","full_name":"ozankiratli/ControlsFromTerminal","owner":"ozankiratli","description":"This set of bash scripts allows one to control different interfaces through terminal. ","archived":false,"fork":false,"pushed_at":"2024-08-15T03:46:09.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-21T04:27:18.315Z","etag":null,"topics":["linux-shell","swaywm"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozankiratli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T06:59:08.000Z","updated_at":"2024-08-15T03:46:12.000Z","dependencies_parsed_at":"2024-06-21T23:48:31.704Z","dependency_job_id":"255458e0-9342-492b-8f70-4435c6debca7","html_url":"https://github.com/ozankiratli/ControlsFromTerminal","commit_stats":null,"previous_names":["evolozzy/controlsfromterminal","ozankiratli/controlsfromterminal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ozankiratli/ControlsFromTerminal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankiratli%2FControlsFromTerminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankiratli%2FControlsFromTerminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankiratli%2FControlsFromTerminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankiratli%2FControlsFromTerminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozankiratli","download_url":"https://codeload.github.com/ozankiratli/ControlsFromTerminal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozankiratli%2FControlsFromTerminal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29216086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T00:10:47.190Z","status":"ssl_error","status_checked_at":"2026-02-08T00:10:43.589Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux-shell","swaywm"],"created_at":"2024-11-13T23:13:35.077Z","updated_at":"2026-02-08T01:33:14.442Z","avatar_url":"https://github.com/ozankiratli.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ControlsFromTerminal\nThis set of bash scripts allows one to control different interfaces through terminal. \n\nThere are 5 main scripts in this repository, `backlight` to control your laptop backlight, `volume` to control and limit your volume through `pulseaudio` (requires `pactl`), `keyboard` to enable/disable keyboard, `touchpad` to enable/disable touchpad, and `alacrittyResizeFont` an ultra short script to resize the font with a single command.\n\nAlso there are 2 legacy scripts for X11, `brightness` to control your brightness easily through `xrandr`, `monset` for setting up your monitors and keeping the settings with `xrandr`. These legacy scripts will not be updated anymore. All of the files are coded in bash script, you need `awk`, `grep`, `wc`, and `bc` installed, almost all Linux systems have them installed as default.\n\n## INSTALLING\n1. Copy the cftconfig folder under `~/.config/`. \n2. Run `sudo ~/.config/cftconf/install-scripts.sh`. This script will create required symbolic links to `/usr/local/bin/`.\n\n\n## BACKLIGHT\n\nThe files, `backlight` and `.config/cftconf/backlight/backlight.conf` are files needed to control your backlight.\n\n***WARNING!*** To use the script make sure you know the path that controls your backlight.\n\n### Before using \n\n1. Change the mode of the brightness file to 666. (requires sudo privileges)\n\nExample:\n```\nchmod 666 /sys/class/backlight/intel_backlight/brightness\n```\n***Important:*** The mode of the file above will turn back to normal. There are two solutions for this.\ni) You can add the following line to `crontab` as root (`sudo crontab -e`).\n```\n@reboot chmod 666 /sys/class/backlight/intel_backlight/brightness\n```\n\nii) If you choose to use systemd you can edit `startup.sh` to include the file to brightness and create a systemd service at boot. \n\n2. Change the path to the `brightness` file that has the value of backlight level in `backlight.conf`.\n\n\n### Usage\n```\nbacklight [OPTION]\n```\n- This script takes only one option, second will be discarded\n- To increase backlight brightness:             `backlight u`\n- To decrease backlight brightness:             `backlight d`\n- To directly adjust backlight brightness:      `backlight \u003cNUM\u003e` (1-100 or 1-LEVELS according to your configuration)\"\n- To turn backlight off:                        `backlight off` \n- To display help:                              `backlight -h | --help`\n\n\n### Notes to swaywm users having problems with hotkeys\nAfter copying the files into `/usr/local/bin`\n\nAdd the contents to your config file:\n```\nbindsym XF86MonBrightnessUp exec backlight u # increase screen brightness\nbindsym XF86MonBrightnessDown exec backlight d # decrease screen brightness\n```\n\n## VOLUME\nThis script detects and controls the sound on the active sink instead of \"Master\" or a given sink. \nIt also allows switching between sinks. It is tested and works for multiple USB outputs. Changing output within sink which allows switching between HDMI outputs, headphones, and computer speakers, is still missing. \n\nThe files needed are `volume` and `./config/cftconfig/volume/volume.conf`\n\n***Unimportant note:*** The reason to code this was that I've had experiences where I had problems controlling the sound using the scripts and programs available. \n\n ### Usage\nCorrect usage:  volume [OPTIONS]\n \n- If you want to change the sink use '-s \u003csink\u003e' before 'u' or 'd' \n- To increase volume:             `volume u`\n- To decrease volume:             `volume d`\n- To directly adjust volume:      `volume \u003cNUM\u003e` (1-100 or 1-LEVELS according to your configuration)\n- To mute:                        `volume mute`\n- To select sink:                 `volume -s \u003csink\u003e` (Default: @DEFAULT_SINK@)\n- To switch output:               `volume switchsinks`\n- To display help:                `volume -h` or  `--help`\n\n\n## KEYBOARD - _Under development. Currently only works with sway_ \nThis script enables and disables keyboard. \n\n### Before using \nFind the input device identifier with `swaymsg -t get_inputs` and edit the script to set `DEVICE`.\n\n### Usage\n - To enable keyboard:            `keyboard e`\n - To disable keyboard:           `keyboard d` \n\n\n## TOUCHPAD - _Under development. Currently only works with sway_ \nThis script enables and disables touchpad. \n\n### Before using \nFind the input device identifier with `swaymsg -t get_inputs` and edit the script to set `DEVICE`.\n\n### Usage\n - To enable touchpad:            `touchpad e`\n - To disable touchpad:           `touchpad d` \n\n\n## CHANGE FONT SIZE IN ALACRITTY \nChanges the font size in Alacritty. \n\n### Usage\n - To display current font size:  `alacrittyResizeFont`  \n - To change font size:           `alacrittyResizeFont \u003csize\u003e`\n\n\n## BRIGHTNESS -- _X11 Legacy not developed anymore_\nThe file `brightness` can be used to control the brightness of the screen. It changes `--brightness` setting of `xrandr`.\n\n### Before using \nCopy the file, `brightness` wherever you want with `backlightconfig` and run.\n\n### Usage\n\n- To increase brightness:                       `bright -u`\n- To decrease brightness:                       `bright -d`\n- To set brightness to default value:           `bright -m`\n- To directly adjust backlight brightness:      `bright -n \u003cNUM\u003e` (0-2 in decimals, eg. 0.8)\n- To show connected displays:                   `bright -s`\n- To set display to be adjusted:                `bright -D \u003cdisplayname\u003e` \n- To display help                               `bright -h or bright --help`\n\nDefault display is primary display! You don't need to use -D flag if you want to change the brightness settings of primary display.\n\n\nThe script is tested with Dell 9560, Ubuntu 18.04 and i3wm.\n\n\n## MONSET -- _X11 Legacy not developed anymore_\nThis script is still under development, so it might still have bugs. Please read carefully before using. \n\nIt uses xrandr and is designed to use multiple monitor setups interchangably. \n\nThe files needed are: \n- Script file: `monset`\n- Monitor list: `.config/cftconf/monset/MONITORS`\n- Monitor configs: `.config/cftconf/monset/MONITORCONFIG`\n\n**IMPORTANT**: Make sure that all monitors and monitor settings have distinct names, it causes problems. (Example: Don't name office monitor `office` and office setting `office` too, change one or the other.)\n\n\n### Adding unsaved monitors to monitor list\nAt the moment, the monitors that are being used should be saved manually into the `MONITORS` file. \n1. Use `xrandr --prop | grep -w \"connected\" | awk '{print $1}'` to detect which outputs are connected to monitors. The output should give you the outputs with connected monitors. Such as `HDMI-1`\n2. Use the names of those in the following command to get first line of EDID. `xrandr --prop |  grep HDMI-1 -A 30 | grep EDID -A 8 | tail -8 | head -1 | grep -o \"[A-Za-z0-9]*\"` (Change `HDMI-1` with the connected monitor you get) This should give you something like \n`00ffffffffffff006258df1213131932`\n3. Add the monitor to your `MONITORS` file with the name of the monitor. `echo \"PC-mon 00ffffffffffff006258df1213131932 \u003e\u003e ~/.config/MONITORS` \n4. Repeat this process for all monitors you have. Make sure that all monitors have separate names.\n\n### Setup file \nI will add more details but for the time look at sample config files. \n\n\n### Feature requests\nFeel free to submit feature requests.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozankiratli%2Fcontrolsfromterminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozankiratli%2Fcontrolsfromterminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozankiratli%2Fcontrolsfromterminal/lists"}