mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Remove opacity option.
This commit is contained in:
parent
4c5df96fcd
commit
e72508b782
10 changed files with 4 additions and 62 deletions
|
@ -33,10 +33,6 @@ Settings config = {
|
||||||
/** List of enabled modi. */
|
/** List of enabled modi. */
|
||||||
/** -modi */
|
/** -modi */
|
||||||
.modi = "window,run,ssh",
|
.modi = "window,run,ssh",
|
||||||
/** Set the default window opacity. */
|
|
||||||
/** This option only works when running a composite manager. */
|
|
||||||
/** -o */
|
|
||||||
.window_opacity = 100,
|
|
||||||
/** Border width around the window. */
|
/** Border width around the window. */
|
||||||
.menu_bw = 1,
|
.menu_bw = 1,
|
||||||
/** The width of the switcher. (0100 in % > 100 in pixels) */
|
/** The width of the switcher. (0100 in % > 100 in pixels) */
|
||||||
|
|
|
@ -36,8 +36,6 @@ DMENU command line options:
|
||||||
Global options:
|
Global options:
|
||||||
-modi [string] Enabled modi
|
-modi [string] Enabled modi
|
||||||
combi,drun (File)
|
combi,drun (File)
|
||||||
-opacity [number] Window opacity
|
|
||||||
100 (File)
|
|
||||||
-width [number] Window width
|
-width [number] Window width
|
||||||
50 (File)
|
50 (File)
|
||||||
-lines [number] Number of lines
|
-lines [number] Number of lines
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
[ -location *position* ]
|
[ -location *position* ]
|
||||||
[ -fixed-num-lines ]
|
[ -fixed-num-lines ]
|
||||||
[ -padding *padding* ]
|
[ -padding *padding* ]
|
||||||
[ -opacity *opacity%* ]
|
|
||||||
[ -display *display* ]
|
[ -display *display* ]
|
||||||
[ -bw *width* ]
|
[ -bw *width* ]
|
||||||
[ -dmenu [ -p *prompt* ] [ -sep *separator* ] [ -l *selected line* ] [ -mesg ] [ -select ] [ -input *input* ] ]
|
[ -dmenu [ -p *prompt* ] [ -sep *separator* ] [ -l *selected line* ] [ -mesg ] [ -select ] [ -input *input* ] ]
|
||||||
|
@ -219,14 +218,6 @@ Specify a font. Pango syntax is used.
|
||||||
|
|
||||||
Default: *mono 12*
|
Default: *mono 12*
|
||||||
|
|
||||||
`-opacity`
|
|
||||||
|
|
||||||
Set window opacity (0-100).
|
|
||||||
|
|
||||||
rofi -opacity "75"
|
|
||||||
|
|
||||||
Default: *100*
|
|
||||||
|
|
||||||
`-eh` *element height*
|
`-eh` *element height*
|
||||||
|
|
||||||
The height of a field in lines. e.g.
|
The height of a field in lines. e.g.
|
||||||
|
@ -636,7 +627,7 @@ simultaneously. This is useful when running **rofi** from a keybinding daemon.
|
||||||
|
|
||||||
`-fake-transparency`
|
`-fake-transparency`
|
||||||
|
|
||||||
Enable fake transparency. This only works with transparent background color in the theme, not the opacity setting.
|
Enable fake transparency. This only works with transparent background color in the theme.
|
||||||
|
|
||||||
`-fake-background`
|
`-fake-background`
|
||||||
|
|
||||||
|
|
25
doc/rofi.1
25
doc/rofi.1
|
@ -1,13 +1,13 @@
|
||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "ROFI\-MANPAGE" "" "October 2016" "" ""
|
.TH "ROFI\-MANPAGE" "" "2016-11-01" "" ""
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBrofi\fR \- A window switcher, run launcher, ssh dialog and dmenu replacement
|
\fBrofi\fR \- A window switcher, run launcher, ssh dialog and dmenu replacement
|
||||||
.
|
.
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
\fBrofi\fR [ \-width \fIpct_scr\fR ] [ \-lines \fIlines\fR ] [ \-columns \fIcolumns\fR ] [ \-font \fIpangofont\fR ] [ \-terminal \fIterminal\fR ] [ \-location \fIposition\fR ] [ \-fixed\-num\-lines ] [ \-padding \fIpadding\fR ] [ \-opacity \fIopacity%\fR ] [ \-display \fIdisplay\fR ] [ \-bw \fIwidth\fR ] [ \-dmenu [ \-p \fIprompt\fR ] [ \-sep \fIseparator\fR ] [ \-l \fIselected line\fR ] [ \-mesg ] [ \-select ] [ \-input \fIinput\fR ] ] [ \-filter \fIfilter\fR ] [ \-ssh\-client \fIclient\fR ] [ \-ssh\-command \fIcommand\fR ] [ \-window\-command \fIcommand\fR ] [ \-disable\-history ] [ \-levenshtein\-sort ] [ \-case\-sensitive ] [ \-cycle ] [ \-show \fImode\fR ] [ \-modi \fImode1,mode2\fR ] [ \-eh \fIelement height\fR ] [ \-lazy\-filter\-limit \fIlimit\fR ] [ \-e \fImessage\fR] [ \-a \fIrow\fR ] [ \-u \fIrow\fR ] [ \-pid \fIpath\fR ] [ \-version ] [ \-help ] [ \-dump\-xresources ] [ \-dump\-xresources\-theme ] [ \-auto\-select ] [ \-parse\-hosts ] [ \-no\-parse\-known\-hosts ] [ \-combi\-modi \fImode1,mode2\fR ] [ \-normal\-window ] [ \-fake\-transparency ] [ \-matching \fImethod\fR ] [ \-tokenize ] [ \-no\-click\-to\-exit ] [ \-threads \fInum\fR ] [ \-config \fIfilename\fR ]
|
\fBrofi\fR [ \-width \fIpct_scr\fR ] [ \-lines \fIlines\fR ] [ \-columns \fIcolumns\fR ] [ \-font \fIpangofont\fR ] [ \-terminal \fIterminal\fR ] [ \-location \fIposition\fR ] [ \-fixed\-num\-lines ] [ \-padding \fIpadding\fR ] [ \-display \fIdisplay\fR ] [ \-bw \fIwidth\fR ] [ \-dmenu [ \-p \fIprompt\fR ] [ \-sep \fIseparator\fR ] [ \-l \fIselected line\fR ] [ \-mesg ] [ \-select ] [ \-input \fIinput\fR ] ] [ \-filter \fIfilter\fR ] [ \-ssh\-client \fIclient\fR ] [ \-ssh\-command \fIcommand\fR ] [ \-window\-command \fIcommand\fR ] [ \-disable\-history ] [ \-levenshtein\-sort ] [ \-case\-sensitive ] [ \-cycle ] [ \-show \fImode\fR ] [ \-modi \fImode1,mode2\fR ] [ \-eh \fIelement height\fR ] [ \-lazy\-filter\-limit \fIlimit\fR ] [ \-e \fImessage\fR] [ \-a \fIrow\fR ] [ \-u \fIrow\fR ] [ \-pid \fIpath\fR ] [ \-version ] [ \-help ] [ \-dump\-xresources ] [ \-dump\-xresources\-theme ] [ \-auto\-select ] [ \-parse\-hosts ] [ \-no\-parse\-known\-hosts ] [ \-combi\-modi \fImode1,mode2\fR ] [ \-normal\-window ] [ \-fake\-transparency ] [ \-matching \fImethod\fR ] [ \-tokenize ] [ \-no\-click\-to\-exit ] [ \-threads \fInum\fR ] [ \-config \fIfilename\fR ]
|
||||||
.
|
.
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
\fBrofi\fR is an X11 popup window switcher, run dialog, dmenu replacement and more\. It focuses on being fast to use and have minimal distraction\. It supports keyboard and mouse navigation, type to filter, tokenized search and more\.
|
\fBrofi\fR is an X11 popup window switcher, run dialog, dmenu replacement and more\. It focuses on being fast to use and have minimal distraction\. It supports keyboard and mouse navigation, type to filter, tokenized search and more\.
|
||||||
|
@ -333,25 +333,6 @@ rofi \-font "Dejavu Sans Mono 14"
|
||||||
Default: \fImono 12\fR
|
Default: \fImono 12\fR
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
\fB\-opacity\fR
|
|
||||||
.
|
|
||||||
.P
|
|
||||||
Set window opacity (0\-100)\.
|
|
||||||
.
|
|
||||||
.IP "" 4
|
|
||||||
.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
rofi \-opacity "75"
|
|
||||||
.
|
|
||||||
.fi
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.P
|
|
||||||
Default: \fI100\fR
|
|
||||||
.
|
|
||||||
.P
|
|
||||||
\fB\-eh\fR \fIelement height\fR
|
\fB\-eh\fR \fIelement height\fR
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
|
@ -1012,7 +993,7 @@ Make \fBrofi\fR create a pid file and check this on startup\. Avoiding multiple
|
||||||
\fB\-fake\-transparency\fR
|
\fB\-fake\-transparency\fR
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
Enable fake transparency\. This only works with transparent background color in the theme, not the opacity setting\.
|
Enable fake transparency\. This only works with transparent background color in the theme\.
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
\fB\-fake\-background\fR
|
\fB\-fake\-background\fR
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
! "Enabled modi" Set from: File
|
! "Enabled modi" Set from: File
|
||||||
rofi.modi: combi,drun
|
rofi.modi: combi,drun
|
||||||
! "Window opacity" Set from: File
|
|
||||||
rofi.opacity: 100
|
|
||||||
! "Window width" Set from: File
|
! "Window width" Set from: File
|
||||||
rofi.width: 50
|
rofi.width: 50
|
||||||
! "Number of lines" Set from: File
|
! "Number of lines" Set from: File
|
||||||
|
|
|
@ -55,8 +55,6 @@ typedef struct
|
||||||
{
|
{
|
||||||
/** List of enabled modi */
|
/** List of enabled modi */
|
||||||
char *modi;
|
char *modi;
|
||||||
/** Window settings */
|
|
||||||
unsigned int window_opacity;
|
|
||||||
/** Border width */
|
/** Border width */
|
||||||
unsigned int menu_bw;
|
unsigned int menu_bw;
|
||||||
/** Width (0-100 in %, > 100 in pixels, < 0 in char width.) */
|
/** Width (0-100 in %, > 100 in pixels, < 0 in char width.) */
|
||||||
|
|
|
@ -164,14 +164,6 @@ unsigned int x11_get_current_mask ( xkb_stuff *xkb );
|
||||||
*/
|
*/
|
||||||
gboolean x11_parse_key ( char *combo, unsigned int *mod, xkb_keysym_t *key, gboolean *release );
|
gboolean x11_parse_key ( char *combo, unsigned int *mod, xkb_keysym_t *key, gboolean *release );
|
||||||
|
|
||||||
/**
|
|
||||||
* @param box The window to set the opacity on.
|
|
||||||
* @param opacity The opacity value. (0-100)
|
|
||||||
*
|
|
||||||
* Set the opacity of the window and sub-windows.
|
|
||||||
*/
|
|
||||||
void x11_set_window_opacity ( xcb_window_t box, unsigned int opacity );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup several items required.
|
* Setup several items required.
|
||||||
* * Error handling,
|
* * Error handling,
|
||||||
|
|
|
@ -547,7 +547,6 @@ void __create_window ( MenuFlags menu_flags )
|
||||||
xcb_change_property ( xcb->connection, XCB_PROP_MODE_REPLACE, box, xcb->ewmh._NET_WM_NAME, xcb->ewmh.UTF8_STRING, 8, 4, "rofi" );
|
xcb_change_property ( xcb->connection, XCB_PROP_MODE_REPLACE, box, xcb->ewmh._NET_WM_NAME, xcb->ewmh.UTF8_STRING, 8, 4, "rofi" );
|
||||||
xcb_change_property ( xcb->connection, XCB_PROP_MODE_REPLACE, box, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, 4, "rofi" );
|
xcb_change_property ( xcb->connection, XCB_PROP_MODE_REPLACE, box, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, 4, "rofi" );
|
||||||
|
|
||||||
x11_set_window_opacity ( box, config.window_opacity );
|
|
||||||
CacheState.main_window = box;
|
CacheState.main_window = box;
|
||||||
CacheState.flags = menu_flags;
|
CacheState.flags = menu_flags;
|
||||||
monitor_active ( &( CacheState.mon ) );
|
monitor_active ( &( CacheState.mon ) );
|
||||||
|
|
|
@ -716,15 +716,6 @@ gboolean x11_parse_key ( char *combo, unsigned int *mod, xkb_keysym_t *key, gboo
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void x11_set_window_opacity ( xcb_window_t box, unsigned int opacity )
|
|
||||||
{
|
|
||||||
// Scale 0-100 to 0 - UINT32_MAX.
|
|
||||||
unsigned int opacity_set = ( unsigned int ) ( ( opacity / 100.0 ) * UINT32_MAX );
|
|
||||||
|
|
||||||
xcb_change_property ( xcb->connection, XCB_PROP_MODE_REPLACE, box,
|
|
||||||
netatoms[_NET_WM_WINDOW_OPACITY], XCB_ATOM_CARDINAL, 32, 1L, &opacity_set );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill in the list of frequently used X11 Atoms.
|
* Fill in the list of frequently used X11 Atoms.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -85,8 +85,6 @@ static XrmOption xrmOptions[] = {
|
||||||
"", CONFIG_DEFAULT },
|
"", CONFIG_DEFAULT },
|
||||||
{ xrm_String, "modi", { .str = &config.modi }, NULL,
|
{ xrm_String, "modi", { .str = &config.modi }, NULL,
|
||||||
"Enabled modi", CONFIG_DEFAULT },
|
"Enabled modi", CONFIG_DEFAULT },
|
||||||
{ xrm_Number, "opacity", { .num = &config.window_opacity }, NULL,
|
|
||||||
"Window opacity", CONFIG_DEFAULT },
|
|
||||||
{ xrm_SNumber, "width", { .snum = &config.menu_width }, NULL,
|
{ xrm_SNumber, "width", { .snum = &config.menu_width }, NULL,
|
||||||
"Window width", CONFIG_DEFAULT },
|
"Window width", CONFIG_DEFAULT },
|
||||||
{ xrm_Number, "lines", { .num = &config.menu_lines }, NULL,
|
{ xrm_Number, "lines", { .num = &config.menu_lines }, NULL,
|
||||||
|
|
Loading…
Reference in a new issue