Skip to content

Postdock hook not given "on" state automatically #84

@monte-monte

Description

@monte-monte

I've written my postdock hook which is executed perfectly, only not if thinkpad-dock runs automatically on laptop docking. To be clear I've tested with one simple command in hook which sends notify-osd with text "Dock is On" or "Dock is Off". It behaves this way:

  1. Undock button is pressed, laptop disconnected from dock - main script works, hook works, notification is present;
  2. Laptop is putted back to dock - main script works, hook doesn't, notification not present;
  3. <thinkpad-dock on> is executed in terminal - main script works, hook works, notification is present.

My postdock hook has this structure:

#!/bin/bash
case "$1" in
    on)
             notify-send -u normal -t 3000 "Dock is ON" 
             ;;
    off)
             notify-send -u normal -t 3000 "Dock is OFF" 
             ;;
esac

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions