]>
Commit | Line | Data |
---|---|---|
1839c1c1 JB |
1 | --- imsettings-1.8.1/data/imsettings-functions.in.orig 2019-02-20 05:57:23.000000000 +0100 |
2 | +++ imsettings-1.8.1/data/imsettings-functions.in 2019-05-20 20:46:25.377483510 +0200 | |
9c9b1f79 JB |
3 | @@ -23,7 +23,7 @@ |
4 | LOGDIR="${XDG_CACHE_HOME:-$HOME/.cache}/imsettings" | |
5 | LOGFILE="$LOGDIR/log" | |
8c5db2e1 JR |
6 | |
7 | -function log_init() { | |
8 | +log_init() { | |
9 | if [ ! -n "$DRY_RUN" ]; then | |
4c331558 JB |
10 | if [ -f $HOME/.imsettings.log ]; then |
11 | mv $HOME/.imsettings.log $LOGFILE.bak | |
9c9b1f79 | 12 | @@ -33,20 +33,20 @@ |
8c5db2e1 JR |
13 | fi |
14 | } | |
15 | ||
16 | -function log() { | |
17 | +log() { | |
4c331558 | 18 | echo "$@" >> $LOGFILE |
8c5db2e1 JR |
19 | } |
20 | ||
21 | -function is_dbus_enabled() { | |
22 | +is_dbus_enabled() { | |
334a45f4 | 23 | @libexecdir[@]/imsettings-check --check-dbus |
8c5db2e1 JR |
24 | [ $? -eq 0 ] |
25 | } | |
26 | ||
27 | -function is_imsettings_enabled() { | |
28 | +is_imsettings_enabled() { | |
29 | [ -z "$DISABLE_IMSETTINGS" ] && is_dbus_enabled | |
30 | } | |
31 | ||
32 | -function check_imsettings_capability() { | |
33 | +check_imsettings_capability() { | |
34 | mod=$1 | |
334a45f4 | 35 | @libexecdir[@]/imsettings-check --check-modules >/dev/null |
8c5db2e1 | 36 | ret=$? |
9c9b1f79 | 37 | @@ -57,7 +57,7 @@ |
8c5db2e1 JR |
38 | return $ret |
39 | } | |
40 | ||
501f6d48 JB |
41 | -function lookup_desktop() { |
42 | +lookup_desktop() { | |
43 | ret=$(cat $1) | |
44 | case $ret in | |
9c9b1f79 JB |
45 | cinnamon*) |
46 | @@ -84,7 +84,7 @@ | |
501f6d48 JB |
47 | esac |
48 | } | |
49 | ||
50 | -function get_desktop() { | |
51 | +get_desktop() { | |
1839c1c1 JB |
52 | if [ -n "$XDG_CURRENT_DESKTOP" ]; then |
53 | GUESS_DESKTOP="\$XDG_CURRENT_DESKTOP" | |
54 | echo "$XDG_CURRENT_DESKTOP" | |
55 | @@ -117,7 +117,7 @@ | |
501f6d48 JB |
56 | fi |
57 | } | |
58 | ||
8c5db2e1 JR |
59 | -function is_gtk_supported() { |
60 | +is_gtk_supported() { | |
61 | [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0 | |
501f6d48 | 62 | case "$(get_desktop|tr '[A-Z]' '[a-z]')" in |
9c9b1f79 | 63 | cinnamon*) |
1839c1c1 | 64 | @@ -152,7 +152,7 @@ |
8c5db2e1 JR |
65 | return 1 |
66 | } | |
67 | ||
68 | -function is_qt_supported() { | |
69 | +is_qt_supported() { | |
70 | [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0 | |
501f6d48 | 71 | case "$(get_desktop|tr '[A-Z]' '[a-z]')" in |
8c5db2e1 | 72 | *) |
1839c1c1 | 73 | @@ -165,7 +165,7 @@ |
8c5db2e1 JR |
74 | return 1 |
75 | } | |
76 | ||
77 | -function is_xim_supported() { | |
78 | +is_xim_supported() { | |
79 | [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0 | |
80 | if check_imsettings_capability xim; then | |
81 | return 0 | |
1839c1c1 | 82 | @@ -174,12 +174,12 @@ |
8c5db2e1 JR |
83 | return 1 |
84 | } | |
85 | ||
1839c1c1 JB |
86 | -function is_desktop_supported() { |
87 | +is_desktop_supported() { | |
88 | @libexecdir[@]/imsettings-check --check-desktop $(get_desktop) >/dev/null | |
89 | [ $? -eq 0 ] | |
90 | } | |
91 | ||
8c5db2e1 JR |
92 | -function setup_gtk_immodule() { |
93 | +setup_gtk_immodule() { | |
94 | if is_imsettings_enabled && is_gtk_supported; then | |
95 | # Ensure GTK_IM_MODULE is empty. otherwise GTK+ doesn't pick up immodule through XSETTINGS | |
96 | unset GTK_IM_MODULE | |
1839c1c1 | 97 | @@ -189,7 +189,7 @@ |
8c5db2e1 JR |
98 | fi |
99 | } | |
100 | ||
101 | -function setup_qt_immodule() { | |
102 | +setup_qt_immodule() { | |
103 | if is_imsettings_enabled && is_qt_supported; then | |
104 | # FIXME: Qt doesn't support XSETTINGS for immodule yet. | |
105 | # We still need to go with the older way. | |
1839c1c1 | 106 | @@ -199,7 +199,7 @@ |
8c5db2e1 JR |
107 | fi |
108 | } | |
109 | ||
110 | -function setup_xim() { | |
111 | +setup_xim() { | |
112 | if is_imsettings_enabled && is_xim_supported; then | |
113 | # setup XMODIFIERS | |
114 | XMODIFIERS="@im=imsettings" | |
1839c1c1 | 115 | @@ -210,7 +210,7 @@ |
8c5db2e1 JR |
116 | fi |
117 | } | |
118 | ||
119 | -function run_imsettings() { | |
120 | +run_imsettings() { | |
121 | print_info | |
122 | if [ -n "$DRY_RUN" ]; then | |
123 | log "*** DRY RUN MODE: running IM through imsettings" | |
1839c1c1 | 124 | @@ -225,7 +225,7 @@ |
8c5db2e1 JR |
125 | fi |
126 | } | |
127 | ||
128 | -function run_xim() { | |
129 | +run_xim() { | |
130 | print_info | |
131 | if [ -n "$DRY_RUN" ]; then | |
132 | log "*** DRY RUN MODE: running IM without imsettings" | |
1839c1c1 | 133 | @@ -238,7 +238,7 @@ |
8c5db2e1 JR |
134 | fi |
135 | } | |
136 | ||
137 | -function print_result() { | |
138 | +print_result() { | |
139 | $1 | |
140 | if [ $? -eq 0 ]; then | |
141 | log yes | |
1839c1c1 | 142 | @@ -247,7 +247,7 @@ |
8c5db2e1 JR |
143 | fi |
144 | } | |
145 | ||
146 | -function print_info() { | |
147 | +print_info() { | |
148 | log "imsettings information" | |
149 | log "==========================" | |
857bdfe0 | 150 | log "XINPUTRC: $READ_XINPUTRC" |
fdc97b72 JR |
151 | --- imsettings-1.5.0/data/xinput.sh.in.in.orig 2012-11-25 18:33:02.248463652 +0100 |
152 | +++ imsettings-1.5.0/data/xinput.sh.in.in 2012-11-25 18:47:20.531779098 +0100 | |
153 | @@ -1,4 +1,4 @@ | |
154 | -#!/bin/bash | |
155 | +#!/bin/sh | |
156 | # Copyright (C) 1999-2004,2007-2011 Red Hat, Inc. All rights reserved. This | |
157 | # copyrighted material is made available to anyone wishing to use, modify, | |
158 | # copy, or redistribute it subject to the terms and conditions of the | |
334a45f4 | 159 | @@ -257,13 +257,13 @@ |
8c5db2e1 JR |
160 | unset TERM |
161 | if [ -r /etc/profile.d/lang.sh ]; then | |
162 | # for Fedora etc | |
163 | - source /etc/profile.d/lang.sh | |
164 | + . /etc/profile.d/lang.sh | |
165 | elif [ -r /etc/default/locale ]; then | |
166 | # for Debian | |
167 | - source /etc/default/locale | |
168 | + . /etc/default/locale | |
169 | elif [ -r /etc/env.d/02locale ]; then | |
170 | # for Gentoo | |
171 | - source /etc/env.d/02locale | |
172 | + . /etc/env.d/02locale | |
173 | fi | |
174 | [ -n "$oldterm" ] && export TERM=$oldterm | |
175 | ||
334a45f4 | 176 | @@ -280,7 +280,7 @@ |
4c331558 | 177 | [ -f "$HOME/.xinputrc.bak" ] && mv $HOME/.xinputrc.bak $CONFIGDIR/xinputrc.bak |
8c5db2e1 JR |
178 | |
179 | if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then | |
180 | - source "$USER_XINPUTRC" | |
181 | + . "$USER_XINPUTRC" | |
857bdfe0 | 182 | READ_XINPUTRC=$USER_XINPUTRC |
8c5db2e1 JR |
183 | if [ ! -h "$USER_XINPUTRC" ]; then |
184 | SHORT_DESC="User Specific" | |
334a45f4 | 185 | @@ -292,7 +292,7 @@ |
8c5db2e1 JR |
186 | _sourced_xinputrc=0 |
187 | for i in $_im_language_list; do | |
188 | if echo $tmplang | grep -q -E "^$i"; then | |
189 | - source "$SYS_XINPUTRC" | |
190 | + . "$SYS_XINPUTRC" | |
857bdfe0 | 191 | READ_XINPUTRC=$SYS_XINPUTRC |
8c5db2e1 JR |
192 | _sourced_xinputrc=1 |
193 | break | |
334a45f4 | 194 | @@ -304,7 +304,7 @@ |
8c5db2e1 JR |
195 | _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU" |
196 | for i in $_xcompose_language_list; do | |
197 | if echo $tmplang | grep -q -E "^$i"; then | |
198 | - source @XINPUT_PATH@/xcompose.conf | |
199 | + . @XINPUT_PATH@/xcompose.conf | |
200 | _sourced_xinputrc=1 | |
201 | break | |
202 | fi | |
334a45f4 | 203 | @@ -312,7 +312,7 @@ |
8c5db2e1 JR |
204 | fi |
205 | if [ $_sourced_xinputrc -eq 0 ]; then | |
206 | # Read none.conf to set up properly for locales not listed the above. | |
207 | - source @XINPUT_PATH@/none.conf | |
208 | + . @XINPUT_PATH@/none.conf | |
209 | fi | |
210 | fi | |
211 | ||
1839c1c1 JB |
212 | --- imsettings-1.8.1/data/xinputinfo.sh.in.orig 2019-02-20 05:32:55.000000000 +0100 |
213 | +++ imsettings-1.8.1/data/xinputinfo.sh.in 2019-05-20 20:47:06.287261883 +0200 | |
8c5db2e1 JR |
214 | @@ -1,4 +1,4 @@ |
215 | -#!/bin/bash | |
216 | +#!/bin/sh | |
217 | # xinputinfo.sh | |
1839c1c1 JB |
218 | # Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved. |
219 | ||
8c5db2e1 | 220 | @@ -20,7 +20,7 @@ |
1839c1c1 JB |
221 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth |
222 | # Floor, Boston, MA 02110-1301 USA | |
8c5db2e1 JR |
223 | |
224 | -function is_script() { | |
225 | +is_script() { | |
226 | if [ "x$(sed -re '/^[ ]?*[a-zA-Z0-9_]+=.*/{d};/[ ]?*#.*/{d}' $1)" = "x" ]; then | |
227 | return 1 | |
228 | else | |
1839c1c1 | 229 | @@ -37,13 +37,13 @@ |
8c5db2e1 JR |
230 | unset TERM |
231 | if [ -r /etc/profile.d/lang.sh ]; then | |
232 | # for Fedora etc | |
233 | - source /etc/profile.d/lang.sh | |
234 | + . /etc/profile.d/lang.sh | |
235 | elif [ -r /etc/default/locale ]; then | |
236 | # for Debian | |
237 | - source /etc/default/locale | |
238 | + . /etc/default/locale | |
239 | elif [ -r /etc/env.d/02locale ]; then | |
240 | # for Gentoo | |
241 | - source /etc/env.d/02locale | |
242 | + . /etc/env.d/02locale | |
243 | fi | |
244 | [ -n "$oldterm" ] && export TERM=$oldterm | |
245 | ||
1839c1c1 JB |
246 | @@ -53,17 +53,17 @@ |
247 | unset AUXILIARY_PROGRAM AUXILIARY_ARGS GTK_IM_MODULE ICON IMSETTINGS_IGNORE_ME LONG_DESC NOT_RUN PREFERENCE_PROGRAM PREFERENCE_ARGS QT_IM_MODULE SHORT_DESC XIM XIM_PROGRAM XIM_ARGS IS_XIM | |
8c5db2e1 JR |
248 | |
249 | if [ $# -gt 0 ]; then | |
250 | - source $1 | |
251 | + . $1 | |
252 | IMSETTINGS_FILENAME=$1 | |
253 | else | |
1839c1c1 JB |
254 | [ -z "${IMSETTINGS_DISABLE_USER_XINPUTRC-}" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no |
255 | [ -z "${IMSETTINGS_DISABLE_SYS_XINPUTRC-}" ] && IMSETTINGS_DISABLE_SYS_XINPUTRC=no | |
8c5db2e1 JR |
256 | |
257 | if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then | |
258 | - source "$USER_XINPUTRC" | |
259 | + . "$USER_XINPUTRC" | |
260 | IMSETTINGS_FILENAME=$USER_XINPUTRC | |
1839c1c1 | 261 | elif [ -r "$SYS_XINPUTRC" -a "x$IMSETTINGS_DISABLE_SYS_XINPUTRC" = "xno" ]; then |
8c5db2e1 JR |
262 | - source "$SYS_XINPUTRC" |
263 | + . "$SYS_XINPUTRC" | |
264 | IMSETTINGS_FILENAME=$SYS_XINPUTRC | |
265 | fi | |
266 | fi | |
fdc97b72 JR |
267 | --- imsettings-1.6.3/data/imsettings-target-checker.sh.in~ 2013-05-27 05:39:15.000000000 +0200 |
268 | +++ imsettings-1.6.3/data/imsettings-target-checker.sh.in 2013-07-15 08:12:17.339869611 +0200 | |
269 | @@ -1,4 +1,4 @@ | |
270 | -#! /bin/bash | |
271 | +#!/bin/sh | |
272 | # imsettings-target-checker.sh | |
273 | # Copyright (C) 2013 Akira TAGOH | |
274 | # |