Skip to content

Scripts

simonvic edited this page May 6, 2020 · 19 revisions

General

brightness.sh

brightness.sh is a wrapper for xbacklight and redshift for easy management with a cool Dunst notification as feedback

Usage

  • Increase the brightness by [amount] if specified or the default value otherwise

    ./brightness.sh increase [amount]
    
  • Decrease the brightness by [amount] if specified or the default value otherwise

    ./brightness.sh decrese [amount]
    
  • Set the brightness to

    ./brightness.sh set <value>
    
  • Print the current brightness (used for polybar)

    ./brightness.sh print
    
  • Lower the brightness to the minimum

    ./brightness.sh screensaver
    
  • Toggle on/off redshift

    ./brightness.sh redshift toggle
    
  • Increase the redshift temperature by [amount] if specified or the default value otherwise

    ./brightness.sh redshift increase [amount]
    
  • Decrease the redshift temperature by [amount] if specified or the default value otherwise

    ./brightness.sh redshift decrease [amount]
    
  • Print the current redshift temperature (used in polybar)

    ./brightness.sh redshift print
    

Configuration

Open brightness.sh with your favorite text editor and edit accordignly


restoreRedshift.sh

A simple script that restore the redshift status and temperature.

Usage

./restoreRedshift.sh

Configuration

Not needed yet


lockscreen.sh

lockscreen.sh is a wrapper for i3lock-color which allows easier customization and more flexibility

Usage

  • Lock the screen

    ./lockscreen.sh -l or ./lockscreen.sh --lock

  • Lock the screen and suspend

    ./lockscreen.sh -s or ./lockscreen.sh --suspend

Configuration

  • textColor: Change the color of the clock, date and song name (Default: ffffffAA)

  • font: Change the font of the clock, date and song name (Default: "LatoLight")

  • backgroundType: Choose the background type among (Default: blurAndDim)

    • image: Always show an image as background
    • blur: Slightly blur current view and use it as background
    • blurAndDim: Blur and dim current view and use it as background (recommended)
  • image: Specify the path of the ".png" file to use as background image (will be used only if background type is set to image)

  • blurStrength: Specify the blur stregth (will be used only if background type is set to blur ) (Default: 5)

  • blur2Strength: Specify the blur stregth (will be used only if background type is set to blurAndDim ) (Default: 0x10)

  • dimStrength: Specify the dim stregth (will be used only if background type is set to blurAndDim ) (Default: 60%)

  • indicatorType: Choose how to feedback the user input among (Default: circle) Preview

    • circle: Use a ring
    • bars: Use moving bars
  • indicatorPos: Define the position in pixel (Default: 960:740)

  • timeString: String format for the clock (Default: %H:%M:%S)

  • timePos: Define the position in pixel (Default: 960:540)

  • timeSize: Font size for the clock (Default: 150)

  • dateString: String format for the date (Default: "%A,%d %B")

  • datePos: Define the position in pixel (Default: 960:570)

  • timeSize: Font size for the clock (Default: 20)

  • verifyText: Choose the text to display when checking the password (Default: Verifying...)

  • wrongText: Choose the text to display when typed the wrong password (Default: Wrong!)

  • noInputText: Choose the text to display when the the input field is empty (Default: ...)

  • inputTypeColor: Choose the color for the input feedback when typing(Default: f0544CAA)

  • inputDeleteColor: Choose the color for the input feedback when deleting (Default: ff1010ff)

  • greeterSize: Font size for the greeter (Default: 40)

  • greeterText: Text to show as greeter

  • showSongAsGreeter: Use the playerctl.sh script to show current playing song instead of greeter (will override the greeterText if set to true (Default: true)

Settings for the circle indicator
  • radius: The radius of the ring (Default: 90)

  • ringWidth: The width of the ring (Default: 15)

  • insideColor: Color of the inner circle (Default: 00000000)

  • insideVerifyingColor: Color of the inner circle when verifying the password (Default: 00000000)

  • insideWrongColor: Color of the inner circle when typed the wrong password (Default: 00000000)

  • ringColor: Color of the outer ring (Default: 00000055)

  • ringVerifyingColor: Color of the outer ring when verifying the password (Default: f0544c55)

  • ringWrongColor: Color of the outer ring when typed the wrong password (Default: f0544cff)

  • separatorColor: Color of the separator (Default: f0544cff)

Settings for the bars indicator
  • barDirection: Select in which direction the bars will grow (Default: 2)

    • 0 : only grow downwards
    • 1 : only grow upwards
    • 2 : grow in both direction
  • barMaxHeight: Maximum height the bars can grow (Default: 100)

  • barWidth: The width of each bar (Default: 25)

  • barBaseWidth: The width of the base of the bars (Default: 1)

  • barBaseColor: The color of the base of the bars (Default: 00000000)

  • barStep: Steps of bars (Default: 1)

  • barPeriodicStep: Speed of bars decaying (Default: 10)

  • barPosition: The position in pixel of the bars (Default: 540)


microphone.sh

microphone.sh is a wrapper for amixer made for easier management and with a cool Dunst notification as feedback

Usage

  • Increase input volume by [amount] if specified or the default value otherwise

    ./microphone.sh up [amount]
    
  • Decrease input volume by [amount] if specified or the default value otherwise

    ./microphone.sh down [amount]
    
  • Toggle mute on/off for the microphone

    ./microphone.sh mute
    

Configuration

Open microhpone.sh with your favorite text editor and edit accordignly


volume.sh

volume.sh is a wrapper for amixer made for easier management and with a cool Dunst notification as feedback

Usage

  • Increase speaker/headphone volume by [amount] if specified or the default value otherwise

    ./volume.sh up [amount]
    
  • Decrease speaker/headphone volume by [amount] if specified or the default value otherwise

    ./volume.sh down [amount]
    
  • Toggle mute on/off for the speaker/headphone

    ./volume.sh mute
    

Configuration

Open volume.sh with your favorite text editor and edit accordignly


playerctl.sh

playerctl.sh is a wrapper for playerctl made for easier management and with a cool Dunst notification as feedback. Allows custom spotify notifications with also album picture as icon

Usage

  • Toggle between play and pause

    ./playerctl.sh play-pause
    
  • Stop music

    ./playerctl.sh stop
    
  • Go to the next song

    ./playerctl.sh next
    
  • Go to the previous song

    ./playerctl.sh previous
    
  • Print info of the playing song

    ./playerctl.sh info
    

Configuration

Open playerctl.sh with your favorite text editor and edit accordignly


drawBar.sh

drawBar.sh is a script that draw a progress bar with custom characters. Is mainly used with other scripts with the Dunst notification

Usage

  • Draw the bar
    ./drawBar <steps> <length> <drawAsEmpty>
    

Configuration

Open drawBar.sh with your favorite text editor and edit accordignly



Polybar related

polybar-manager.sh

polybar-manager.sh is a wrapper for polybar made for easier management of many polybars and with some cool features.

To see how to add a polybar and other stuff check out the Configuration

Usage

  • Launch polybar

    ./polybar-manager.sh launch
    
  • Hide/show a specific polybar

    ./polybar-manager.sh toggle <id>
    
  • Show all polybars

    ./polybar-manager.sh showAll
    
  • Hide the specified polybar

    ./polybar-manager.sh hide <id>
    
  • Show the specified polybar

    ./polybar-manager.sh show <id>
    
  • Hide all polybar

    ./polybar-manager.sh hideAll
    
  • Print the status for the specified polybar (used in polybar as module)

    ./polybar-manager.sh status <id>
    
  • Hide/show the tray window

    ./polybar-manager.sh toggleTray
    
  • [WIP] Enable intelli-Hide for the specified polybar. By default you move the mouse on top of the screen to show the polybar otherwise hidden

    ./polybar-manager.sh autoHide <id>
    
  • [WIP] Drag with mouse the specified polybar.

    ./polybar-manager.sh drag <id>
    
  • [WIP] Resize the specified polybar with the mouse.

    ./polybar-manager.sh resize <id>
    

[WIP] polybar-manager-autohide.sh

A wrapper for xdotool used in polybar-manager


aur_updates.sh

It prints current AUR packages that need to be upgraded


fan.sh

It prints the current fan speed in RPM


todolist.sh

Just a crap script used in a module that create sliding text of the todo list :D

Clone this wiki locally