Simple maintenance improvements (#1370)

* rofi moved to libera.chat

* unify some theme headers and whitespace

* consistently use the same hashbang for bash

* improve obsolete way of testing equality

see https://github.com/koalaman/shellcheck/wiki/SC2268 for explanation

* use consistent function definitions in bash scripts

* remove duplicated author and fix whitespace

* quote all variables in scripts

fixes many warnings identified through shellcheck

* fix whitespace in scripts

* fix whitespace in non-source files

* fix spelling in non-source files

* fix whitespace and indentation in source files

* fix spelling in source files
This commit is contained in:
a1346054 2021-08-14 11:03:16 +00:00 committed by GitHub
parent 69c6004681
commit c62137f8ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
113 changed files with 784 additions and 832 deletions

View File

@ -7,5 +7,5 @@ contact_links:
url: https://www.reddit.com/r/qtools/ url: https://www.reddit.com/r/qtools/
about: Please ask and answer questions here. about: Please ask and answer questions here.
- name: Rofi IRC channel - name: Rofi IRC channel
url: https://webchat.freenode.net/?channels=#rofi url: https://web.libera.chat/?channels=#rofi
about: Please ask and answer question in real time here. about: Please ask and answer question in real time here.

View File

@ -44,7 +44,6 @@ N. Izumi
Paulo Flabiano Smorigo Paulo Flabiano Smorigo
Peter Cannici Peter Cannici
qedi qedi
qedi
Quentin Glidic Quentin Glidic
Rasmus Steinke Rasmus Steinke
Roomcays Roomcays

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/usr/bin/env bash
MAX_DESKTOPS=20 MAX_DESKTOPS=20
WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS}) WORKSPACES=$(seq -s '\n' 1 1 "${MAX_DESKTOPS}")
EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \ EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1) echo -e "${WORKSPACES}" ) | sort -n | uniq -u | head -n 1)
i3-msg workspace ${EMPTY_WORKSPACE} i3-msg workspace "${EMPTY_WORKSPACE}"

View File

@ -1,18 +1,17 @@
#!/bin/bash #!/usr/bin/env bash
if [ -z $@ ] if [ -z $@ ]
then then
function gen_workspaces() gen_workspaces()
{ {
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n
} }
echo empty; gen_workspaces echo empty; gen_workspaces
else else
WORKSPACE=$@ WORKSPACE=$@
if [ x"empty" = x"${WORKSPACE}" ] if [ "${WORKSPACE}" = "empty" ]
then then
i3_empty_workspace.sh >/dev/null i3_empty_workspace.sh >/dev/null
elif [ -n "${WORKSPACE}" ] elif [ -n "${WORKSPACE}" ]

View File

@ -11,14 +11,13 @@ ROFI_FB_START_DIR=$HOME # starting directory
# Uncomment the following line to disable history: # Uncomment the following line to disable history:
# ROFI_FB_NO_HISTORY=1 # ROFI_FB_NO_HISTORY=1
# Beginning of the script: # Beginning of the script:
# Create the directory for the files of the script # Create the directory for the files of the script
if [ ! -d $(dirname "${ROFI_FB_PREV_LOC_FILE}") ] if [ ! -d "$(dirname "${ROFI_FB_PREV_LOC_FILE}")" ]
then then
mkdir -p "$(dirname "${ROFI_FB_PREV_LOC_FILE}")" mkdir -p "$(dirname "${ROFI_FB_PREV_LOC_FILE}")"
fi fi
if [ ! -d $(dirname "${ROFI_FB_HISTORY_FILE}") ] if [ ! -d "$(dirname "${ROFI_FB_HISTORY_FILE}")" ]
then then
mkdir -p "$(dirname "${ROFI_FB_HISTORY_FILE}")" mkdir -p "$(dirname "${ROFI_FB_HISTORY_FILE}")"
fi fi
@ -64,7 +63,7 @@ then
sed -i "s|${ROFI_FB_CUR_DIR}|##deleted##|g" "${ROFI_FB_HISTORY_FILE}" sed -i "s|${ROFI_FB_CUR_DIR}|##deleted##|g" "${ROFI_FB_HISTORY_FILE}"
sed -i '/##deleted##/d' "${ROFI_FB_HISTORY_FILE}" sed -i '/##deleted##/d' "${ROFI_FB_HISTORY_FILE}"
echo "${ROFI_FB_CUR_DIR}" >> "${ROFI_FB_HISTORY_FILE}" echo "${ROFI_FB_CUR_DIR}" >> "${ROFI_FB_HISTORY_FILE}"
if [ $( wc -l < "${ROFI_FB_HISTORY_FILE}" ) -gt ${ROFI_FB_HISTORY_MAXCOUNT} ] if [ "$( wc -l < "${ROFI_FB_HISTORY_FILE}" )" -gt "${ROFI_FB_HISTORY_MAXCOUNT}" ]
then then
sed -i 1d "${ROFI_FB_HISTORY_FILE}" sed -i 1d "${ROFI_FB_HISTORY_FILE}"
fi fi

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ x"$@" = x"quit" ] if [ "$@" = "quit" ]
then then
exit 0 exit 0
fi fi

View File

@ -19,7 +19,6 @@ include $(top_srcdir)/libgwater-xcb-nolibtool.mk
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pkgconfig/rofi.pc pkgconfig_DATA = pkgconfig/rofi.pc
BUILT_SOURCES=\ BUILT_SOURCES=\
lexer/theme-parser.h\ lexer/theme-parser.h\
lexer/theme-parser.c\ lexer/theme-parser.c\
@ -187,7 +186,6 @@ EXTRA_DIST += \
doc/rofi-sensible-terminal.1.markdown \ doc/rofi-sensible-terminal.1.markdown \
doc/rofi.1.markdown doc/rofi.1.markdown
## ##
# Readme.md # Readme.md
## ##
@ -262,7 +260,6 @@ EXTRA_DIST+=\
# Indent # Indent
## ##
update-manpage: $(top_srcdir)/doc/rofi-theme-selector.1.markdown $(top_srcdir)/doc/rofi.1.markdown $(top_srcdir)/doc/rofi-theme.5.markdown $(top_srcdir)/doc/rofi-script.5.markdown ${top_srcdir}/doc/rofi-sensible-terminal.1.markdown update-manpage: $(top_srcdir)/doc/rofi-theme-selector.1.markdown $(top_srcdir)/doc/rofi.1.markdown $(top_srcdir)/doc/rofi-theme.5.markdown $(top_srcdir)/doc/rofi-script.5.markdown ${top_srcdir}/doc/rofi-sensible-terminal.1.markdown
go-md2man -in $(top_srcdir)/doc/rofi.1.markdown -out $(top_srcdir)/doc/rofi.1 go-md2man -in $(top_srcdir)/doc/rofi.1.markdown -out $(top_srcdir)/doc/rofi.1
go-md2man -in $(top_srcdir)/doc/rofi-theme-selector.1.markdown -out $(top_srcdir)/doc/rofi-theme-selector.1 go-md2man -in $(top_srcdir)/doc/rofi-theme-selector.1.markdown -out $(top_srcdir)/doc/rofi-theme-selector.1
@ -288,8 +285,6 @@ if USE_CHECK
check_PROGRAMS+=mode_test theme_parser_test helper_tokenize check_PROGRAMS+=mode_test theme_parser_test helper_tokenize
endif endif
history_test_CFLAGS=\ history_test_CFLAGS=\
$(AM_CFLAGS)\ $(AM_CFLAGS)\
$(glib_CFLAGS)\ $(glib_CFLAGS)\
@ -306,7 +301,6 @@ history_test_LDADD=\
$(glib_LIBS)\ $(glib_LIBS)\
$(NKUTILS_LIBS) $(NKUTILS_LIBS)
history_test_SOURCES=\ history_test_SOURCES=\
source/history.c\ source/history.c\
config/config.c\ config/config.c\
@ -470,7 +464,6 @@ helper_test_SOURCES=\
include/rofi-types.h\ include/rofi-types.h\
test/helper-test.c test/helper-test.c
helper_test_CFLAGS=\ helper_test_CFLAGS=\
$(AM_CFLAGS)\ $(AM_CFLAGS)\
$(glib_CFLAGS)\ $(glib_CFLAGS)\
@ -496,7 +489,6 @@ helper_test_LDADD=\
$(libsn_LIBS)\ $(libsn_LIBS)\
$(cairo_LIBS) $(cairo_LIBS)
helper_expand_SOURCES=\ helper_expand_SOURCES=\
config/config.c\ config/config.c\
include/rofi.h\ include/rofi.h\
@ -534,7 +526,6 @@ helper_config_cmdline_parser_SOURCES=\
source/xrmoptions.c\ source/xrmoptions.c\
test/helper-config-cmdline-parser.c test/helper-config-cmdline-parser.c
if USE_CHECK if USE_CHECK
mode_test_CFLAGS=$(textbox_test_CFLAGS) $(check_CFLAGS) mode_test_CFLAGS=$(textbox_test_CFLAGS) $(check_CFLAGS)
mode_test_LDADD=$(textbox_test_LDADD) $(check_LIBS) mode_test_LDADD=$(textbox_test_LDADD) $(check_LIBS)
@ -567,7 +558,6 @@ helper_tokenize_SOURCES=\
include/xrmoptions.h\ include/xrmoptions.h\
source/xrmoptions.c\ source/xrmoptions.c\
test/helper-tokenize.c test/helper-tokenize.c
endif endif
TESTS+=\ TESTS+=\
@ -593,18 +583,15 @@ test-x: $(bin_PROGRAMS)
MESON_BUILD_ROOT="$(top_builddir)" \ MESON_BUILD_ROOT="$(top_builddir)" \
$(top_srcdir)/test/run_all_tests.sh $(top_srcdir)/test/run_all_tests.sh
.PHONY: indent .PHONY: indent
indent: $(SOURCES) indent: $(SOURCES)
uncrustify -c $(top_srcdir)/data/uncrustify.cfg --replace $^ uncrustify -c $(top_srcdir)/data/uncrustify.cfg --replace $^
.PHONY: cppcheck .PHONY: cppcheck
cppcheck: $(rofi_SOURCES) cppcheck: $(rofi_SOURCES)
cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog --inconclusive -I $(top_srcdir)/include/ $^ cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog --inconclusive -I $(top_srcdir)/include/ $^
.PHONY: ohcount .PHONY: ohcount
ohcount: $(rofi_SOURCES) ohcount: $(rofi_SOURCES)
ohcount -i $(top_srcdir)/source/ $(top_srcdir)/include/ ohcount -i $(top_srcdir)/source/ $(top_srcdir)/include/

View File

@ -82,4 +82,3 @@ align_typedef_gap = 3
eat_blanks_before_close_brace = TRUE eat_blanks_before_close_brace = TRUE
eat_blanks_after_open_brace = TRUE eat_blanks_after_open_brace = TRUE

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
function shout() shout()
{ {
echo -en "Normal Row\nAlternateRow\nNormal Row active\nAlternateRow Active\nNormal Row urgent\nAlternateRow urgent" echo -en "Normal Row\nAlternateRow\nNormal Row active\nAlternateRow Active\nNormal Row urgent\nAlternateRow urgent"
echo -en "\nSelected Row" echo -en "\nSelected Row"
@ -14,4 +14,4 @@ sleep 5
scrot scrot
sleep 1 sleep 1
killall rofi killall rofi
wait $P wait "$P"

View File

@ -13,5 +13,4 @@ configuration {
sorting-method: "name"; sorting-method: "name";
directories-first: true; directories-first: true;
} }
} }

View File

@ -73,7 +73,7 @@ An integer number with the current state:
.IP \(bu 2 .IP \(bu 2
\fB2\fP: Selected a custom entry. \fB2\fP: Selected a custom entry.
.IP \(bu 2 .IP \(bu 2
\fB10\-28\fP: Custom keybinding 1\-19 ( need to be explicitely enabled by script ). \fB10\-28\fP: Custom keybinding 1\-19 ( need to be explicitly enabled by script ).
.RE .RE

View File

@ -57,7 +57,7 @@ An integer number with the current state:
* **0**: Initial call of script. * **0**: Initial call of script.
* **1**: Selected an entry. * **1**: Selected an entry.
* **2**: Selected a custom entry. * **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitely enabled by script ). * **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO` ### `ROFI_INFO`

View File

@ -47,4 +47,3 @@ Dave Davenport and contributors
Copied script from i3: Copied script from i3:
Michael Stapelberg and contributors Michael Stapelberg and contributors

View File

@ -1424,7 +1424,7 @@ icon\-paste {
.PP .PP
This is a textbox widget that can have a 'clickable' action. This is a textbox widget that can have a 'clickable' action.
The \fB\fCaction\fR can be set to: The \fB\fCaction\fR can be set to:
\fB\fCkeybinding\fR: accepts a keybinging name and completes that action. (see rofi \-show keys for a list). \fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi \-show keys for a list).
.PP .PP
.RS .RS

View File

@ -888,7 +888,7 @@ icon-paste {
This is a textbox widget that can have a 'clickable' action. This is a textbox widget that can have a 'clickable' action.
The `action` can be set to: The `action` can be set to:
`keybinding`: accepts a keybinging name and completes that action. (see rofi -show keys for a list). `keybinding`: accepts a keybinding name and completes that action. (see rofi -show keys for a list).
```css ```css
button-paste { button-paste {

View File

@ -166,7 +166,7 @@ Dump the current active theme, in rasi format, to stdout and exit.
\fB\fC\-rasi\-validate\fR \fIfilename\fP \fB\fC\-rasi\-validate\fR \fIfilename\fP
.PP .PP
Try to parse the file and return 0 when succesful, non\-zero when failed. Try to parse the file and return 0 when successful, non\-zero when failed.
.PP .PP
\fB\fC\-threads\fR \fInum\fP \fB\fC\-threads\fR \fInum\fP
@ -1225,7 +1225,7 @@ Make \fBrofi\fP create a pid file and check this on startup. The pid file preven
Set the name to use for mode. This is used as prompt and in combi\-browser. Set the name to use for mode. This is used as prompt and in combi\-browser.
.PP .PP
It is now prefered to use the configuration file: It is now preferred to use the configuration file:
.PP .PP
.RS .RS

View File

@ -106,7 +106,7 @@ Dump the current active theme, in rasi format, to stdout and exit.
`-rasi-validate` *filename* `-rasi-validate` *filename*
Try to parse the file and return 0 when succesful, non-zero when failed. Try to parse the file and return 0 when successful, non-zero when failed.
`-threads` *num* `-threads` *num*
@ -741,7 +741,7 @@ Make **rofi** create a pid file and check this on startup. The pid file prevents
Set the name to use for mode. This is used as prompt and in combi-browser. Set the name to use for mode. This is used as prompt and in combi-browser.
It is now prefered to use the configuration file: It is now preferred to use the configuration file:
```css ```css
configuration { configuration {

View File

@ -196,7 +196,6 @@ typedef enum
ROFI_SCALE_WIDTH, ROFI_SCALE_WIDTH,
} RofiScaleType; } RofiScaleType;
typedef struct typedef struct
{ {
RofiImageType type; RofiImageType type;

View File

@ -102,7 +102,7 @@ Mode * rofi_collect_modi_search ( const char *name );
#define ERROR_MSG( a ) a "\n" \ #define ERROR_MSG( a ) a "\n" \
"If you suspect this is caused by a bug in rofi,\n" \ "If you suspect this is caused by a bug in rofi,\n" \
"please report the following information to rofi's github page:\n" \ "please report the following information to rofi's github page:\n" \
" * The generated commandline output when the error occored.\n" \ " * The generated commandline output when the error occurred.\n" \
" * Output of -dump-xresource\n" \ " * Output of -dump-xresource\n" \
" * Steps to reproduce\n" \ " * Steps to reproduce\n" \
" * The version of rofi you are running\n\n" \ " * The version of rofi you are running\n\n" \

View File

@ -92,7 +92,6 @@ extern ThemeWidget *rofi_theme;
*/ */
extern ThemeWidget *rofi_theme; extern ThemeWidget *rofi_theme;
extern ThemeWidget *rofi_configuration; extern ThemeWidget *rofi_configuration;
/** /**
@ -269,7 +268,6 @@ double rofi_theme_get_double ( const widget *widget, const char *property, doub
*/ */
void rofi_theme_get_color ( const widget *widget, const char *property, cairo_t *d ); void rofi_theme_get_color ( const widget *widget, const char *property, cairo_t *d );
/** /**
* @param widget The widget to query * @param widget The widget to query
* @param property The property to query. * @param property The property to query.

View File

@ -69,7 +69,7 @@ struct RofiViewState
/** #textbox containing the message entry */ /** #textbox containing the message entry */
textbox *mesg_tb; textbox *mesg_tb;
/** Array with the levenshtein distance for each eleemnt. */ /** Array with the levenshtein distance for each element. */
int *distance; int *distance;
/** Array with the translation between the filtered and unfiltered list. */ /** Array with the translation between the filtered and unfiltered list. */
unsigned int *line_map; unsigned int *line_map;
@ -132,7 +132,7 @@ struct RofiViewState
int x; int x;
/** Y position */ /** Y position */
int y; int y;
/** Widget being targetted. */ /** Widget being targeted. */
widget *motion_target; widget *motion_target;
} mouse; } mouse;

View File

@ -62,7 +62,7 @@ typedef enum
* @param sw the Mode to show. * @param sw the Mode to show.
* @param input A pointer to a string where the inputted data is placed. * @param input A pointer to a string where the inputted data is placed.
* @param menu_flags Flags indicating state of the menu. * @param menu_flags Flags indicating state of the menu.
* @param finalize the finailze callback * @param finalize the finalize callback
* *
* Main menu callback. * Main menu callback.
* *

View File

@ -89,7 +89,8 @@ static int check_in_range ( double index, double low, double high, YYLTYPE *loc
return TRUE; return TRUE;
} }
static double hue2rgb(double p, double q, double t){ static double hue2rgb ( double p, double q, double t )
{
t += (t<0)?1.0:0.0; t += (t<0)?1.0:0.0;
t -= (t>1)?1.0:0.0; t -= (t>1)?1.0:0.0;
if ( t < (1/6.0) ) { if ( t < (1/6.0) ) {
@ -617,7 +618,6 @@ t_color_list
; ;
/** List of elements */ /** List of elements */
t_property_element_list_optional t_property_element_list_optional
: %empty { $$ = NULL; } : %empty { $$ = NULL; }
@ -857,14 +857,20 @@ t_property_color
if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; }
if ( ! check_in_range($6,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($6,0,100, &(@$)) ) { YYABORT; }
if ( ! check_in_range($9,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($9,0,100, &(@$)) ) { YYABORT; }
$$.alpha = $11; $$.red = $3/100.0; $$.green = $6/100.0; $$.blue = $9/100.0; $$.alpha = $11;
$$.red = $3/100.0;
$$.green = $6/100.0;
$$.blue = $9/100.0;
} }
/** rgba ( 0-100% 0-100% 0-100% / 0-1.0 ) */ /** rgba ( 0-100% 0-100% 0-100% / 0-1.0 ) */
| T_COL_RGBA T_PARENT_LEFT t_property_color_value T_PERCENT t_property_color_value T_PERCENT t_property_color_value T_PERCENT t_property_color_opt_alpha_ws T_PARENT_RIGHT { | T_COL_RGBA T_PARENT_LEFT t_property_color_value T_PERCENT t_property_color_value T_PERCENT t_property_color_value T_PERCENT t_property_color_opt_alpha_ws T_PARENT_RIGHT {
if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; }
if ( ! check_in_range($5,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($5,0,100, &(@$)) ) { YYABORT; }
if ( ! check_in_range($7,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($7,0,100, &(@$)) ) { YYABORT; }
$$.alpha = $9; $$.red = $3/100.0; $$.green = $5/100.0; $$.blue = $7/100.0; $$.alpha = $9;
$$.red = $3/100.0;
$$.green = $5/100.0;
$$.blue = $7/100.0;
} }
/** hwb with comma */ /** hwb with comma */
| T_COL_HWB T_PARENT_LEFT t_property_color_value_angle T_COMMA t_property_color_value_unit T_COMMA t_property_color_value_unit t_property_color_opt_alpha_c T_PARENT_RIGHT { | T_COL_HWB T_PARENT_LEFT t_property_color_value_angle T_COMMA t_property_color_value_unit T_COMMA t_property_color_value_unit t_property_color_opt_alpha_c T_PARENT_RIGHT {

View File

@ -9,7 +9,6 @@ libgwater_xcb_a_CFLAGS = \
$(AM_CFLAGS) \ $(AM_CFLAGS) \
$(GW_XCB_INTERNAL_CFLAGS) $(GW_XCB_INTERNAL_CFLAGS)
GW_XCB_CFLAGS = \ GW_XCB_CFLAGS = \
-I$(srcdir)/subprojects/libgwater/xcb \ -I$(srcdir)/subprojects/libgwater/xcb \
$(GW_XCB_INTERNAL_CFLAGS) $(GW_XCB_INTERNAL_CFLAGS)
@ -17,4 +16,3 @@ GW_XCB_CFLAGS = \
GW_XCB_LIBS = \ GW_XCB_LIBS = \
libgwater-xcb.a \ libgwater-xcb.a \
$(GW_XCB_INTERNAL_LIBS) $(GW_XCB_INTERNAL_LIBS)

View File

@ -30,7 +30,7 @@ they are available they can be used for keybindings, if not, the user gets a war
### DMenu reading from stdin ### DMenu reading from stdin
**Rofi** used to have a custom `fgets` implementation that supported custom separators. The has been repaced by the **Rofi** used to have a custom `fgets` implementation that supported custom separators. The has been replaced by the
`getdelim` feature of POSIX '08, this gave a speedup of 6x (from 648 ms for 202000 lines down to 108ms). `getdelim` feature of POSIX '08, this gave a speedup of 6x (from 648 ms for 202000 lines down to 108ms).
### Multi-Core power ### Multi-Core power

View File

@ -94,4 +94,3 @@ Below is a more complete changelog between the 0.15.12 and the 1.0.0 release.
* Removal of old themeing method. Given it was incomplete. * Removal of old themeing method. Given it was incomplete.
* Removal of daemon mode, given this duplicates Window Manager functionality. * Removal of daemon mode, given this duplicates Window Manager functionality.

View File

@ -19,4 +19,3 @@
## Bug fixes ## Bug fixes
- Grab mouse pointer with keyboard - Grab mouse pointer with keyboard

View File

@ -40,7 +40,7 @@ rofi.window-format: {t:-16} ({c:10})
## Track configuration option origin ## Track configuration option origin
**Rofi** now keeps track of how configuration options are set. It will now display if it is the default value, set in **Rofi** now keeps track of how configuration options are set. It will now display if it is the default value, set in
Xresources, configuration file or commnadline. Xresources, configuration file or commandline.
![Rofi configuration tracking](./rofi-options.png) ![Rofi configuration tracking](./rofi-options.png)

View File

@ -236,4 +236,3 @@ would look using: `rofi -dump-config`.
* Allow rofi to be placed above window based on window id. * Allow rofi to be placed above window based on window id.
* Support different font per textbox. * Support different font per textbox.
* Keep cache of previous used fonts. * Keep cache of previous used fonts.

View File

@ -32,7 +32,7 @@ separator character.
If you have very long entries in your view that get ellipsized (cut off at the end indicated by ...) you can now select, If you have very long entries in your view that get ellipsized (cut off at the end indicated by ...) you can now select,
at runtime, where they are cut off (start, middle or end). at runtime, where they are cut off (start, middle or end).
You cycle through the options with the the `alt+.` keybinding. You cycle through the options with the `alt+.` keybinding.
Start: Start:
@ -70,4 +70,3 @@ The full list of fixes and updates:
* Update libnkutils, libgwater. * Update libnkutils, libgwater.
* DMENU: Add format option to strip pango markup from return value. * DMENU: Add format option to strip pango markup from return value.
* ListView: allow user to change ellipsizing displayed value at run-time. * ListView: allow user to change ellipsizing displayed value at run-time.

View File

@ -115,7 +115,7 @@ This is a very initial implementation of CSS like `@media` support. This allows
based on screen size or ratio. based on screen size or ratio.
We currently support: minimum width, minimum height, maximum width, maximum We currently support: minimum width, minimum height, maximum width, maximum
height, monitor id, minimum acpect ratio or maximum acpect ratio. height, monitor id, minimum aspect ratio or maximum aspect ratio.
For example, go to fullscreen mode on screens smaller then full HD: For example, go to fullscreen mode on screens smaller then full HD:

View File

@ -6,18 +6,18 @@ GIT=$(which git)
if [ -d "${DIR}/.git/" ] && [ -n "${GIT}" ] if [ -d "${DIR}/.git/" ] && [ -n "${GIT}" ]
then then
echo -n "#define GIT_VERSION \"" > ${FILE}.tmp echo -n "#define GIT_VERSION \"" > "${FILE}.tmp"
BRTG="$(${GIT} describe --tags --always --all | sed -e 's:heads/::')" BRTG="$(${GIT} describe --tags --always --all | sed -e 's:heads/::')"
REV="$(${GIT} describe --tags --always --dirty| sed -e 's:-g\([a-f0-9]\{7\}\):-git-\1:g')" REV="$(${GIT} describe --tags --always --dirty| sed -e 's:-g\([a-f0-9]\{7\}\):-git-\1:g')"
echo -n "${REV} (${BRTG})" >> ${FILE}.tmp echo -n "${REV} (${BRTG})" >> "${FILE}.tmp"
echo "\"" >> ${FILE}.tmp echo "\"" >> "${FILE}.tmp"
else else
echo "#undef GIT_VERSION" > ${FILE}.tmp echo "#undef GIT_VERSION" > "${FILE}.tmp"
fi fi
if [ ! -f ${FILE} ] || ! diff ${FILE}.tmp ${FILE} > /dev/null if [ ! -f "${FILE}" ] || ! diff "${FILE}.tmp" "${FILE}" >/dev/null
then then
mv ${FILE}.tmp ${FILE} mv "${FILE}.tmp" "${FILE}"
else else
rm ${FILE}.tmp rm "${FILE}.tmp"
fi fi

View File

@ -3,7 +3,7 @@
# This code is released in public domain by Dave Davenport <qball@gmpclient.org> # This code is released in public domain by Dave Davenport <qball@gmpclient.org>
# This converts from old style theme (< 1.4) to new style theme (>= 1.4) # This converts from old style theme (< 1.4) to new style theme (>= 1.4)
# #
function update_color () update_color()
{ {
var=${1} var=${1}
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
@ -12,11 +12,11 @@ function update_color ()
then then
echo "#${var:5}" echo "#${var:5}"
else else
echo ${var} echo "${var}"
fi fi
} }
function parse_window_color () parse_window_color()
{ {
OLDIFS=${IFS} OLDIFS=${IFS}
IFS="," IFS=","
@ -37,7 +37,7 @@ function parse_window_color ()
IFS=${OLDIFS} IFS=${OLDIFS}
} }
function parse_color () parse_color()
{ {
state=$1 state=$1
OLDIFS=${IFS} OLDIFS=${IFS}

View File

@ -20,7 +20,7 @@ SCROT=$(which scrot 2> /dev/null)
FEH=$(which feh 2>/dev/null) FEH=$(which feh 2>/dev/null)
COMPTON=$(which compton 2>/dev/null) COMPTON=$(which compton 2>/dev/null)
function check_tool() check_tool()
{ {
if [ -z "${1}" ] if [ -z "${1}" ]
then then
@ -30,26 +30,26 @@ function check_tool()
} }
XPID= XPID=
function create_fake_x ( ) create_fake_x()
{ {
export DISPLAY=":$1" export DISPLAY=":$1"
echo "Starting fake X: ${DISPLAY}" echo "Starting fake X: ${DISPLAY}"
${XVFB} ${DISPLAY} -screen 0 1024x600x24& ${XVFB} "${DISPLAY}" -screen 0 1024x600x24 &
XPID=$! XPID=$!
sleep 1 sleep 1
} }
function destroy_fake_x ( ) destroy_fake_x()
{ {
if [ -n "${XPID}" ] if [ -n "${XPID}" ]
then then
echo "Stopping fake X: ${XPID}" echo "Stopping fake X: ${XPID}"
kill ${XPID} kill "${XPID}"
wait ${XPID} wait "${XPID}"
fi fi
} }
function generate() generate()
{ {
echo "Normal" echo "Normal"
echo "Alternative" echo "Alternative"
@ -81,16 +81,16 @@ ROFI_OPTIONS="-selected-row 6 -u 2,3 -a 4,5 -location 0 -width 100 -lines 7 -col
export DISPLAY=${VDISPLAY} export DISPLAY=${VDISPLAY}
# Create fake X11 # Create fake X11
create_fake_x ${VDISPLAY} create_fake_x "${VDISPLAY}"
sleep 1 sleep 1
fluxbox & fluxbox &
sleep 1; sleep 1
compton -b compton -b
feh --bg-center background.jpg feh --bg-center background.jpg
(generate | ${ROFI} -no-config -theme "${THEME_FILE}" -dmenu ${ROFI_OPTIONS} >/dev/null )& (generate | ${ROFI} -no-config -theme "${THEME_FILE}" -dmenu ${ROFI_OPTIONS} >/dev/null )&
sleep 1 sleep 1
#${XDOTOOL} key Alt+S #${XDOTOOL} key Alt+S
scrot ${OUTPUT_PNG} scrot "${OUTPUT_PNG}"
${XDOTOOL} key Return ${XDOTOOL} key Return
sleep 2 sleep 2
destroy_fake_x destroy_fake_x

View File

@ -19,7 +19,7 @@ XDOTOOL=$(which xdotool 2> /dev/null)
XRDB=$(which xrdb 2>/dev/null) XRDB=$(which xrdb 2>/dev/null)
ROFI=$(which rofi 2>/dev/null) ROFI=$(which rofi 2>/dev/null)
function check_tool() check_tool()
{ {
if [ -z "${1}" ] if [ -z "${1}" ]
then then
@ -29,26 +29,26 @@ function check_tool()
} }
XPID= XPID=
function create_fake_x ( ) create_fake_x()
{ {
export DISPLAY=":$1" export DISPLAY=":$1"
echo "Starting fake X: ${DISPLAY}" echo "Starting fake X: ${DISPLAY}"
${XVFB} ${DISPLAY} -screen 0 800x600x24 & ${XVFB} "${DISPLAY}" -screen 0 800x600x24 &
XPID=$! XPID=$!
sleep 1 sleep 1
} }
function destroy_fake_x ( ) destroy_fake_x()
{ {
if [ -n "${XPID}" ] if [ -n "${XPID}" ]
then then
echo "Stopping fake X: ${XPID}" echo "Stopping fake X: ${XPID}"
kill ${XPID} kill "${XPID}"
wait ${XPID} wait "${XPID}"
fi fi
} }
function generate() generate()
{ {
echo "Normal" echo "Normal"
echo "Alternative" echo "Alternative"
@ -84,13 +84,13 @@ then
fi fi
# Create fake X11 # Create fake X11
create_fake_x ${VDISPLAY} create_fake_x "${VDISPLAY}"
# Load Xresources if specified. # Load Xresources if specified.
if [ -n "${XRDB_FILE}" ] if [ -n "${XRDB_FILE}" ]
then then
echo -e "${COLOR_YELLOW}Loading Xresources:${RESET} ${XRDB_FILE}" echo -e "${COLOR_YELLOW}Loading Xresources:${RESET} ${XRDB_FILE}"
${XRDB} -retain -load ${XRDB_FILE} ${XRDB} -retain -load "${XRDB_FILE}"
fi fi
(generate | ${ROFI} -config "${XRDB_FILE}" -dmenu ${ROFI_OPTIONS} > /dev/null )& (generate | ${ROFI} -config "${XRDB_FILE}" -dmenu ${ROFI_OPTIONS} > /dev/null )&

View File

@ -3,7 +3,6 @@
# This code is released in public domain by Dave Davenport <qball@gmpclient.org> # This code is released in public domain by Dave Davenport <qball@gmpclient.org>
# #
ROFI=$(which rofi) ROFI=$(which rofi)
SED=$(which sed) SED=$(which sed)
MKTEMP=$(which mktemp) MKTEMP=$(which mktemp)
@ -37,7 +36,7 @@ declare -a theme_names
# Function that tries to find all installed rofi themes. # Function that tries to find all installed rofi themes.
# This fills in #themes array and formats a displayable string #theme_names # This fills in #themes array and formats a displayable string #theme_names
## ##
function find_themes() find_themes()
{ {
DIRS=${XDG_DATA_DIRS} DIRS=${XDG_DATA_DIRS}
OLDIFS=${IFS} OLDIFS=${IFS}
@ -80,10 +79,10 @@ function find_themes()
do do
if [ -f "${file}" ] if [ -f "${file}" ]
then then
themes+=(${file}) themes+=("${file}")
FN=$(basename ${file}) FN=$(basename "${file}")
NAME=${FN%.*} NAME=${FN%.*}
USER=$(${SED} -n 's/^.*User: \(.*\)/\1/p' ${file} | head -n 1 ) USER=$(${SED} -n 's/^.*User: \(.*\)/\1/p' "${file}" | head -n 1 )
if [ -z "${USER}" ] if [ -z "${USER}" ]
then then
theme_names+=(${NAME}) theme_names+=(${NAME})
@ -95,29 +94,28 @@ function find_themes()
fi fi
done done
IFS=${OLDIFS} IFS=${OLDIFS}
} }
## ##
# Create a copy of rofi # Create a copy of rofi
## ##
function create_config_copy() create_config_copy()
{ {
${ROFI} -dump-config > ${TMP_CONFIG_FILE} ${ROFI} -dump-config > "${TMP_CONFIG_FILE}"
# remove theme entry. # remove theme entry.
sed -i 's/^\s*theme:\s\+".*"\s*;//g' ${TMP_CONFIG_FILE} sed -i 's/^\s*theme:\s\+".*"\s*;//g' "${TMP_CONFIG_FILE}"
} }
### ###
# Print the list out so it can be displayed by rofi. # Print the list out so it can be displayed by rofi.
## ##
function create_theme_list() create_theme_list()
{ {
OLDIFS=${IFS} OLDIFS=${IFS}
IFS='|' IFS='|'
for themen in ${theme_names[@]} for themen in ${theme_names[@]}
do do
echo ${themen} echo "${themen}"
done done
IFS=${OLDIFS} IFS=${OLDIFS}
} }
@ -127,9 +125,9 @@ function create_theme_list()
## ##
declare -i SELECTED declare -i SELECTED
function select_theme () select_theme()
{ {
local MORE_FLAGS=(-dmenu -format i -no-custom -p "Theme" -markup -config ${TMP_CONFIG_FILE} -i) local MORE_FLAGS=(-dmenu -format i -no-custom -p "Theme" -markup -config "${TMP_CONFIG_FILE}" -i)
MORE_FLAGS+=(-kb-custom-1 "Alt-a") MORE_FLAGS+=(-kb-custom-1 "Alt-a")
MORE_FLAGS+=(-u 2,3 -a 4,5 ) MORE_FLAGS+=(-u 2,3 -a 4,5 )
local CUR="default" local CUR="default"
@ -148,13 +146,13 @@ Current theme: <b>${CUR}</b>"""
fi fi
RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "${SELECTED}" -mesg "${MESG}") RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "${SELECTED}" -mesg "${MESG}")
RTR=$? RTR=$?
if [ ${RTR} = 10 ] if [ "${RTR}" = 10 ]
then then
return 0; return 0;
elif [ ${RTR} = 1 ] elif [ "${RTR}" = 1 ]
then then
return 1; return 1;
elif [ ${RTR} = 65 ] elif [ "${RTR}" = 65 ]
then then
return 1; return 1;
fi fi
@ -167,12 +165,12 @@ Current theme: <b>${CUR}</b>"""
# Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end. # Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end.
# Repeated calls should leave the config clean-ish # Repeated calls should leave the config clean-ish
### ###
function set_theme() set_theme()
{ {
CDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi" CDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi"
if [ ! -d "${CDIR}" ] if [ ! -d "${CDIR}" ]
then then
mkdir -p ${CDIR} mkdir -p "${CDIR}"
fi fi
get_link=$(readlink -f "${CDIR}/config.rasi") get_link=$(readlink -f "${CDIR}/config.rasi")
${SED} -i "/@import.*/d" "${get_link}" ${SED} -i "/@import.*/d" "${get_link}"
@ -213,4 +211,4 @@ fi
## ##
# Remove temp. config. # Remove temp. config.
## ##
rm ${TMP_CONFIG_FILE} rm -- "${TMP_CONFIG_FILE}"

View File

@ -434,7 +434,7 @@ static int dmenu_mode_init ( Mode *sw )
} }
g_free ( estr ); g_free ( estr );
} }
// If input is stdin, and a tty, do not read as rofi grabs input and therefor blocks. // If input is stdin, and a tty, do not read as rofi grabs input and therefore blocks.
if ( !( fd == STDIN_FILENO && isatty ( fd ) == 1 ) ) { if ( !( fd == STDIN_FILENO && isatty ( fd ) == 1 ) ) {
pd->cancel = g_cancellable_new (); pd->cancel = g_cancellable_new ();
pd->cancel_source = g_cancellable_connect ( pd->cancel, G_CALLBACK ( async_read_cancel ), pd, NULL ); pd->cancel_source = g_cancellable_connect ( pd->cancel, G_CALLBACK ( async_read_cancel ), pd, NULL );

View File

@ -1052,7 +1052,7 @@ static int drun_mode_init ( Mode *sw )
DRunModePrivateData *pd = g_malloc0 ( sizeof ( *pd ) ); DRunModePrivateData *pd = g_malloc0 ( sizeof ( *pd ) );
pd->disabled_entries = g_hash_table_new_full ( g_str_hash, g_str_equal, g_free, NULL ); pd->disabled_entries = g_hash_table_new_full ( g_str_hash, g_str_equal, g_free, NULL );
mode_set_private_data ( sw, (void *) pd ); mode_set_private_data ( sw, (void *) pd );
// current destkop // current desktop
const char *current_desktop = g_getenv ( "XDG_CURRENT_DESKTOP" ); const char *current_desktop = g_getenv ( "XDG_CURRENT_DESKTOP" );
pd->current_desktop_list = current_desktop ? g_strsplit ( current_desktop, ":", 0 ) : NULL; pd->current_desktop_list = current_desktop ? g_strsplit ( current_desktop, ":", 0 ) : NULL;
@ -1109,9 +1109,11 @@ static ModeMode drun_mode_result ( Mode *sw, int mretv, char **input, unsigned i
(*input) = g_strdup ( rmpd->old_input ); (*input) = g_strdup ( rmpd->old_input );
} }
rmpd->file_complete = FALSE; rmpd->file_complete = FALSE;
} else if ( (mretv&MENU_CANCEL) ) { }
else if ( (mretv&MENU_CANCEL) ) {
retv = MODE_EXIT; retv = MODE_EXIT;
} else { }
else {
char *path = NULL; char *path = NULL;
retv = file_browser_mode_completer ( rmpd->completer, mretv, input, selected_line, &path ); retv = file_browser_mode_completer ( rmpd->completer, mretv, input, selected_line, &path );
if ( retv == MODE_EXIT ) { if ( retv == MODE_EXIT ) {
@ -1145,7 +1147,7 @@ static ModeMode drun_mode_result ( Mode *sw, int mretv, char **input, unsigned i
} }
} }
else if ( ( mretv & MENU_ENTRY_DELETE ) && selected_line < rmpd->cmd_list_length ) { else if ( ( mretv & MENU_ENTRY_DELETE ) && selected_line < rmpd->cmd_list_length ) {
// Possitive sort index means it is in history. // Positive sort index means it is in history.
if ( rmpd->entry_list[selected_line].sort_index >= 0 ) { if ( rmpd->entry_list[selected_line].sort_index >= 0 ) {
delete_entry_history ( &( rmpd->entry_list[selected_line] ) ); delete_entry_history ( &( rmpd->entry_list[selected_line] ) );
drun_entry_clear ( &( rmpd->entry_list[selected_line] ) ); drun_entry_clear ( &( rmpd->entry_list[selected_line] ) );
@ -1157,7 +1159,8 @@ static ModeMode drun_mode_result ( Mode *sw, int mretv, char **input, unsigned i
} }
else if ( mretv & MENU_CUSTOM_COMMAND ) { else if ( mretv & MENU_CUSTOM_COMMAND ) {
retv = ( mretv & MENU_LOWER_MASK ); retv = ( mretv & MENU_LOWER_MASK );
} else if ( ( mretv& MENU_COMPLETE) ) { }
else if ( ( mretv& MENU_COMPLETE) ) {
retv = RELOAD_DIALOG; retv = RELOAD_DIALOG;
if ( selected_line < rmpd->cmd_list_length ) { if ( selected_line < rmpd->cmd_list_length ) {
switch ( rmpd->entry_list[selected_line].type ) switch ( rmpd->entry_list[selected_line].type )

View File

@ -436,16 +436,18 @@ static ModeMode run_mode_result ( Mode *sw, int mretv, char **input, unsigned in
(*input) = g_strdup ( rmpd->old_input ); (*input) = g_strdup ( rmpd->old_input );
} }
rmpd->file_complete = FALSE; rmpd->file_complete = FALSE;
} else if ( (mretv&MENU_CANCEL) ) { }
else if ( (mretv&MENU_CANCEL) ) {
retv = MODE_EXIT; retv = MODE_EXIT;
} else { }
else {
char *path = NULL; char *path = NULL;
retv = file_browser_mode_completer ( rmpd->completer, mretv, input, selected_line, &path ); retv = file_browser_mode_completer ( rmpd->completer, mretv, input, selected_line, &path );
if ( retv == MODE_EXIT ) { if ( retv == MODE_EXIT ) {
if ( path == NULL ) if ( path == NULL ) {
{
exec_cmd ( rmpd->cmd_list[rmpd->selected_line].entry, run_in_term ); exec_cmd ( rmpd->cmd_list[rmpd->selected_line].entry, run_in_term );
} else { }
else {
char *arg= g_strdup_printf ( "%s '%s'", rmpd->cmd_list[rmpd->selected_line].entry, path); char *arg= g_strdup_printf ( "%s '%s'", rmpd->cmd_list[rmpd->selected_line].entry, path);
exec_cmd ( arg, run_in_term ); exec_cmd ( arg, run_in_term );
g_free(arg); g_free(arg);
@ -477,7 +479,8 @@ static ModeMode run_mode_result ( Mode *sw, int mretv, char **input, unsigned in
} }
else if ( mretv & MENU_CUSTOM_COMMAND ) { else if ( mretv & MENU_CUSTOM_COMMAND ) {
retv = ( mretv & MENU_LOWER_MASK ); retv = ( mretv & MENU_LOWER_MASK );
} else if ( ( mretv& MENU_COMPLETE) ) { }
else if ( ( mretv& MENU_COMPLETE) ) {
retv = RELOAD_DIALOG; retv = RELOAD_DIALOG;
if ( selected_line < rmpd->cmd_list_length ) { if ( selected_line < rmpd->cmd_list_length ) {
rmpd->selected_line = selected_line; rmpd->selected_line = selected_line;

View File

@ -173,7 +173,7 @@ static void delete_ssh ( const char *host )
* @param retv list of hosts * @param retv list of hosts
* @param length pointer to length of list [in][out] * @param length pointer to length of list [in][out]
* *
* Read 'known_hosts' file when entries are not hashsed. * Read 'known_hosts' file when entries are not hashed.
* *
* @returns updated list of hosts. * @returns updated list of hosts.
*/ */

View File

@ -17,7 +17,7 @@ const char * const PropertyTypeName[P_NUM_TYPES] = {
/** Color */ /** Color */
"Color", "Color",
/** Image */ /** Image */
"Iamge", "Image",
/** Padding */ /** Padding */
"Padding", "Padding",
/** Link to global setting */ /** Link to global setting */

View File

@ -2074,7 +2074,7 @@ int rofi_view_error_dialog ( const char *msg, int markup )
// resize window vertically to suit // resize window vertically to suit
state->height = widget_get_desired_height ( WIDGET ( state->main_window ) ); state->height = widget_get_desired_height ( WIDGET ( state->main_window ) );
// Calculte window position. // Calculate window position.
rofi_view_calculate_window_position ( state ); rofi_view_calculate_window_position ( state );
// Move the window to the correct x,y position. // Move the window to the correct x,y position.

View File

@ -101,7 +101,7 @@ void widget_resize ( widget *widget, short w, short h )
widget->w = w; widget->w = w;
widget->h = h; widget->h = h;
} }
// On a resize we always want to udpate. // On a resize we always want to update.
widget_queue_redraw ( widget ); widget_queue_redraw ( widget );
} }
void widget_move ( widget *widget, short x, short y ) void widget_move ( widget *widget, short x, short y )

View File

@ -79,7 +79,6 @@ cairo_surface_t * rofi_icon_fetcher_get ( const uint32_t uid )
return NULL; return NULL;
} }
int monitor_active ( G_GNUC_UNUSED workarea *mon ) int monitor_active ( G_GNUC_UNUSED workarea *mon )
{ {
return 0; return 0;
@ -116,7 +115,6 @@ void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int
} }
int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv ) int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
{ {
{ {

View File

@ -2,14 +2,14 @@
TOP_DIR=$1 TOP_DIR=$1
xrdb -retain -load ${TOP_DIR}/doc/old-theme-convert-input.theme xrdb -retain -load "${TOP_DIR}/doc/old-theme-convert-input.theme"
rofi -config ${TOP_DIR}/doc/old-theme-convert-input.theme -dump-theme | grep -v "Rofi version" > temp.txt rofi -config "${TOP_DIR}/doc/old-theme-convert-input.theme" -dump-theme | grep -v "Rofi version" > temp.txt
if ! diff temp.txt ${TOP_DIR}/doc/old-theme-convert-output.rasi > /dev/null if ! diff temp.txt "${TOP_DIR}/doc/old-theme-convert-output.rasi" >/dev/null
then then
echo "Convert default theme failed" echo "Convert default theme failed"
diff temp.txt ${TOP_DIR}/doc/old-theme-convert-output.rasi diff temp.txt "${TOP_DIR}/doc/old-theme-convert-output.rasi"
exit 1; exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -4,11 +4,11 @@ TOP_DIR=$1
rofi -no-config -dump-theme | grep -v "Rofi version" > temp.txt rofi -no-config -dump-theme | grep -v "Rofi version" > temp.txt
if ! diff temp.txt ${TOP_DIR}/doc/default_theme.rasi > /dev/null if ! diff temp.txt "${TOP_DIR}/doc/default_theme.rasi" >/dev/null
then then
echo "Dump default theme does not match." echo "Dump default theme does not match."
diff temp.txt ${TOP_DIR}/doc/default_theme.rasi diff temp.txt "${TOP_DIR}/doc/default_theme.rasi"
exit 1; exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -2,13 +2,13 @@
TOP_DIR=$1 TOP_DIR=$1
rofi -h -config ${TOP_DIR}/doc/test_xr.txt | awk 'BEGIN{ found=1} /^Global options:/{found=0} {if (found) print }' > help-output.txt rofi -h -config "${TOP_DIR}/doc/test_xr.txt" | awk 'BEGIN{ found=1} /^Global options:/{found=0} {if (found) print }' > help-output.txt
if ! diff help-output.txt ${TOP_DIR}/doc/help-output.txt > /dev/null if ! diff help-output.txt "${TOP_DIR}/doc/help-output.txt" >/dev/null
then then
diff help-output.txt ${TOP_DIR}/doc/help-output.txt diff help-output.txt "${TOP_DIR}/doc/help-output.txt"
echo "Help output does not match." echo "Help output does not match."
exit 1; exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -73,7 +73,6 @@ void rofi_clear_error_messages (void )
{ {
} }
gboolean rofi_theme_parse_string ( const char *string ) gboolean rofi_theme_parse_string ( const char *string )
{ {
return FALSE; return FALSE;

View File

@ -221,7 +221,6 @@ static Suite * mode_suite (void)
return s; return s;
} }
int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv ) int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
{ {
setup_abe (); setup_abe ();

View File

@ -23,7 +23,7 @@ tests=(
run_window_test run_window_test
) )
cd ${MESON_BUILD_ROOT} cd -- "${MESON_BUILD_ROOT}"
mkdir -p test-x-logs mkdir -p test-x-logs
rm -f core rm -f core
display=200 display=200
@ -36,11 +36,11 @@ for test in "${tests[@]}"; do
echo "COREDUMP" echo "COREDUMP"
echo "bt" | gdb ./rofi core echo "bt" | gdb ./rofi core
more ${log_prefix}*.log | cat more ${log_prefix}*.log | cat
exit ${ret} exit "${ret}"
elif [[ ${ret} != 0 ]]; then elif [[ ${ret} != 0 ]]; then
echo "FAIL" echo "FAIL"
more ${log_prefix}*.log | cat more ${log_prefix}*.log | cat
exit ${ret} exit "${ret}"
fi fi
echo "PASS" echo "PASS"
display=$(( display + 1 )) display=$(( display + 1 ))

View File

@ -4,7 +4,7 @@ rofi -show combi -modi combi -combi-modi run,drun &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 't' xdotool key 't'
sleep 0.4 sleep 0.4
xdotool key 'r' xdotool key 'r'
@ -16,7 +16,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -5,10 +5,10 @@ RPID=$!
sleep 4 sleep 4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
if [ ${RETV} -eq 0 ] if [ "${RETV}" -eq 0 ]
then then
exit 0 exit 0
else else

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
sleep 1; sleep 1
echo {0..100} | tr " " "\n" | rofi -dmenu -multi-select > output.txt & echo {0..100} | tr " " "\n" | rofi -dmenu -multi-select > output.txt &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key '2' xdotool key '2'
sleep 0.4 sleep 0.4
xdotool key Shift+Return xdotool key Shift+Return
@ -36,7 +36,7 @@ xdotool key Shift+Return
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$(tr '\n' ' ' < output.txt) OUTPUT=$(tr '\n' ' ' < output.txt)
if [ "${OUTPUT}" != '2 12 20 21 22 23 24 25 26 27 28 29 ' ] if [ "${OUTPUT}" != '2 12 20 21 22 23 24 25 26 27 28 29 ' ]
@ -44,5 +44,5 @@ then
echo "Got: '${OUTPUT}' expected '2 12 20 21 22 23 24 25 26 27 28 29 '" echo "Got: '${OUTPUT}' expected '2 12 20 21 22 23 24 25 26 27 28 29 '"
exit 1 exit 1
fi fi
echo ${RETV} echo "${RETV}"
exit ${RETV} exit "${RETV}"

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
sleep 1; sleep 1
ulimit -c unlimited ulimit -c unlimited
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -normal-window -multi-select > output.txt & echo -e -n "aap\nnoot\nmies" | rofi -dmenu -normal-window -multi-select > output.txt &
RPID=$! RPID=$!
@ -17,7 +17,7 @@ xdotool key Shift+Return
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
if [ "${RETV}" == "139" ] if [ "${RETV}" == "139" ]
then then
@ -30,5 +30,5 @@ then
echo "Got: '${OUTPUT}' expected 'noot mies '" echo "Got: '${OUTPUT}' expected 'noot mies '"
exit 1 exit 1
fi fi
echo ${RETV} echo "${RETV}"
exit ${RETV} exit "${RETV}"

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
sleep 1; sleep 1
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -multi-select > output.txt & echo -e -n "aap\nnoot\nmies" | rofi -dmenu -multi-select > output.txt &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 'Down' xdotool key 'Down'
sleep 0.4 sleep 0.4
xdotool key Shift+Return xdotool key Shift+Return
@ -14,7 +14,7 @@ xdotool key Shift+Return
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$( tr '\n' ' ' < output.txt ) OUTPUT=$( tr '\n' ' ' < output.txt )
if [ "${OUTPUT}" != 'noot mies ' ] if [ "${OUTPUT}" != 'noot mies ' ]
@ -22,5 +22,5 @@ then
echo "Got: '${OUTPUT}' expected 'noot mies '" echo "Got: '${OUTPUT}' expected 'noot mies '"
exit 1 exit 1
fi fi
echo ${RETV} echo "${RETV}"
exit ${RETV} exit "${RETV}"

View File

@ -4,7 +4,7 @@ rofi -show drun -modi drun &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 't' xdotool key 't'
sleep 0.4 sleep 0.4
xdotool key 'r' xdotool key 'r'
@ -16,7 +16,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -8,6 +8,6 @@ RPID=$!
sleep 5 && xdotool key Return sleep 5 && xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -4,7 +4,7 @@ echo -en "nooty\naap\nnoot\nmies" | rofi -matching glob -dmenu > output.txt &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 'n' xdotool key 'n'
sleep 0.4 sleep 0.4
xdotool key Shift+'8' xdotool key Shift+'8'
@ -14,7 +14,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$(cat output.txt) OUTPUT=$(cat output.txt)
if [ "${OUTPUT}" != 'nooty' ] if [ "${OUTPUT}" != 'nooty' ]
@ -23,4 +23,4 @@ then
exit 1 exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -2,12 +2,12 @@
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
rm -f output.txt rm -f output.txt
sleep 1; sleep 1
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -no-custom -kb-custom-1 F5 -kb-move-front "" -kb-custom-2 "Control+a" > output.txt & echo -e -n "aap\nnoot\nmies" | rofi -dmenu -no-custom -kb-custom-1 F5 -kb-move-front "" -kb-custom-2 "Control+a" > output.txt &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 'q' xdotool key 'q'
sleep 0.4 sleep 0.4
xdotool key Return xdotool key Return
@ -19,7 +19,7 @@ sleep 0.4
xdotool key Escape xdotool key Escape
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$(tr '\n' ' ' < output.txt) OUTPUT=$(tr '\n' ' ' < output.txt)
if [ "${OUTPUT}" != '' ] if [ "${OUTPUT}" != '' ]
@ -27,7 +27,7 @@ then
echo "Got: '${OUTPUT}' expected nothing" echo "Got: '${OUTPUT}' expected nothing"
exit 1 exit 1
fi fi
if [ ${RETV} != 1 ] if [ "${RETV}" != 1 ]
then then
exit 1 exit 1
fi fi

View File

@ -4,7 +4,7 @@ rofi -show window -modi window &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 't' xdotool key 't'
sleep 0.4 sleep 0.4
xdotool key 'r' xdotool key 'r'
@ -16,7 +16,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -4,7 +4,7 @@ echo -e "aap\nnoot\nmies" | rofi -dmenu &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 't' xdotool key 't'
sleep 0.4 sleep 0.4
xdotool key 'r' xdotool key 'r'
@ -18,7 +18,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -4,7 +4,7 @@ echo -en "nooty\naap\nnoot\nmies" | rofi -matching regex -dmenu > output.txt
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key Shift+'6' xdotool key Shift+'6'
sleep 0.4 sleep 0.4
xdotool key 'n' xdotool key 'n'
@ -20,7 +20,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$(cat output.txt) OUTPUT=$(cat output.txt)
if [ "${OUTPUT}" != 'noot' ] if [ "${OUTPUT}" != 'noot' ]
@ -29,4 +29,4 @@ then
exit 1 exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -4,7 +4,7 @@ rofi -show run &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 't' xdotool key 't'
sleep 0.4 sleep 0.4
xdotool key 'r' xdotool key 'r'
@ -16,7 +16,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -5,7 +5,7 @@ rofi -show run &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 't' xdotool key 't'
sleep 0.4 sleep 0.4
xdotool key 'r' xdotool key 'r'
@ -17,7 +17,7 @@ sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
if [ ! -f out.png ] if [ ! -f out.png ]
@ -25,4 +25,4 @@ then
echo "Failed to create screenshot" echo "Failed to create screenshot"
exit 1 exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -4,23 +4,23 @@ SP=$(readlink -f "$0")
DIR=$(dirname "$SP") DIR=$(dirname "$SP")
echo "$DIR/test_script.sh" echo "$DIR/test_script.sh"
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
sleep 1; sleep 1
rofi -modi "custom:$DIR/test_script.sh" -show custom & rofi -modi "custom:$DIR/test_script.sh" -show custom &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 'z' xdotool key 'z'
sleep 0.4 sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$( tr '\n' ' ' < output.txt ) OUTPUT=$( tr '\n' ' ' < output.txt )
echo ${OUTPUT} echo "${OUTPUT}"
if [ "${OUTPUT}" != 'mies ' ] if [ "${OUTPUT}" != 'mies ' ]
then then
exit 1 exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -4,23 +4,23 @@ SP=$(readlink -f "$0")
DIR=$(dirname "$SP") DIR=$(dirname "$SP")
echo "$DIR/test_script.sh" echo "$DIR/test_script.sh"
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
sleep 1; sleep 1
rofi -modi "custom:$DIR/test_script.sh" -show custom & rofi -modi "custom:$DIR/test_script.sh" -show custom &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 'Down' xdotool key 'Down'
sleep 0.4 sleep 0.4
xdotool key Return xdotool key Return
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
OUTPUT=$( tr '\n' ' ' < output.txt ) OUTPUT=$( tr '\n' ' ' < output.txt )
echo ${OUTPUT} echo "${OUTPUT}"
if [ "${OUTPUT}" != 'noot ' ] if [ "${OUTPUT}" != 'noot ' ]
then then
exit 1 exit 1
fi fi
exit ${RETV} exit "${RETV}"

View File

@ -5,7 +5,7 @@ sleep 1 && rofi -show run -modi run &
RPID=$! RPID=$!
# send enter. # send enter.
sleep 5; sleep 5
xdotool key 'shift+slash' xdotool key 'shift+slash'
sleep 0.4 sleep 0.4
xdotool key 'shift+slash' xdotool key 'shift+slash'
@ -15,9 +15,9 @@ sleep 0.4
xdotool key Escape xdotool key Escape
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
sleep 1 sleep 1
exit ${RETV} exit "${RETV}"

View File

@ -2,14 +2,14 @@
XPID= XPID=
FPID= FPID=
function create_fake_x ( ) create_fake_x()
{ {
export DISPLAY=":$1" export DISPLAY=":$1"
echo -n "Starting fake X for display ${DISPLAY}: " echo -n "Starting fake X for display ${DISPLAY}: "
Xvfb -nolisten tcp +extension XINERAMA +xinerama -screen 0 1280x1024x24 ${DISPLAY} &>$2-server.log & Xvfb -nolisten tcp +extension XINERAMA +xinerama -screen 0 1280x1024x24 "${DISPLAY}" &>$2-server.log &
XPID=$! XPID=$!
echo "pid ${XPID}" echo "pid ${XPID}"
sleep 1; sleep 1
if [ -x "$(which fluxbox 2>/dev/null)" ]; then if [ -x "$(which fluxbox 2>/dev/null)" ]; then
echo -n "Starting fluxbox for display ${DISPLAY}: " echo -n "Starting fluxbox for display ${DISPLAY}: "
timeout -k 30s 30s fluxbox &>$2-fluxbox.log & timeout -k 30s 30s fluxbox &>$2-fluxbox.log &
@ -19,24 +19,24 @@ function create_fake_x ( )
fi fi
} }
function destroy_fake_x ( ) destroy_fake_x()
{ {
if [ -n "${XPID}" ] if [ -n "${XPID}" ]
then then
if [ -n "${FPID}" ]; then if [ -n "${FPID}" ]; then
echo -n "Stopping fluxbox for display ${DISPLAY} (pid ${FPID}): " echo -n "Stopping fluxbox for display ${DISPLAY} (pid ${FPID}): "
if kill ${FPID} &>$1-kill-fluxbox.log; then if kill "${FPID}" &>$1-kill-fluxbox.log; then
echo -n " killed... " echo -n " killed... "
wait ${FPID} &>$1-wait-fluxbox.log wait "${FPID}" &>$1-wait-fluxbox.log
echo "stopped" echo "stopped"
else else
echo -n " failed to kill" echo -n " failed to kill"
fi fi
fi fi
echo -n "Stopping fake X for display ${DISPLAY} (pid ${XPID}): " echo -n "Stopping fake X for display ${DISPLAY} (pid ${XPID}): "
if kill ${XPID} &>$1-kill-X.log; then if kill "${XPID}" &>$1-kill-X.log; then
echo -n " killed... " echo -n " killed... "
wait ${XPID} &>$1-wait-X.log wait "${XPID}" &>$1-wait-X.log
echo "stopped" echo "stopped"
else else
echo -n " failed to kill" echo -n " failed to kill"
@ -55,4 +55,4 @@ RES=$?
destroy_fake_x "$2" destroy_fake_x "$2"
exit ${RES} exit "${RES}"

View File

@ -1,46 +1,46 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# wait till it is up, run rofi with error message # wait till it is up, run rofi with error message
sleep 1; sleep 1
xterm -T MonkeySee sh & xterm -T MonkeySee sh &
XPID=$! XPID=$!
echo "Started MonkeySee xterm: pid ${XPID}" echo "Started MonkeySee xterm: pid ${XPID}"
sleep 1; sleep 1
xterm -T TermUnwanted sh & xterm -T TermUnwanted sh &
TPID=$! TPID=$!
echo "Started TermUnwanted xterm: pid ${TPID}" echo "Started TermUnwanted xterm: pid ${TPID}"
sleep 1; sleep 1
rofi -modi window -show window > output.txt & rofi -modi window -show window > output.txt &
RPID=$! RPID=$!
echo "Started rofi: pid ${RPID}" echo "Started rofi: pid ${RPID}"
# send enter. # send enter.
sleep 5; sleep 5
xdotool type 'MonkeySee' xdotool type 'MonkeySee'
sleep 0.4 sleep 0.4
xdotool key Return xdotool key Return
sleep 1; sleep 1
xdotool key Ctrl+d xdotool key Ctrl+d
sleep 1; sleep 1
echo -n "Killing TermUnwanted: " echo -n "Killing TermUnwanted: "
if kill ${TPID}; then if kill "${TPID}"; then
echo "done" echo "done"
wait ${TPID} wait "${TPID}"
fi fi
if ps -q ${XPID} # pgrep -u $USER xterm if ps -q "${XPID}" # pgrep -u $USER xterm
then then
echo "Found remaining xterms: $(pgrep -u $USER xterm)" echo "Found remaining xterms: $(pgrep -u "$USER" xterm)"
kill ${XPID} kill "${XPID}"
fi fi
if ps -q ${RPID} if ps -q "${RPID}"
then then
echo "Rofi still running" echo "Rofi still running"
kill ${RPID} kill "${RPID}"
exit 1 exit 1
fi fi
# Get result, kill xvfb # Get result, kill xvfb
wait ${RPID} wait "${RPID}"
RETV=$? RETV=$?
exit ${RETV} exit "${RETV}"

View File

@ -6,5 +6,5 @@ then
echo "noot" echo "noot"
echo -ne "mies\0meta\x1fzoom\n" echo -ne "mies\0meta\x1fzoom\n"
else else
echo $1 > output.txt echo "$1" > output.txt
fi fi

View File

@ -53,7 +53,6 @@ unsigned int normal_window_mode = 0;
#include "view.h" #include "view.h"
ThemeWidget *rofi_configuration = NULL; ThemeWidget *rofi_configuration = NULL;
uint32_t rofi_icon_fetcher_query ( const char *name, const int size ) uint32_t rofi_icon_fetcher_query ( const char *name, const int size )

View File

@ -64,7 +64,6 @@ cairo_surface_t * rofi_icon_fetcher_get ( const uint32_t uid )
return NULL; return NULL;
} }
int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup ) int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
{ {
fputs ( msg, stderr ); fputs ( msg, stderr );
@ -127,7 +126,6 @@ void rofi_add_error_message ( GString *msg )
static void theme_parser_setup ( void ) static void theme_parser_setup ( void )
{ {
error = 0; error = 0;
} }
static void theme_parser_teardown ( void ) static void theme_parser_teardown ( void )
{ {
@ -135,7 +133,6 @@ static void theme_parser_teardown ( void )
ck_assert_int_eq ( error, 0); ck_assert_int_eq ( error, 0);
rofi_theme_free ( rofi_theme ); rofi_theme_free ( rofi_theme );
rofi_theme = NULL; rofi_theme = NULL;
} }
START_TEST (test_core_empty_string ) START_TEST (test_core_empty_string )
@ -1097,7 +1094,6 @@ START_TEST ( test_properties_integer)
} }
END_TEST END_TEST
START_TEST ( test_properties_orientation ) START_TEST ( test_properties_orientation )
{ {
widget wid; widget wid;
@ -1238,13 +1234,11 @@ START_TEST ( test_core_properties_error )
g_string_free ( error_msg, TRUE); g_string_free ( error_msg, TRUE);
error_msg = NULL; error_msg = NULL;
error = 0; error = 0;
} }
END_TEST END_TEST
START_TEST ( test_import_error ) START_TEST ( test_import_error )
{ {
rofi_theme_parse_string("@import \"/non-existing-file.rasi\""); rofi_theme_parse_string("@import \"/non-existing-file.rasi\"");
const char *errstr = const char *errstr =
@ -1283,7 +1277,6 @@ START_TEST ( test_prepare_path )
} }
END_TEST END_TEST
START_TEST(test_properties_types_names) START_TEST(test_properties_types_names)
{ {
ck_assert_str_eq ( PropertyTypeName[P_INTEGER], "Integer"); ck_assert_str_eq ( PropertyTypeName[P_INTEGER], "Integer");
@ -1297,7 +1290,6 @@ START_TEST(test_properties_types_names)
ck_assert_str_eq ( PropertyTypeName[P_HIGHLIGHT], "Highlight"); ck_assert_str_eq ( PropertyTypeName[P_HIGHLIGHT], "Highlight");
ck_assert_str_eq ( PropertyTypeName[P_LIST], "List"); ck_assert_str_eq ( PropertyTypeName[P_LIST], "List");
ck_assert_str_eq ( PropertyTypeName[P_ORIENTATION], "Orientation"); ck_assert_str_eq ( PropertyTypeName[P_ORIENTATION], "Orientation");
} }
END_TEST END_TEST
@ -1464,7 +1456,6 @@ int main ( int argc, char ** argv )
return EXIT_FAILURE; return EXIT_FAILURE;
} }
Suite *s; Suite *s;
SRunner *sr; SRunner *sr;

View File

@ -190,7 +190,6 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
TASSERT ( widget_intersect ( wid, 20+30, 20+40) == 0 ); TASSERT ( widget_intersect ( wid, 20+30, 20+40) == 0 );
TASSERT ( widget_intersect ( wid, 20+30, 20+50) == 0 ); TASSERT ( widget_intersect ( wid, 20+30, 20+50) == 0 );
TASSERT ( widget_intersect ( wid, -100, -100) == 0); TASSERT ( widget_intersect ( wid, -100, -100) == 0);
TASSERT ( widget_intersect ( wid, INT_MIN, INT_MIN) == 0); TASSERT ( widget_intersect ( wid, INT_MIN, INT_MIN) == 0);
TASSERT ( widget_intersect ( wid, INT_MAX, INT_MAX) == 0); TASSERT ( widget_intersect ( wid, INT_MAX, INT_MAX) == 0);
@ -221,6 +220,5 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
widget_trigger_action ( NULL, 0, 0, 0 ); widget_trigger_action ( NULL, 0, 0, 0 );
widget_set_trigger_action_handler ( NULL, NULL, NULL ); widget_set_trigger_action_handler ( NULL, NULL, NULL );
g_free(wid); g_free(wid);
} }

View File

@ -3,6 +3,7 @@
* User: Qball * User: Qball
* Copyright: Dave Davenport * Copyright: Dave Davenport
*/ */
* { * {
selected-normal-foreground: rgba ( 245, 245, 245, 100 % ); selected-normal-foreground: rgba ( 245, 245, 245, 100 % );
foreground: rgba ( 0, 43, 54, 100 % ); foreground: rgba ( 0, 43, 54, 100 % );

View File

@ -4,10 +4,6 @@
* Copyright: Dave Davenport * Copyright: Dave Davenport
*/ */
/**
* User: Qball
* Copyright: Dave Davenport
*/
* { * {
foreground: #ffeedd; foreground: #ffeedd;
backlight: #ccffeedd; backlight: #ccffeedd;
@ -66,12 +62,10 @@ window {
children: [mainbox]; children: [mainbox];
orientation: horizontal; orientation: horizontal;
} }
mainbox { mainbox {
spacing: 0; spacing: 0;
children: [ inputbar, message, listview ]; children: [ inputbar, message, listview ];
} }
message { message {
border-color: @foreground; border-color: @foreground;
border: 0px 2px 2px 2px; border: 0px 2px 2px 2px;
@ -83,7 +77,6 @@ message {
font: "Source Code Pro 8"; font: "Source Code Pro 8";
color: @black; color: @black;
} }
inputbar { inputbar {
color: @lightgreen; color: @lightgreen;
padding: 11px; padding: 11px;
@ -146,7 +139,6 @@ element selected urgent {
element normal normal { element normal normal {
} }
vertb { vertb {
expand: false; expand: false;
children: [ dummy0, mode-switcher, dummy1 ]; children: [ dummy0, mode-switcher, dummy1 ];
@ -154,7 +146,6 @@ vertb {
dummy0, dummy1 { dummy0, dummy1 {
expand: true; expand: true;
} }
mode-switcher { mode-switcher {
expand: false; expand: false;
orientation: vertical; orientation: vertical;
@ -177,7 +168,6 @@ button selected normal {
background-color: @backlight; background-color: @backlight;
border-color: @foreground; border-color: @foreground;
} }
error-message { error-message {
expand: true; expand: true;
background-color: red; background-color: red;

View File

@ -1,8 +1,8 @@
/****************************************************************************** /**
* ROFI Color theme * ROFI Color theme
* User: qball * User: Qball
* Copyright: Dave Davenport * Copyright: Dave Davenport
******************************************************************************/ */
* { * {
selected-normal-foreground: rgba ( 0, 96, 160, 100 % ); selected-normal-foreground: rgba ( 0, 96, 160, 100 % );

View File

@ -3,13 +3,13 @@
* User: Qball * User: Qball
* Copyright: Dave Davenport * Copyright: Dave Davenport
*/ */
* { * {
background-color: Black; background-color: Black;
border-color: White; border-color: White;
text-color: White; text-color: White;
font: "Times New Roman 12"; font: "Times New Roman 12";
} }
window { window {
anchor: north; anchor: north;
location: north; location: north;
@ -17,23 +17,19 @@ window {
padding: 4px; padding: 4px;
children: [ horibox ]; children: [ horibox ];
} }
horibox { horibox {
orientation: horizontal; orientation: horizontal;
children: [ prompt, entry, listview ]; children: [ prompt, entry, listview ];
} }
listview { listview {
layout: horizontal; layout: horizontal;
spacing: 5px; spacing: 5px;
lines: 100; lines: 100;
} }
entry { entry {
expand: false; expand: false;
width: 10em; width: 10em;
} }
element { element {
padding: 0px 2px; padding: 0px 2px;
} }

View File

@ -4,6 +4,7 @@
* User: Qball * User: Qball
* Copyright: Dave Davenport * Copyright: Dave Davenport
*/ */
* { * {
blue: #0000FF; blue: #0000FF;
white: #FFFFFF; white: #FFFFFF;
@ -105,7 +106,6 @@ inputbar normal {
foreground-color: #002B36FF; foreground-color: #002B36FF;
background-color: #F5F5F500; background-color: #F5F5F500;
} }
mode-switcher { mode-switcher {
border: 2px; border: 2px;
padding: 0.5em 1em; padding: 0.5em 1em;
@ -124,7 +124,6 @@ textbox-prompt-colon {
margin: 0px 0.3em 0em 0em ; margin: 0px 0.3em 0em 0em ;
text-color: @normal-foreground; text-color: @normal-foreground;
} }
error-message { error-message {
border: 2px; border: 2px;
padding: 1em; padding: 1em;

View File

@ -1,7 +1,9 @@
/** /**
* User: qball * ROFI Color theme
* User: Qball
* Copyright: Dave Davenport * Copyright: Dave Davenport
*/ */
* { * {
text-color: #ffeedd; text-color: #ffeedd;
background-color: rgba(0,0,0,0); background-color: rgba(0,0,0,0);
@ -49,7 +51,6 @@ window {
border: 0px 2px 0px 0px; border: 0px 2px 0px 0px;
text-color: @lightwhite; text-color: @lightwhite;
} }
mode-switcher { mode-switcher {
border: 2px 0px 0px 0px; border: 2px 0px 0px 0px;
background-color: @lightblack; background-color: @lightblack;
@ -100,7 +101,6 @@ element selected urgent {
background-color: @lightred; background-color: @lightred;
text-color: @dark; text-color: @dark;
} }
error-message { error-message {
expand: true; expand: true;
background-color: red; background-color: red;