Hyprland dotfiles
| 1 | #!/bin/bash |
| 2 | # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## |
| 3 | # A modified version of Rofi-Theme-Selector, concentrating only on ~/.local and also, applying only 10 @themes in ~/.config/rofi/config.rasi |
| 4 | # as opposed to continous adding of //@theme |
| 5 | |
| 6 | # This code is released in public domain by Dave Davenport <qball@gmpclient.org> |
| 7 | |
| 8 | iDIR="/.config/swaync/images" |
| 9 | |
| 10 | |
| 11 | OS="linux" |
| 12 | |
| 13 | ROFI= |
| 14 | SED= |
| 15 | MKTEMP= |
| 16 | NOTIFY_SEND= |
| 17 | |
| 18 | if [ |
| 19 | then |
| 20 | |
| 21 | |
| 22 | fi |
| 23 | if [ |
| 24 | then |
| 25 | |
| 26 | |
| 27 | fi |
| 28 | if [ |
| 29 | then |
| 30 | |
| 31 | |
| 32 | fi |
| 33 | if [ |
| 34 | then |
| 35 | |
| 36 | fi |
| 37 | |
| 38 | TMP_CONFIG_FILE=.rasi |
| 39 | #rofi_theme_dir="${HOME}/.local/share/rofi/themes" |
| 40 | rofi_config_file="/rofi/config.rasi" |
| 41 | |
| 42 | ## |
| 43 | # Array with parts to the found themes. |
| 44 | # And array with the printable name. |
| 45 | ## |
| 46 | |
| 47 | |
| 48 | |
| 49 | ## |
| 50 | # Function that tries to find all installed rofi themes. |
| 51 | # This fills in #themes array and formats a displayable string #theme_names |
| 52 | ## |
| 53 | # Find themes in defined directories |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | ## |
| 75 | # Function to add or update theme in the config.rasi |
| 76 | ## |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | ## |
| 123 | # Create a copy of rofi config |
| 124 | ## |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | ### |
| 133 | # Print the list out so it can be displayed by rofi. |
| 134 | ## |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | ## |
| 147 | # Thee indicate what entry is selected. |
| 148 | ## |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | ############################################################################################################ |
| 190 | # Actual program execution |
| 191 | ########################################################################################################### |
| 192 | ## |
| 193 | # Find all themes |
| 194 | ## |
| 195 | |
| 196 | |
| 197 | ## |
| 198 | # Do check if there are themes. |
| 199 | ## |
| 200 | if [ |
| 201 | then |
| 202 | |
| 203 | |
| 204 | fi |
| 205 | |
| 206 | ## |
| 207 | # Create copy of config to play with in preview |
| 208 | ## |
| 209 | |
| 210 | |
| 211 | ## |
| 212 | # Show the themes to user. |
| 213 | ## |
| 214 | if && [ |
| 215 | then |
| 216 | # Apply the selected theme |
| 217 | |
| 218 | |
| 219 | # Send notification with the selected theme name |
| 220 | selection="" |
| 221 | if [; then |
| 222 | |
| 223 | fi |
| 224 | fi |
| 225 | |
| 226 | ## |
| 227 | # Remove temp. config. |
| 228 | ## |
| 229 |