Skip to content

Commit

Permalink
Prepped for 2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Oct 1, 2017
1 parent 46075e5 commit 05e9363
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 27 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Sloth is a GUI built on top of the powerful `lsof` command line tool. The output

## Download

* [Download Sloth 1.9](http://sveinbjorn.org/files/software/sloth.zip) (~0.5 MB, Intel 64-bit only)
* [Download Sloth 2.0](http://sveinbjorn.org/files/software/sloth.zip) (~0.5 MB, Intel 64-bit only)

## Requirements

Expand All @@ -19,10 +19,16 @@ Sloth is a GUI built on top of the powerful `lsof` command line tool. The output

<img src="resources/sloth_screenshot2.jpg" align="center">

<img src="resources/sloth_screenshot1.png" align="center">
<img src="resources/sloth_screenshot1.jpg" align="center">

## Version history

### 01/10/2017 - Version 2.0

* New Volumes filter
* New "Sort By" submenu under View in main menu
* Sorting by PID now correctly does numerical sort instead of alphabetic

### 07/06/2017- Version 1.9

* Files can now be dragged and dropped
Expand Down
7 changes: 1 addition & 6 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

TODO list for Sloth 2.0

DONE * Add Volumes filter
DONE * Menu items for sorting
DONE * Sorting by PID now does numerical sorting instead of alphabetic

TODO list for Sloth 2.1

* Track files that are dragged, show red when no file exists at path, or at least when selected/Get Info
4 changes: 2 additions & 2 deletions resources/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ DQ
<binding destination="560" name="value" keyPath="values.showApplicationsOnly" id="kNZ-Wh-Rrx"/>
</connections>
</button>
<searchField toolTip="Search Filter" wantsLayer="YES" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" id="252">
<searchField toolTip="Search Filter (supports regular expressions)" wantsLayer="YES" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" id="252">
<rect key="frame" x="633" y="519" width="151" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" placeholderString="Search Filter" bezelStyle="round" id="735">
Expand Down Expand Up @@ -652,7 +652,7 @@ DQ
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="BIo-8i-OHA">
<rect key="frame" x="1" y="0.0" width="762" height="422"/>
<autoresizingMask key="autoresizingMask"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" multipleSelection="NO" autosaveColumns="NO" enabled="NO" rowSizeStyle="automatic" headerView="Hfh-Ob-0SO" viewBased="YES" indentationPerLevel="16" autoresizesOutlineColumn="YES" outlineTableColumn="qs5-X3-KJv" id="OT1-kV-cHW">
<rect key="frame" x="0.0" y="0.0" width="762" height="399"/>
Expand Down
Binary file added resources/sloth_screenshot1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/sloth_screenshot1.png
Binary file not shown.
Binary file modified resources/sloth_screenshot2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions source/SlothController.m
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}
[window makeKeyAndOrderFront:self];

//[self updateSorting];

[self performSelector:@selector(refresh:) withObject:self afterDelay:0.05];
}

Expand Down Expand Up @@ -292,7 +294,12 @@ - (NSMutableArray *)filterContent:(NSMutableArray *)unfilteredContent numberOfMa
BOOL showApplicationsOnly = [DEFAULTS boolForKey:@"showApplicationsOnly"];
BOOL showHomeFolderOnly = [DEFAULTS boolForKey:@"showHomeFolderOnly"];

NSString *volumesFilter = [[volumesPopupButton selectedItem] toolTip];
// Volumes filter
NSString *volumesFilter = nil;
BOOL hasVolumesFilter = ([[[volumesPopupButton selectedItem] title] isEqualToString:@"All"] == NO);
if (hasVolumesFilter) {
volumesFilter = [[volumesPopupButton selectedItem] toolTip];
}

// User home dir path prefix
NSString *homeDirPath = [NSString stringWithFormat:@"/Users/%@", NSUserName()];
Expand Down Expand Up @@ -320,10 +327,10 @@ - (NSMutableArray *)filterContent:(NSMutableArray *)unfilteredContent numberOfMa

BOOL showAllProcessTypes = !showApplicationsOnly;
BOOL showAllFileTypes = (showRegularFiles && showDirectories && showIPSockets && showUnixSockets
&& showCharDevices && showPipes && !showHomeFolderOnly && ([volumesFilter isEqualToString:@""] || !volumesFilter));
&& showCharDevices && showPipes && !showHomeFolderOnly);

// If there is no filter, just return unfiltered content
if (showAllFileTypes && showAllProcessTypes && !hasRegexFilter) {
if (showAllFileTypes && showAllProcessTypes && !hasRegexFilter && !hasVolumesFilter) {
*matchingFilesCount = self.totalFileCount;
return unfilteredContent;
}
Expand Down Expand Up @@ -394,7 +401,6 @@ - (NSMutableArray *)filterContent:(NSMutableArray *)unfilteredContent numberOfMa
- (IBAction)refresh:(id)sender {

isRefreshing = YES;
[self updateSorting];
[numItemsTextField setStringValue:@""];

// Disable controls
Expand Down
42 changes: 29 additions & 13 deletions sparkle/SlothAppcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
<description>Most recent release list for Sloth, with links to signed updates.</description>
<language>en</language>

<item>
<title>Version 2.0</title>
<pubDate>Sun, 1 Oct 2017 18:45:00 +0000</pubDate>
<enclosure url="http://sveinbjorn.org/files/software/sloth/sloth-2.0.zip" sparkle:version="61" sparkle:shortVersionString="2.0" length="431752" type="application/octet-stream" sparkle:dsaSignature="MEQCIEQtl3kDINH2iZeMtzwsOugBr+SdByIgAEXF855lwiPeAiAuwJkJcpbkQCTO
r1u+/PH4i1Awu5lcxs99aTDvU0FI7g=="/>
<sparkle:minimumSystemVersion>10.8.0</sparkle:minimumSystemVersion>
<description><![CDATA[
<h2>New in Version 2.0:</h2>
<ul>
<li>Added Volumes filter</li>
<li>New "Sort By" submenu under View in main menu</li>
<li>Sorting by PID now correctly does numerical sort instead of alphabetic</li>
</ul>
]]></description>
</item>

<item>
<title>Version 1.9</title>
<pubDate>Wed, 7 Jun 2017 11:45:00 +0000</pubDate>
Expand All @@ -15,14 +31,14 @@
<description><![CDATA[
<h2>Version 1.9 Changes</h2>
<ul>
<li>Files can now be dragged and dropped</li>
<li>Cmd-F now focuses on filter field</li>
<li>File representations can now be copied to the clipboard</li>
<li>Cmd-double-click now reveals file in Finder</li>
<li>Fixed various minor user interface bugs</li>
<li>Fixed collapse all bug with Get Info window open</li>
<li>New compact interface size option</li>
<li>Fixed broken permissions display for non-bundle processes in Info window</li>
<li>Files can now be dragged and dropped</li>
<li>Cmd-F now focuses on filter field</li>
<li>File representations can now be copied to the clipboard</li>
<li>Cmd-double-click now reveals file in Finder</li>
<li>Fixed various minor user interface bugs</li>
<li>Fixed collapse all bug with Get Info window open</li>
<li>New compact interface size option</li>
<li>Fixed broken permissions display for non-bundle processes in Info window</li>
</ul>
]]></description>
</item>
Expand All @@ -35,9 +51,9 @@
<description><![CDATA[
<h2>Version 1.8 Changes</h2>
<ul>
<li>Sloth is now code-signed</li>
<li>QuickLook now works from Get Info panel</li>
<li>Minor user interface improvements</li>
<li>Sloth is now code-signed</li>
<li>QuickLook now works from Get Info panel</li>
<li>Minor user interface improvements</li>
</ul>
]]></description>
</item>
Expand All @@ -50,8 +66,8 @@
<description><![CDATA[
<h2>Version 1.7 Changes</h2>
<ul>
<li>New Info Panel for items</li>
<li>Minor UI changes</li>
<li>New Info Panel for items</li>
<li>Minor UI changes</li>
</ul>
]]></description>
</item>
Expand Down

0 comments on commit 05e9363

Please sign in to comment.