rofi: Fix patches

+39 -44
+38 -2
pkgs/applications/misc/rofi/config.patch
··· 1 diff --git a/script/rofi-theme-selector b/script/rofi-theme-selector 2 - index 0646e4bc..a19ec706 100755 3 --- a/script/rofi-theme-selector 4 +++ b/script/rofi-theme-selector 5 - @@ -164,7 +164,12 @@ Current theme: <b>${CUR}</b>""" 6 ### 7 function set_theme() 8 {
··· 1 diff --git a/script/rofi-theme-selector b/script/rofi-theme-selector 2 + index 0646e4bc..f827dbfe 100755 3 --- a/script/rofi-theme-selector 4 +++ b/script/rofi-theme-selector 5 + @@ -42,34 +42,7 @@ function find_themes() 6 + DIRS=${XDG_DATA_DIRS} 7 + OLDIFS=${IFS} 8 + IFS=: 9 + - if [ -z "${XDG_DATA_DIRS}" ] 10 + - then 11 + - echo "XDG_DATA_DIRS needs to be set for this script to function correctly." 12 + - echo -n "Using dirs from \$PATH: " 13 + - DIRS= 14 + - # Iterate over items in $PATH 15 + - for p in ${PATH}; do 16 + - # Remove trailing / if exists. 17 + - x=${p%/} 18 + - # remove both /bin and /sbin and /games from end 19 + - x=${x%/bin} 20 + - x=${x%/sbin} 21 + - x=${x%/games} 22 + - # Add /share 23 + - x=${x}/share 24 + - # Check if entry exists Prepend : so :${x}: matches nicely 25 + - case ":${DIRS}" in 26 + - *$x:*);; 27 + - *) DIRS+="$x:";; 28 + - esac 29 + - done 30 + - # Remove trailing : 31 + - DIRS=${DIRS%:} 32 + - echo "${DIRS}" 33 + - fi 34 + - # Add user dir. 35 + - DIRS+=":${HOME}/.local/share/" 36 + - DIRS+=":${HOME}/.config/" 37 + + DIRS+=":%ROFIOUT%/" 38 + for p in ${DIRS}; do 39 + p=${p%/} 40 + TD=${p}/rofi/themes 41 + @@ -164,7 +137,12 @@ Current theme: <b>${CUR}</b>""" 42 ### 43 function set_theme() 44 {
+1 -1
pkgs/applications/misc/rofi/default.nix
··· 13 }; 14 15 # config.patch may be removed in the future - https://github.com/DaveDavenport/rofi/pull/781 16 - patches = [ ./nix.patch ./config.patch ]; 17 18 preConfigure = '' 19 patchShebangs "script"
··· 13 }; 14 15 # config.patch may be removed in the future - https://github.com/DaveDavenport/rofi/pull/781 16 + patches = [ ./config.patch ]; 17 18 preConfigure = '' 19 patchShebangs "script"
-41
pkgs/applications/misc/rofi/nix.patch
··· 1 - diff --git a/script/rofi-theme-selector b/script/rofi-theme-selector 2 - index 0646e4bc..f82e5ad9 100755 3 - --- a/script/rofi-theme-selector 4 - +++ b/script/rofi-theme-selector 5 - @@ -42,34 +42,8 @@ function find_themes() 6 - DIRS=${XDG_DATA_DIRS} 7 - OLDIFS=${IFS} 8 - IFS=: 9 - - if [ -z "${XDG_DATA_DIRS}" ] 10 - - then 11 - - echo "XDG_DATA_DIRS needs to be set for this script to function correctly." 12 - - echo -n "Using dirs from \$PATH: " 13 - - DIRS= 14 - - # Iterate over items in $PATH 15 - - for p in ${PATH}; do 16 - - # Remove trailing / if exists. 17 - - x=${p%/} 18 - - # remove both /bin and /sbin and /games from end 19 - - x=${x%/bin} 20 - - x=${x%/sbin} 21 - - x=${x%/games} 22 - - # Add /share 23 - - x=${x}/share 24 - - # Check if entry exists Prepend : so :${x}: matches nicely 25 - - case ":${DIRS}" in 26 - - *$x:*);; 27 - - *) DIRS+="$x:";; 28 - - esac 29 - - done 30 - - # Remove trailing : 31 - - DIRS=${DIRS%:} 32 - - echo "${DIRS}" 33 - - fi 34 - - # Add user dir. 35 - - DIRS+=":${HOME}/.local/share/" 36 - - DIRS+=":${HOME}/.config/" 37 - + 38 - + DIRS+=":%ROFIOUT%/" 39 - for p in ${DIRS}; do 40 - p=${p%/} 41 - TD=${p}/rofi/themes
···