about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--code/keys.rb10
-rw-r--r--data/apps.rb8
-rw-r--r--data/types.rb8
3 files changed, 24 insertions, 2 deletions
diff --git a/code/keys.rb b/code/keys.rb
index d601f9d2..c3d81778 100644
--- a/code/keys.rb
+++ b/code/keys.rb
@@ -348,6 +348,15 @@ module Fm
 				system "du --max-depth=1 -h | less"
 			end
 
+		when 'diff'
+			externally do
+				if !@copy.empty?
+					system "diff #{@copy.first.sh} #{currentfile.sh} | less"
+				else
+					system "diff #{@marked.sh} | less"
+				end
+			end
+
 		when 'tar'
 			externally do
 				system('tar', 'cvvf', 'pack.tar', *selection.map{|x| x.basename})
@@ -611,6 +620,7 @@ module Fm
 			ter ta S e
 			?? ?g ?f ?m ?l ?c ?o ?z ?s
 			o m ` ' go
+			dif
 
 			um
 
diff --git a/data/apps.rb b/data/apps.rb
index e8d5923a..68176d6e 100644
--- a/data/apps.rb
+++ b/data/apps.rb
@@ -43,6 +43,10 @@ module Application
 		end
 	end
 
+	def wine(files)
+		"wine #{files}"
+	end
+
 	def gedit(files)
 		"gedit #{files}"
 	end
@@ -72,6 +76,10 @@ module Application
 		else nil end
 	end
 
+	def gimp(files)
+		"gimp #{files}"
+	end
+
 	def interpreted_language(files)
 		case files.mode
 		when 1; run(files)
diff --git a/data/types.rb b/data/types.rb
index 6efc189c..51a1911c 100644
--- a/data/types.rb
+++ b/data/types.rb
@@ -22,9 +22,13 @@ class Directory::Entry
 
 		## then at the extension
 		case @ext
+		when 'exe'
+			use.wine
 		when 'svg'
 			use.firefox
-		when 'm4v'
+		when 'xcf'
+			use.gimp
+		when 'm4v', 'ogm'
 			use.mplayer
 		end
 
@@ -37,7 +41,7 @@ class Directory::Entry
 			use.mplayer
 
 		when "application/pdf"
-			use.evince
+			use.evince "d"
 
 		when /^image/
 			use.feh