Indicates the position of my monitor buttons

echo "|MENU| |DOWN| |UP/BRIGHT| |ENTER| |AUTO| |OFF|"|osd_cat -p bottom -o -40 -i 1575
I often need to change the brightness of my monitor. The symbols of the sensor buttons are not illuminated and on a black background .... invisible! Now i use osd_cat instead of a torch ;-)

1
By: hawo
2013-01-02 07:45:54

These Might Interest You

  • Add this to a fiend's .bashrc. PROMPT_COMMAND will run just before a prompt is drawn. RANDOM will be between 0 and 32768; in this case, it'll run about 1/10th of the time. \033 is the escape character. I'll call it \e for short. \e7 -- save cursor position. \e[%d;%dH -- move cursor to absolute position \e[4%dm \e[m -- draw a random color at that point \e8 -- restore position.


    25
    PROMPT_COMMAND='if [ $RANDOM -le 3200 ]; then printf "\0337\033[%d;%dH\033[4%dm \033[m\0338" $((RANDOM%LINES+1)) $((RANDOM%COLUMNS+1)) $((RANDOM%8)); fi'
    hotdog003 · 2010-04-01 06:52:32 3
  • awk extract every nth line. Generic is: awk '{if (NR % LINE == POSITION) print $0}' foo where "last" position is always 0 (zero). Show Sample Output


    -1
    awk '{if (NR % 3 == 1) print $0}' foo > foo_every3_position1; awk '{if (NR % 3 == 2) print $0}' foo > foo_every3_position2; awk '{if (NR % 3 == 0) print $0}' foo > foo_every3_position3
    oshazard · 2010-01-08 04:20:06 0
  • This command will place your card into monitor mode. Gets around the "ioctl(SIOCSIWMODE) failed: Device or resource busy" error encountered when running airodump-ng. Show Sample Output


    0
    iwconfig wlan0 mode monitor
    ozzy · 2011-11-04 02:36:42 0
  • Queries whether the monitor is on according to DPMS. If true then turns the monitor off, if false turns it on. The -display option on xset means the command will work from sessions other than the console, such as ssh or a cron'd script. Command should display any errors if there are any problems (eg no X available), otherwise no output if successful.


    0
    xset -display :0 q | grep ' Monitor is On' > /dev/null && xset -display :0 dpms force off || xset -display :0 dpms force on
    electrotux · 2015-04-06 19:04:04 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: