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/
about: Please ask and answer questions here.
- 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.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -73,7 +73,7 @@ An integer number with the current state:
.IP \(bu 2
\fB2\fP: Selected a custom entry.
.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

View File

@ -57,7 +57,7 @@ An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an 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`

View File

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

View File

@ -1424,7 +1424,7 @@ icon\-paste {
.PP
This is a textbox widget that can have a 'clickable' action.
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
.RS

View File

@ -888,7 +888,7 @@ icon-paste {
This is a textbox widget that can have a 'clickable' action.
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
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
.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
\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.
.PP
It is now prefered to use the configuration file:
It is now preferred to use the configuration file:
.PP
.RS

View File

@ -106,7 +106,7 @@ Dump the current active theme, in rasi format, to stdout and exit.
`-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*
@ -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.
It is now prefered to use the configuration file:
It is now preferred to use the configuration file:
```css
configuration {

View File

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

View File

@ -102,7 +102,7 @@ Mode * rofi_collect_modi_search ( const char *name );
#define ERROR_MSG( a ) a "\n" \
"If you suspect this is caused by a bug in rofi,\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" \
" * Steps to reproduce\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_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 );
/**
* @param widget The widget to query
* @param property The property to query.

View File

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

View File

@ -62,7 +62,7 @@ typedef enum
* @param sw the Mode to show.
* @param input A pointer to a string where the inputted data is placed.
* @param menu_flags Flags indicating state of the menu.
* @param finalize the finailze callback
* @param finalize the finalize 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;
}
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>1)?1.0:0.0;
if ( t < (1/6.0) ) {
@ -617,7 +618,6 @@ t_color_list
;
/** List of elements */
t_property_element_list_optional
: %empty { $$ = NULL; }
@ -857,14 +857,20 @@ t_property_color
if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; }
if ( ! check_in_range($6,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 ) */
| 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($5,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 */
| 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) \
$(GW_XCB_INTERNAL_CFLAGS)
GW_XCB_CFLAGS = \
-I$(srcdir)/subprojects/libgwater/xcb \
$(GW_XCB_INTERNAL_CFLAGS)
@ -17,4 +16,3 @@ GW_XCB_CFLAGS = \
GW_XCB_LIBS = \
libgwater-xcb.a \
$(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
**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).
### 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 daemon mode, given this duplicates Window Manager functionality.

View File

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

View File

@ -40,7 +40,7 @@ rofi.window-format: {t:-16} ({c:10})
## 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
Xresources, configuration file or commnadline.
Xresources, configuration file or commandline.
![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.
* Support different font per textbox.
* 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,
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:
@ -70,4 +70,3 @@ The full list of fixes and updates:
* Update libnkutils, libgwater.
* DMENU: Add format option to strip pango markup from return value.
* 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.
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:

View File

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

View File

@ -3,7 +3,7 @@
# 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)
#
function update_color ()
update_color()
{
var=${1}
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
@ -12,11 +12,11 @@ function update_color ()
then
echo "#${var:5}"
else
echo ${var}
echo "${var}"
fi
}
function parse_window_color ()
parse_window_color()
{
OLDIFS=${IFS}
IFS=","
@ -37,7 +37,7 @@ function parse_window_color ()
IFS=${OLDIFS}
}
function parse_color ()
parse_color()
{
state=$1
OLDIFS=${IFS}

View File

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

View File

@ -19,7 +19,7 @@ XDOTOOL=$(which xdotool 2> /dev/null)
XRDB=$(which xrdb 2>/dev/null)
ROFI=$(which rofi 2>/dev/null)
function check_tool()
check_tool()
{
if [ -z "${1}" ]
then
@ -29,26 +29,26 @@ function check_tool()
}
XPID=
function create_fake_x ( )
create_fake_x()
{
export DISPLAY=":$1"
echo "Starting fake X: ${DISPLAY}"
${XVFB} ${DISPLAY} -screen 0 800x600x24 &
${XVFB} "${DISPLAY}" -screen 0 800x600x24 &
XPID=$!
sleep 1
}
function destroy_fake_x ( )
destroy_fake_x()
{
if [ -n "${XPID}" ]
then
echo "Stopping fake X: ${XPID}"
kill ${XPID}
wait ${XPID}
kill "${XPID}"
wait "${XPID}"
fi
}
function generate()
generate()
{
echo "Normal"
echo "Alternative"
@ -84,13 +84,13 @@ then
fi
# Create fake X11
create_fake_x ${VDISPLAY}
create_fake_x "${VDISPLAY}"
# Load Xresources if specified.
if [ -n "${XRDB_FILE}" ]
then
echo -e "${COLOR_YELLOW}Loading Xresources:${RESET} ${XRDB_FILE}"
${XRDB} -retain -load ${XRDB_FILE}
${XRDB} -retain -load "${XRDB_FILE}"
fi
(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>
#
ROFI=$(which rofi)
SED=$(which sed)
MKTEMP=$(which mktemp)
@ -37,7 +36,7 @@ declare -a theme_names
# Function that tries to find all installed rofi themes.
# This fills in #themes array and formats a displayable string #theme_names
##
function find_themes()
find_themes()
{
DIRS=${XDG_DATA_DIRS}
OLDIFS=${IFS}
@ -80,10 +79,10 @@ function find_themes()
do
if [ -f "${file}" ]
then
themes+=(${file})
FN=$(basename ${file})
themes+=("${file}")
FN=$(basename "${file}")
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}" ]
then
theme_names+=(${NAME})
@ -95,29 +94,28 @@ function find_themes()
fi
done
IFS=${OLDIFS}
}
##
# 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.
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.
##
function create_theme_list()
create_theme_list()
{
OLDIFS=${IFS}
IFS='|'
for themen in ${theme_names[@]}
do
echo ${themen}
echo "${themen}"
done
IFS=${OLDIFS}
}
@ -127,9 +125,9 @@ function create_theme_list()
##
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+=(-u 2,3 -a 4,5 )
local CUR="default"
@ -148,13 +146,13 @@ Current theme: <b>${CUR}</b>"""
fi
RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "${SELECTED}" -mesg "${MESG}")
RTR=$?
if [ ${RTR} = 10 ]
if [ "${RTR}" = 10 ]
then
return 0;
elif [ ${RTR} = 1 ]
elif [ "${RTR}" = 1 ]
then
return 1;
elif [ ${RTR} = 65 ]
elif [ "${RTR}" = 65 ]
then
return 1;
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.
# Repeated calls should leave the config clean-ish
###
function set_theme()
set_theme()
{
CDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi"
if [ ! -d "${CDIR}" ]
then
mkdir -p ${CDIR}
mkdir -p "${CDIR}"
fi
get_link=$(readlink -f "${CDIR}/config.rasi")
${SED} -i "/@import.*/d" "${get_link}"
@ -213,4 +211,4 @@ fi
##
# 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 );
}
// 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 ) ) {
pd->cancel = g_cancellable_new ();
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 ) );
pd->disabled_entries = g_hash_table_new_full ( g_str_hash, g_str_equal, g_free, NULL );
mode_set_private_data ( sw, (void *) pd );
// current destkop
// current desktop
const char *current_desktop = g_getenv ( "XDG_CURRENT_DESKTOP" );
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 );
}
rmpd->file_complete = FALSE;
} else if ( (mretv&MENU_CANCEL) ) {
}
else if ( (mretv&MENU_CANCEL) ) {
retv = MODE_EXIT;
} else {
}
else {
char *path = NULL;
retv = file_browser_mode_completer ( rmpd->completer, mretv, input, selected_line, &path );
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 ) {
// 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 ) {
delete_entry_history ( &( 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 ) {
retv = ( mretv & MENU_LOWER_MASK );
} else if ( ( mretv& MENU_COMPLETE) ) {
}
else if ( ( mretv& MENU_COMPLETE) ) {
retv = RELOAD_DIALOG;
if ( selected_line < rmpd->cmd_list_length ) {
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 );
}
rmpd->file_complete = FALSE;
} else if ( (mretv&MENU_CANCEL) ) {
}
else if ( (mretv&MENU_CANCEL) ) {
retv = MODE_EXIT;
} else {
}
else {
char *path = NULL;
retv = file_browser_mode_completer ( rmpd->completer, mretv, input, selected_line, &path );
if ( retv == MODE_EXIT ) {
if ( path == NULL )
{
if ( path == NULL ) {
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);
exec_cmd ( arg, run_in_term );
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 ) {
retv = ( mretv & MENU_LOWER_MASK );
} else if ( ( mretv& MENU_COMPLETE) ) {
}
else if ( ( mretv& MENU_COMPLETE) ) {
retv = RELOAD_DIALOG;
if ( selected_line < rmpd->cmd_list_length ) {
rmpd->selected_line = selected_line;

View File

@ -173,7 +173,7 @@ static void delete_ssh ( const char *host )
* @param retv list of hosts
* @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.
*/

View File

@ -17,7 +17,7 @@ const char * const PropertyTypeName[P_NUM_TYPES] = {
/** Color */
"Color",
/** Image */
"Iamge",
"Image",
/** Padding */
"Padding",
/** 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
state->height = widget_get_desired_height ( WIDGET ( state->main_window ) );
// Calculte window position.
// Calculate window position.
rofi_view_calculate_window_position ( state );
// 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->h = h;
}
// On a resize we always want to udpate.
// On a resize we always want to update.
widget_queue_redraw ( widget );
}
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;
}
int monitor_active ( G_GNUC_UNUSED workarea *mon )
{
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 )
{
{

View File

@ -2,14 +2,14 @@
TOP_DIR=$1
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
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
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
echo "Convert default theme failed"
diff temp.txt ${TOP_DIR}/doc/old-theme-convert-output.rasi
exit 1;
diff temp.txt "${TOP_DIR}/doc/old-theme-convert-output.rasi"
exit 1
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
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
echo "Dump default theme does not match."
diff temp.txt ${TOP_DIR}/doc/default_theme.rasi
exit 1;
diff temp.txt "${TOP_DIR}/doc/default_theme.rasi"
exit 1
fi
exit ${RETV}
exit "${RETV}"

View File

@ -2,13 +2,13 @@
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
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."
exit 1;
exit 1
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 )
{
return FALSE;

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash
# 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 &
RPID=$!
# send enter.
sleep 5;
sleep 5
xdotool key '2'
sleep 0.4
xdotool key Shift+Return
@ -36,7 +36,7 @@ xdotool key Shift+Return
xdotool key Return
# Get result, kill xvfb
wait ${RPID}
wait "${RPID}"
RETV=$?
OUTPUT=$(tr '\n' ' ' < output.txt)
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 '"
exit 1
fi
echo ${RETV}
exit ${RETV}
echo "${RETV}"
exit "${RETV}"

View File

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

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash
# 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 &
RPID=$!
# send enter.
sleep 5;
sleep 5
xdotool key 'Down'
sleep 0.4
xdotool key Shift+Return
@ -14,7 +14,7 @@ xdotool key Shift+Return
xdotool key Return
# Get result, kill xvfb
wait ${RPID}
wait "${RPID}"
RETV=$?
OUTPUT=$( tr '\n' ' ' < output.txt )
if [ "${OUTPUT}" != 'noot mies ' ]
@ -22,5 +22,5 @@ then
echo "Got: '${OUTPUT}' expected 'noot mies '"
exit 1
fi
echo ${RETV}
exit ${RETV}
echo "${RETV}"
exit "${RETV}"

View File

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

View File

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

View File

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

View File

@ -2,12 +2,12 @@
# wait till it is up, run rofi with error message
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 &
RPID=$!
# send enter.
sleep 5;
sleep 5
xdotool key 'q'
sleep 0.4
xdotool key Return
@ -19,7 +19,7 @@ sleep 0.4
xdotool key Escape
# Get result, kill xvfb
wait ${RPID}
wait "${RPID}"
RETV=$?
OUTPUT=$(tr '\n' ' ' < output.txt)
if [ "${OUTPUT}" != '' ]
@ -27,7 +27,7 @@ then
echo "Got: '${OUTPUT}' expected nothing"
exit 1
fi
if [ ${RETV} != 1 ]
if [ "${RETV}" != 1 ]
then
exit 1
fi

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,14 +2,14 @@
XPID=
FPID=
function create_fake_x ( )
create_fake_x()
{
export DISPLAY=":$1"
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=$!
echo "pid ${XPID}"
sleep 1;
sleep 1
if [ -x "$(which fluxbox 2>/dev/null)" ]; then
echo -n "Starting fluxbox for display ${DISPLAY}: "
timeout -k 30s 30s fluxbox &>$2-fluxbox.log &
@ -19,24 +19,24 @@ function create_fake_x ( )
fi
}
function destroy_fake_x ( )
destroy_fake_x()
{
if [ -n "${XPID}" ]
then
if [ -n "${FPID}" ]; then
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... "
wait ${FPID} &>$1-wait-fluxbox.log
wait "${FPID}" &>$1-wait-fluxbox.log
echo "stopped"
else
echo -n " failed to kill"
fi
fi
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... "
wait ${XPID} &>$1-wait-X.log
wait "${XPID}" &>$1-wait-X.log
echo "stopped"
else
echo -n " failed to kill"
@ -55,4 +55,4 @@ RES=$?
destroy_fake_x "$2"
exit ${RES}
exit "${RES}"

View File

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

View File

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

View File

@ -53,7 +53,6 @@ unsigned int normal_window_mode = 0;
#include "view.h"
ThemeWidget *rofi_configuration = NULL;
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;
}
int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
{
fputs ( msg, stderr );
@ -127,7 +126,6 @@ void rofi_add_error_message ( GString *msg )
static void theme_parser_setup ( void )
{
error = 0;
}
static void theme_parser_teardown ( void )
{
@ -135,7 +133,6 @@ static void theme_parser_teardown ( void )
ck_assert_int_eq ( error, 0);
rofi_theme_free ( rofi_theme );
rofi_theme = NULL;
}
START_TEST (test_core_empty_string )
@ -1097,7 +1094,6 @@ START_TEST ( test_properties_integer)
}
END_TEST
START_TEST ( test_properties_orientation )
{
widget wid;
@ -1238,13 +1234,11 @@ START_TEST ( test_core_properties_error )
g_string_free ( error_msg, TRUE);
error_msg = NULL;
error = 0;
}
END_TEST
START_TEST ( test_import_error )
{
rofi_theme_parse_string("@import \"/non-existing-file.rasi\"");
const char *errstr =
@ -1283,7 +1277,6 @@ START_TEST ( test_prepare_path )
}
END_TEST
START_TEST(test_properties_types_names)
{
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_LIST], "List");
ck_assert_str_eq ( PropertyTypeName[P_ORIENTATION], "Orientation");
}
END_TEST
@ -1464,7 +1456,6 @@ int main ( int argc, char ** argv )
return EXIT_FAILURE;
}
Suite *s;
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+50) == 0 );
TASSERT ( widget_intersect ( wid, -100, -100) == 0);
TASSERT ( widget_intersect ( wid, INT_MIN, INT_MIN) == 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_set_trigger_action_handler ( NULL, NULL, NULL );
g_free(wid);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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