How to use the command 'blight' (with examples)

How to use the command 'blight' (with examples)

The ‘blight’ command is a utility that allows you to change the display brightness of your device. It provides various features, such as setting the display brightness to a specific percentage, showing the current display brightness, printing the maximum display brightness, and increasing or decreasing the display brightness. This command is especially useful for devices that do not have a physical function key for adjusting the brightness.

Use case 1: Set display brightness to 50%

Code:

blight set 50 -r

Motivation: This use case is helpful when you want to adjust the display brightness to a specific percentage, in this case, 50%. It allows you to easily customize the brightness level according to your preferences.

Explanation:

  • set: This argument specifies that the command is used to set the display brightness.
  • 50: This argument represents the desired display brightness percentage that you want to set.
  • -r: This flag specifies that the set command should be applied immediately on the current display.

Example output: The display brightness is set to 50%.

Use case 2: Show current display brightness

Code:

blight show

Motivation: You may want to check the current display brightness before making any changes. This use case allows you to quickly obtain information about the current brightness level.

Explanation:

  • show: This argument tells the command to display the current display brightness.

Example output: The current display brightness is 70%.

Use case 3: Print maximum display brightness

Code:

blight max

Motivation: It is useful to know the maximum display brightness supported by your device. This information can help you understand the display capabilities and set appropriate brightness levels.

Explanation:

  • max: This argument instructs the command to print the maximum display brightness.

Example output: The maximum display brightness is 100%.

Use case 4: Increase display brightness in %

Code:

blight inc 20 -r

Motivation: When you need to increase the display brightness by a specific percentage, this use case comes in handy. It allows you to quickly adjust the brightness level without manually searching for the brightness controls.

Explanation:

  • inc: This argument specifies that the command should increase the display brightness.
  • 20: This argument represents the percentage by which the display brightness should be increased.
  • -r: This flag indicates that the increased brightness should be immediately applied.

Example output: The display brightness is increased by 20%.

Use case 5: Decrease display brightness with internal units

Code:

blight dec 10

Motivation: If you prefer to decrease the display brightness using internal units rather than percentages, this use case is useful. It allows you to manually adjust the brightness using the internal units supported by ‘blight’.

Explanation:

  • dec: This argument signifies that the command is used to decrease the display brightness.
  • 10: This argument represents the amount of brightness decrease in internal units.

Example output: The display brightness is decreased by 10 internal units.

Conclusion:

The ‘blight’ command provides a convenient way to control the display brightness on your device. Whether you want to set a specific brightness level, check the current brightness, find the maximum brightness, increase the brightness in percentages, or decrease it using internal units, ‘blight’ has got you covered. With its simple and versatile functionality, you can effortlessly customize the display brightness based on your preferences.

Related Posts

How to use the command 'openfortivpn' (with examples)

How to use the command 'openfortivpn' (with examples)

Openfortivpn is a VPN client that is used for Fortinet’s proprietary PPP+SSL VPN solution.

Read More
Managing GitHub Secrets with gh secret (with examples)

Managing GitHub Secrets with gh secret (with examples)

List secret keys for the current repository Code: gh secret list Motivation: By listing the secret keys for the current repository, you can easily view all the secrets that have been set up and their associated names.

Read More
How to use the command 'pidstat' (with examples)

How to use the command 'pidstat' (with examples)

The pidstat command is used to show system resource usage, including CPU, memory, IO, etc.

Read More