├── .gitignore ├── Workflow ├── icon.png ├── Manage hidden files.alfredworkflow └── info.plist └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /Workflow/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tag/manage-hidden-files/master/Workflow/icon.png -------------------------------------------------------------------------------- /Workflow/Manage hidden files.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tag/manage-hidden-files/master/Workflow/Manage hidden files.alfredworkflow -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Manage hidden files for Alfred 2/3 2 | =================== 3 | 4 | This workflow permit to toggle the visiblity of hidden files in Finder in macOS (10.8 and higher). 5 | 6 | It works with Alfred 2/3 and the Powerpack. 7 | 8 | For more information about Alfred please visit the [official site](http://www.alfredapp.com/) 9 | 10 | 11 | Features 12 | ======== 13 | 14 | + Simply show/hide hidden files on macOS 15 | + View the current status diectly in Alfred (see figure for more information) 16 | + Automatically restart Finder after a command is given 17 | + Uses Notification Center to inform user of the outcome of the operation 18 | + Configurable directly in Alfred prefs 19 | + Simple hotkey to show/hide hidden files directly from keyboard 20 | 21 | 22 | Usage 23 | ===== 24 | 25 | How to use workflow: 26 | 27 | 1. Install workflow in Alfred 28 | 2. Type "hidden" 29 | 3. Now you have to simply type this: 30 | + "true" or "t" for hide hidden files 31 | + "false" or "f" for show hidden files 32 | + or you can type nothing for toggle the visibility of hidden files 33 | 4. Enjoy! :) 34 | 35 | Otherwise you can simply use this simple hotkey: 36 | - Cmd + Shift + H: hide hidden files 37 | - Cmd + Shift + S: show hidden files 38 | 39 | 40 | Screenshots 41 | =========== 42 | 43 | **Toggle the visibility of hidden files** 44 | 45 | ![screen1](http://www.bubidevs.net/uploads/github/images/alfred-hiddenfiles/alfred_hiddenfiles_1.png) 46 | 47 | **Show hidden files (in subtitle you can see actual state of hidden files)** 48 | 49 | ![screen2](http://www.bubidevs.net/uploads/github/images/alfred-hiddenfiles/alfred_hiddenfiles_2.png) 50 | 51 | **Hide hidden files** 52 | 53 | ![screen3](http://www.bubidevs.net/uploads/github/images/alfred-hiddenfiles/alfred_hiddenfiles_3.png) 54 | 55 | **Prevent errors** 56 | 57 | ![screen4](http://www.bubidevs.net/uploads/github/images/alfred-hiddenfiles/alfred_hiddenfiles_4.png) 58 | 59 | 60 | Changelog 61 | ========= 62 | 63 | **Version 2** 64 | + Added macOS (now only 10.8 and higher compatible) 65 | + Updated icon 66 | 67 | **Version 1.5** 68 | 69 | + Added OS X Yosemite compatibility 70 | + Fixed wrong status with Mavericks and Yosemite 71 | 72 | **Version 1.4** 73 | 74 | + Added OS X Mavericks compatibility 75 | 76 | **Version 1.3** 77 | 78 | + Now is possible to simply type 'Hidden' to change visibility of hidden files 79 | + Script is now in external file 80 | 81 | **Version 1.2** 82 | 83 | + Added pre OSX 10.8 support 84 | + Added hotkeys 85 | 86 | **Version 1.1** 87 | 88 | Changed true/false for a more natural usage 89 | 90 | **Version 1.0** 91 | 92 | First working version! :) 93 | -------------------------------------------------------------------------------- /Workflow/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleid 6 | net.bubidevs.alfred.hiddenfiles 7 | connections 8 | 9 | 16039760-F173-4AB8-9C73-DA7401D5DE23 10 | 11 | 12 | destinationuid 13 | 8BC60E22-ED6E-4A16-8909-D160C7E69A50 14 | modifiers 15 | 0 16 | modifiersubtext 17 | 18 | 19 | 20 | 1F455EA3-4EEF-4751-BB74-C3D3EE09C979 21 | 22 | 23 | destinationuid 24 | 16039760-F173-4AB8-9C73-DA7401D5DE23 25 | modifiers 26 | 0 27 | modifiersubtext 28 | 29 | 30 | 31 | 4654DBD6-6E90-4DED-8CB3-BAB4466B6973 32 | 33 | 34 | destinationuid 35 | 16039760-F173-4AB8-9C73-DA7401D5DE23 36 | modifiers 37 | 0 38 | modifiersubtext 39 | 40 | 41 | 42 | 4A15B392-8832-49AA-8D07-1EEEA4F9F049 43 | 44 | 45 | destinationuid 46 | 16039760-F173-4AB8-9C73-DA7401D5DE23 47 | modifiers 48 | 0 49 | modifiersubtext 50 | 51 | 52 | 53 | 54 | createdby 55 | Andrea Busi 56 | description 57 | Reveal hidden Finder items. 58 | disabled 59 | 60 | name 61 | Manage hidden files 62 | objects 63 | 64 | 65 | config 66 | 67 | argumenttype 68 | 1 69 | escaping 70 | 63 71 | keyword 72 | hidden 73 | script 74 | #!/bin/sh 75 | 76 | #check the version of osx 77 | VERSION=$(sw_vers -productVersion) 78 | OSX=${VERSION:0:4} 79 | 80 | #check the current value and display the result as subtitle 81 | if [ "$OSX" = "10.8" || "$OSX" = "10.9" || "$OSX" = "10.10" ]; then 82 | CURVALUE=$(defaults read com.apple.finder AppleShowAllFiles -bool) 83 | else 84 | CURVALUE=$(defaults read com.apple.Finder AppleShowAllFiles -bool) 85 | fi 86 | 87 | if [ $CURVALUE = 0 ]; then 88 | subtitle="Current status: hidden" 89 | else 90 | subtitle="Current status: visible" 91 | fi 92 | 93 | #check the input and display the relative title 94 | PAR={query} 95 | if [ -z $PAR ]; then 96 | title="Toggle visibility of hidden files" 97 | elif [ $PAR = "f" ] || [ $PAR = "false" ]; then 98 | title="Show hidden files" 99 | elif [ $PAR = "t" ] || [ $PAR = "true" ]; then 100 | title="Hide hidden files" 101 | else 102 | title="Parameter not correct" 103 | fi 104 | 105 | echo '<?xml version="1.0"?><items>' 106 | echo "<item arg=\"{query}\" uid=\"ssid\" valid=\"yes\">" 107 | echo "<title>$title</title>" 108 | echo "<subtitle>$subtitle</subtitle>" 109 | echo "<icon>icon.png</icon></item></items>" 110 | echo "</items>" 111 | title 112 | Show/Hide hidden files 113 | type 114 | 0 115 | withspace 116 | 117 | 118 | type 119 | alfred.workflow.input.scriptfilter 120 | uid 121 | 4A15B392-8832-49AA-8D07-1EEEA4F9F049 122 | version 123 | 0 124 | 125 | 126 | config 127 | 128 | escaping 129 | 63 130 | script 131 | sh ./scripts/hiddenfiles.sh {query} 132 | type 133 | 0 134 | 135 | type 136 | alfred.workflow.action.script 137 | uid 138 | 16039760-F173-4AB8-9C73-DA7401D5DE23 139 | version 140 | 0 141 | 142 | 143 | config 144 | 145 | lastpathcomponent 146 | 147 | onlyshowifquerypopulated 148 | 149 | output 150 | 0 151 | removeextension 152 | 153 | sticky 154 | 155 | text 156 | {query} 157 | title 158 | Manage hidden files 159 | 160 | type 161 | alfred.workflow.output.notification 162 | uid 163 | 8BC60E22-ED6E-4A16-8909-D160C7E69A50 164 | version 165 | 0 166 | 167 | 168 | config 169 | 170 | action 171 | 0 172 | argument 173 | 3 174 | argumenttext 175 | true 176 | hotkey 177 | 0 178 | hotmod 179 | 0 180 | leftcursor 181 | 182 | modsmode 183 | 0 184 | relatedAppsMode 185 | 0 186 | 187 | type 188 | alfred.workflow.trigger.hotkey 189 | uid 190 | 1F455EA3-4EEF-4751-BB74-C3D3EE09C979 191 | version 192 | 1 193 | 194 | 195 | config 196 | 197 | action 198 | 0 199 | argument 200 | 3 201 | argumenttext 202 | false 203 | hotkey 204 | 0 205 | hotmod 206 | 0 207 | leftcursor 208 | 209 | modsmode 210 | 0 211 | relatedAppsMode 212 | 0 213 | 214 | type 215 | alfred.workflow.trigger.hotkey 216 | uid 217 | 4654DBD6-6E90-4DED-8CB3-BAB4466B6973 218 | version 219 | 1 220 | 221 | 222 | readme 223 | Usage 224 | ===== 225 | How to use workflow: 226 | 227 | 1. Install workflow in Alfred 228 | 2. Type "hidden" 229 | 3. Now you have to simply type this: 230 | + "true" or "t" for hide hidden files 231 | + "false" or "f" for show hidden files 232 | 4. Enjoy! :) 233 | 234 | Otherwise you can simply use this simple hotkey: 235 | 236 | + Cmd + Shift + H: hide hidden files 237 | + Cmd + Shift + S: show hidden files 238 | 239 | Changelog 240 | ========= 241 | 242 | **Version 1.5** 243 | 244 | + Added OS X Yosemite compatibility 245 | + Fixed wrong status with OS X > 10.8 246 | 247 | **Version 1.4** 248 | 249 | + Added OS X Mavericks compatibility 250 | 251 | **Version 1.3** 252 | 253 | + Now is possible to simply type 'Hidden' to change visibility of hidden files 254 | + Script is now in external file 255 | 256 | 257 | **Version 1.2** 258 | 259 | + Added pre OSX 10.8 support 260 | + Added hotkeys 261 | 262 | 263 | **Version 1.1** 264 | 265 | Changed true/false for a more natural usage 266 | 267 | 268 | **Version 1.0** 269 | 270 | First working version! :) 271 | uidata 272 | 273 | 16039760-F173-4AB8-9C73-DA7401D5DE23 274 | 275 | ypos 276 | 210 277 | 278 | 1F455EA3-4EEF-4751-BB74-C3D3EE09C979 279 | 280 | ypos 281 | 300 282 | 283 | 4654DBD6-6E90-4DED-8CB3-BAB4466B6973 284 | 285 | ypos 286 | 440 287 | 288 | 4A15B392-8832-49AA-8D07-1EEEA4F9F049 289 | 290 | ypos 291 | 10 292 | 293 | 8BC60E22-ED6E-4A16-8909-D160C7E69A50 294 | 295 | ypos 296 | 210 297 | 298 | 299 | webaddress 300 | www.bubidevs.net 301 | 302 | 303 | --------------------------------------------------------------------------------