All Projects → tadly → Hideit.sh

tadly / Hideit.sh

Licence: gpl-3.0
Automagically hide/show a window by its name when the cursor is within a defined region or you mouse over it.

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Hideit.sh

Unclutter Xfixes
A rewrite of unclutter using the x11-xfixes extension
Stars: ✭ 236 (+38.01%)
Mutual labels:  x11, xorg, cursor
I3
A fork of the i3 window manager with gaps and some other features
Stars: ✭ 5,512 (+3123.39%)
Mutual labels:  x11, xorg
Autopilot Deno
🚀 Cross-platform desktop automation library for Deno.
Stars: ✭ 341 (+99.42%)
Mutual labels:  automation, x11
Bibata extra cursor
🚀 More Bibata 🌈
Stars: ✭ 33 (-80.7%)
Mutual labels:  x11, cursor
dxhd
daky's X11 Hotkey Daemon
Stars: ✭ 80 (-53.22%)
Mutual labels:  xorg, x11
xclicker
XClicker - Fast gui autoclicker for x11 linux desktops
Stars: ✭ 179 (+4.68%)
Mutual labels:  x11, mouse
Robotgo
RobotGo, Go Native cross-platform GUI automation @vcaesar
Stars: ✭ 7,095 (+4049.12%)
Mutual labels:  automation, mouse
linearmouse
🖱 The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+573.1%)
Mutual labels:  mouse, cursor
Octobtt
OctoBTT
Stars: ✭ 77 (-54.97%)
Mutual labels:  x11, xorg
Naturalmousemotion
This library provides a way to move cursor to specified coordinates on screen reliably, while being randomly arced to look like real hand moved it there by using a mouse. The default settings should look good enough for most cases, but if user wishes, they can heavily customize the settings and implementations responsible for the trajectory of the cursor for specific use cases.
Stars: ✭ 117 (-31.58%)
Mutual labels:  mouse, cursor
React Cursor Position
A React component that decorates its children with mouse and touch coordinates relative to itself.
Stars: ✭ 136 (-20.47%)
Mutual labels:  mouse, cursor
marathon
minimal run-or-focus launcher for Linux/X
Stars: ✭ 54 (-68.42%)
Mutual labels:  xorg, x11
xcb-util-xrm
XCB utility functions for the X resource manager
Stars: ✭ 52 (-69.59%)
Mutual labels:  xorg, x11
xwmfs
X11 Window-Manager file system based on FUSE
Stars: ✭ 21 (-87.72%)
Mutual labels:  xorg, x11
lime
A library for drawing graphics on the console screen
Stars: ✭ 32 (-81.29%)
Mutual labels:  mouse, cursor
Repeat
Cross-platform mouse/keyboard record/replay and automation hotkeys/macros creation, and more advanced automation features.
Stars: ✭ 763 (+346.2%)
Mutual labels:  automation, mouse
Wallutils
🌆 Utilities for handling monitors, resolutions, wallpapers and timed wallpapers
Stars: ✭ 145 (-15.2%)
Mutual labels:  x11, xorg
Hypr
Hypr is a tiling window manager written in modern C++.
Stars: ✭ 659 (+285.38%)
Mutual labels:  xorg, x11
react-sticky-mouse-tooltip
React tooltip component that follow mouse cursor.
Stars: ✭ 17 (-90.06%)
Mutual labels:  mouse, cursor
Xsuspender
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-69.01%)
Mutual labels:  x11, xorg

hideIt.sh

hideIt.sh will move windows out of your screen and show them again
when you mouse over a predefined region or the window itself.

Initially I wrote this script to imitate gnome-shells systray in combination with polybar.
This sript however was very much bound to my environment.

Eventually I decided it would be a great idea to share it with the unix community
and re-wrote the whole thing, making it more generic and (hopefully) userfriendly.

Table of Contents

Requirements

  1. xdotool
  2. xwininfo
  3. xev

Installation

Manual

First, make sure all requirements are installed.
Than, simply download hideIt.sh to a location of your choice and use it.

# Using wget
wget https://raw.githubusercontent.com/Tadly/hideIt.sh/master/hideIt.sh

# Using curl
curl https://raw.githubusercontent.com/Tadly/hideIt.sh/master/hideIt.sh -o hideIt.sh

Arch Linux

hideIt.sh can be found in the aur

# Using pacaur
pacaur -S hideit.sh-git

Usage

You can read some help text right?

./hideIt.sh --help

Examples

Polybar systray

A standalone systray configuration could look something like this:

[bar/systray]
# As small as possible, polybar will resize it when items get added
width = 1

# Whatever fits your needs
height = 40

# Bottom left to imitate gnome-shells systray
bottom = true

# REQUIRED for us to be able to move the window
override-redirect = true

modules-right = placeholder

tray-position = left
tray-maxsize = 16
tray-padding = 8
tray-transparent = false
tray-background = #282C34

[module/placeholder]
# Just a dummy module as polybar always requires at least one amodule
type = custom/script
width = 1

Now lets hide it:

# Find the windows name
$ xprop | grep WM_NAME
WM_NAME(STRING) = "Polybar tray window"

# Hide it
$ ./hideIt.sh --name '^Polybar tray window$' --region 0x1080+10+-40

hideIt-systray
Wallpaper

Polybar (my main bar)

You don't need my whole polybar config right? Right!

I only did this for the purpose of testing while working on this script but... I think I like it! :)
hideIt-polybar
Wallpaper

Nautilus?

Heck... why stop at the statusbar amiright?

hideIt-nautilus
Wallpaper

Disclaimer: Yes, I know, this is getting silly but I gotta demonstrate how versatile this is ( ͡° ͜ʖ ͡°)

By keyboard (SIGUSR1)

Instead of using your mouse to trigger the show/hide event, you can also send a SIGUSR1 to the process.
For this to work, the process needs to be started using the -S, --signal argument.

This will than ignore the mouse completely and only listen for SIGUSR1 at which it will either show or hide the window.

For example:

$ ./hideIt.sh --name drop-down-terminal --signal

To send a SIGUSR1-signal you can use hideIt.sh itself:

$ ./hideIt.sh --name drop-down-terminal --toggle

or use plain old kill itself:

$ kill -SIGUSR1 <pid>

Q&A

How does the script determine when to trigger?

Depends on whether you use --region, --hover or --signal.

  • --region does do polling and the interval can be change via --interval
  • --hover uses xev to monitor the window and is therefor event based
  • --signal waits for a SIGUSR1

My system tray goes nuts when using --hover! What the heck?

This is because each systray element (the icon) is its own window resulting
in entry -> leave -> entry -> ... events due to the window underneath your
cursor constantly changing.
To work around this, use --region or --signal instead.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].