Sponsored Content
Full Discussion: Where am I?
Top Forums Shell Programming and Scripting Where am I? Post 302285638 by quirkasaurus on Monday 9th of February 2009 11:18:22 AM
Old 02-09-2009
Quote:
Originally Posted by ruben.rodrigues
Man, the idea is to not need to enter the directory. Is to write a script that tells me in which directory I am or in which file did I click

Oh. Try this, man.


Code:
#!/bin/sh
 
file=`zenity --list --title="Choose the FILE you wish to view" --column="File" *`
 
zenity --info --title="file, directory..." --text "directory: $PWD\nfile: $file"

 
KEYNAV(1)						      General Commands Manual							 KEYNAV(1)

NAME
keynav - a keyboard-driven mouse cursor mover SYNOPSIS
keynav DESCRIPTION
Keynav makes your keyboard a fast mouse cursor mover. You can move the cursor to any point on the screen with a few key strokes. It also simulates mouse click. You can do everything mouse can do with a keyboard. HOW TO USE
Run keynav, and activate it by pressing Ctrl+; (semicolon). You should see a thin frame on the screen with a cross in it. Default configuration: * h : select the left half of the region * j : select the bottom half of the region * k : select the top half of the region * l : select the right half of the region * Shift+h : move the region left * Shift+j : move the region down * Shift+k : move the region up * Shift+l : move the region right * Semicolon: move the cursor to the center of the selected region * Spacebar : move the cursor and left-click * Escape : cancel the move CONFIGURATION
You can configure your own key setting. There is an example in /usr/share/doc/keynav/keynavrc. Copy it to $HOME/.keynavrc and edit it as you like. CONFFILE COMMANDS
* start : activate keynav * end : deactivate keynav * cut-left : select the left half of the region * cut-right : select the right half of the region * cut-up : select the top half of the region * cut-down : select the bottom half of the region * move-left : move the region left * move-right : move the region right * move-up : move the region up * move-down : move the region down * warp : move the cursor to the center of the selected region * click 1 : left-click * click 2 : middle-click * click 3 : right-click * doubleclick 1: left-click twice quickly * doubleclick 2: middle-click twice quickly * doubleclick 3: right-click twice quickly * drag <button> [keyseq]: toggle dragging mode for the given button Example: "drag 1 alt" to do a alt+click-drag * grid <rows>x<columns> : change the grid layout of the selection Example: "grid 2x3" to cut screen to 6 cells * cell-select <row>x<column>: select a specific cell in the grid * cell-select <cell> : select a specific cell in the grid AUTHOR
keynav was written by Jordan Sissel <jls@semicomplete.com>. This manual page was written by Wen-Yen Chuang <caleb@calno.com>, for the Debian project (but may be used by others). KEYNAV(1)
All times are GMT -4. The time now is 11:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy