You are not logged in.

#1 2016-07-28 07:33:18

CpUniX
New Member
Registered: 2016-07-28
Posts: 1

Show specific Conky at start of program

Good morning,
i wish the Mupdf manual to be shown by Conky as soon as i open mupdf.
Mupad manual
Is it possible to to configure Conky to do so?

Offline

#2 2016-07-28 13:26:35

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Show specific Conky at start of program

CpUniX wrote:

Good morning,
i wish the Mupdf manual to be shown by Conky as soon as i open mupdf.
Mupad manual
Is it possible to to configure Conky to do so?

Write a conky with the contents of the manual as the "TEXT"  section; then start mupdf and the conky with a script or a keybind. If the mupdf command is 'mupdf', and the conky is called 'mupdf.conkyrc':

mupdf  /path/to/pdf & conky -c ~/path/to/mupdf.conkyrc

Even better would be to use a toggle script which runs mupdf+conky if there is no instance, or kills them if they are already running.

Last edited by damo (2016-07-28 16:11:49)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2016-07-28 18:51:14

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Show specific Conky at start of program

1.  damo gave you one way to do it ...

2. Another way: create a custom Action in Thunar:

1. Thunar > Edit > Configure custom actions ... click on the + symbol ...
a. Basic:
- - Name: whatever you want: MuPDF+Man
- - Description: what ever you want
- - Command: conky -q -c /path_to_conky/mupdf.conky & mupdf %f &
- - I wouldn't bother with: Use Startup Notification leave it unchecked
- - select an Icon if you wish; MuPDF works nice smile

b. Appearance Conditions
- - File Pattern: *.pdf
- - Appears if selection contains:
- - - check "Orher Files" only

Now the conky:

Be careful with "the amount of text" output that the man page has and the width:

max_user_text     Maximum size of user text buffer, i.e. layout below TEXT line in config file (default is 16384 bytes)

Mind you in this case I think you are safe the man page isn't that large.

Your screen size and eyesight will dictate what is a good balance.  I'm older, need larger fonts blah blah ...

Also your screen size will be a factor.  The mupdf man page is shown here requiring just over 750 pixels with:

xftfont Fantasque Sans Mono:bold:size=9

2016_07_28_12_21_10_Scrot11.jpg

put the conky in a box by removing "undecorated" and "sticky" from:

own_window_hints skip_taskbar,skip_pager,below #,sticky,undecorated

and the conky will start in a window like any other GUI app.  Simply close it with [X] like any other app.

This is the conky I used to do what you want, please NOTE this section:

###                         N O T E                        ###
### For MuPDF Man page text this is a MUST ###
## Default and Minimum size is 256 - needs more for single commands that
## "call" a lot of text IE: bash scripts
text_buffer_size 2048
### For MuPDF Man page text this is a MUST ###
###                         N O T E                        ###

mupdf.conky

## pkill -xf "conky -q -c /media/5/conky/mupdf.conky" &
## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes #no
own_window_hints skip_taskbar,skip_pager,below #,sticky,undecorated
own_window_colour 000000
own_window_class Conky
own_window_title MuPDF Conky
## ARGB can be used for real transparencyown_window_hints
#  own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#  own_window_argb_value 0

minimum_size 0 0
maximum_width 650
gap_x 80	## l|r
gap_y 20	## u|d
alignment tl
## ---------- End Window Settings
## ---------- Font Settings
## Force UTF8? requires XFT
override_utf8_locale yes

## Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Liberation Mono:bold:size=11
xftfont Fantasque Sans Mono:bold:size=9
#xftfont Monofur:bold:size=10
#xftfont DejaVu Sans Mono:bold:size=10

## Alpha of Xft font. Must be a value at or between 1 and 0
xftalpha 1.0

## --------- End Font Settings
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 10
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background no ## yes

## Adds spaces around certain objects to stop them from moving other things
## around, this only helps if you are using a mono font
## Options: right, left or none
use_spacer none

###                         N O T E                        ###
### For MuPDF Man page text this is a MUST ###
## Default and Minimum size is 256 - needs more for single commands that
## "call" a lot of text IE: bash scripts
text_buffer_size 2048
### For MuPDF Man page text this is a MUST ###
###                         N O T E                        ###

## Subtract (file slystem) buffers from used memory?
no_buffers yes

## Use the Xdbe extension? (eliminates flicker)
## It is highly reco${color}mmended to use own window with this one
## so double buffer won't be so big.
double_buffer yes

## Maximum size of user text buffer, i.e. layout below TEXT line in config file
## default is 16384 bytes)
##max_user_text 16384


## ---------- End Miscellaneous Section

update_interval 1
TEXT
mupdf [options] document.pdf

${color9}${swapbar 0}${color}
MuPDF can open PDF, XPS, CBZ, and EPUB documents.

Command Line Options

-p password
    The password needed to open a password protected PDF file.
-r resolution
    Set the initial zoom level, specified as DPI. The default value is 72.
-W width
    Set the page width in points for EPUB layout.
-H height
    Set the page height in points for EPUB layout.
-S size
    Set the default font size in points for EPUB layout.
-U stylesheet
    Specify a CSS file containing user styles to load for EPUB layout.

Mouse Bindings

The middle mouse button (scroll wheel button) pans the document view.

The right mouse button selects a region and copies the marked text to the
 clipboard.

Key Bindings

Most commands can take a number argument entered before the key, even
 those not listed as such.

q	Quit application.
i	Display document metadata.
o	Toggle display of outline.
l	Toggle display of links.
w	Shrinkwrap window to fit page.
W	Fit page width to window.
H	Fit page height to window.
Z	Fit page size to window.
[number] z	Set zoom resolution in DPI.
+	Zoom in.
-	Zoom out.
[	Rotate counter-clockwise.
]	Rotate clockwise.
[arrow]	Pan page in small increments.
<	Go 10 pages backward.
>	Go 10 pages forward.
[page up] or ,	Go one page backward.
[page down] or .	Go one page forward.
b	Smart move one screenful backward.
[space]	Smart move one screenful forward.
m	Save current page to navigation history.
t	Go back in navigation history.
T	Go forward in navigation history.
[number] m	Save current page in numbered bookmark.
[number] t	Go to numbered bookmark.
[number] g	Go to page number.
G	Go to last page.
/	Start searching forward.
?	Start searching backward.
n	Continue searching forward.
N	Continue searching backward.

2016_07_28_15_32_49_Scrot11.jpg 2016_07_28_15_34_20_Scrot11.jpg
But now I must ask:  Why conky?  Why not open it in mupdf as a PDF file or in a text editor?


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4 2016-07-28 18:55:58

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Show specific Conky at start of program

Sector11 wrote:

...
But now I must ask:  Why conky?  Why not open it in mupdf as a PDF file or in a text editor?

Or the manpage in a terminal?


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2016-07-28 19:05:36

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Show specific Conky at start of program

Or a man page in a PDF file.

In a terminal is easy, but 'awkward' at best; scrolling around, searching, etc ...
Even the "Custom Action" can be modified to accommodate that action.  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB