LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-21-2020, 07:35 PM   #1
tpprynn
Member
 
Registered: Oct 2013
Location: Kent, UK
Distribution: Debian
Posts: 63

Rep: Reputation: 0
Fluxbox hotkeys and starting from a particular filepath


I have Debian 10 set up on three computers and use hotkeys for ten or so programs and functions. I've installed the Firefox derivative Waterfox in /opt/ and would like to add this to /home/me/.fluxbox/keys, with /opt/waterfox/waterfox to be triggered with Mod4 and w.

What would be the form for this in the keys file please? If it can't be done this way then is there a way round this?

Thanks.

Edit: Pardon me, I've been a bit slow possibly.

I created a symlink in /bin leading to the necessary file and then added the line to keys with the usual form. If someone needs to know what I mean, I wrote

sudo ln -s /opt/waterfox/waterfox /bin/waterfox

in the terminal and

Mod4 w :ExecCommand waterfox

in keys and restarted Fluxbox.

Last edited by tpprynn; 10-21-2020 at 08:49 PM. Reason: A freak brainwave
 
Old 10-23-2020, 06:55 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
You don't have to symlink it. You need the path of it.

A few examples.

~/.fluxbox/keys
Code:
Mod4 a :Exec (~/myscript.py)
Mod4 b :Exec (uxterm -T "Log" -fa 'Monospace' -fs 16 -g 100x36 -e "~/bashscript.sh; bash")
Mod4 c :Exec (uxterm +sb -T "W3M" -bg grey67 -fg black -fa 'Monospace' -fs 18 -g 90x34 -e w3m -s ~/.w3m/bookmark.html)
More ~/.fluxbox/keys examples, if you want them.
Code:
Mod4 Up :Attach (Name=[current]) (workspace=[current])
Mod4 Down :ForEach {DetachClient} (Name=[current]) (workspace=[current])
Control Mod4 u :ForEach {MaximizeVertical} (Name=[current]) (workspace=[current])

#Tile all windows
Control Mod4 h :ArrangeWindowsHorizontal	
Control Mod4 v :ArrangeWindowsVertical
Control Mod4 Right :ArrangeWindowsStackLeft
Control Mod4 Left :ArrangeWindowsStackRight
Control Mod4 Down :ArrangeWindowsStackTop
Control Mod4 Up :ArrangeWindowsStackBottom

# Window move, all except arrow keys disabled. Escape to exit.
Control Mod4 m              :KeyMode MoveMode
MoveMode: None Up           :MoveUp 20
MoveMode: None Down         :MoveDown 20
MoveMode: None Left         :MoveLeft 20
MoveMode: None Right        :MoveRight 20

#Move mouse/click with xdotool
Control Mod1 Up     :Exec (xdotool mousemove_relative -- 0 -15)
Control Mod1 Down   :Exec (xdotool mousemove_relative 0 15)
Control Mod1 Right  :Exec (xdotool mousemove_relative 15 0)
Control Mod1 Left   :Exec (xdotool mousemove_relative -- -15 0)
Control Mod1 x      :Exec (xdotool click 1)
Control Mod1 v      :Exec (xdotool click 3)
Control Mod1 c      :Exec (xdotool click 2)

#Scroll Page right, Page left
Shift Right :Exec str=$(printf "%10s"); xdotool key $(echo "${str// /Right }")
Shift Left :Exec str=$(printf "%10s"); xdotool key $(echo "${str// /Left }")
 
Old 10-23-2020, 10:21 PM   #3
tpprynn
Member
 
Registered: Oct 2013
Location: Kent, UK
Distribution: Debian
Posts: 63

Original Poster
Rep: Reputation: 0
Ah, I thought something like this might be the case. Very interesting and I will work through these examples, thanks. I see from a quick attempt that brackets are the thing I overlooked - I'd tried putting the path in single and double quotation marks, a wild stab in the dark there. For others reading this I now have the option of:

Mod4 w :Exec (opt/waterfox/waterfox)

(although preceding the path with xterm shows the application has problems under its hood or with how I've set it up currently, so it was handy to try that also).

I hadn't known about xdotool either and that might prove useful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Determining the filepath and filename for the file a bash script was run on from the RMB menu underscoreus Linux - Software 10 10-16-2019 05:58 PM
[SOLVED] Hotkeys in gnumeric. Creating gnumeric/system hotkeys Alex McGregor Linux - Newbie 1 08-30-2014 12:20 PM
[SOLVED] Hotkeys in gnumeric. Creating gnumeric/system hotkeys Alex McGregor Linux - Software 2 08-30-2014 12:14 PM
how to get absolute filepath from filedescriptor appas Programming 1 07-27-2004 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration