From 930e4e82079b01f335a2007820762b55ebaa97a3 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 8 Sep 2022 17:43:25 +0900 Subject: [PATCH] - Add Open RecycleBin - Add Open Desktop - Add Open My Computer --- Flow.Launcher/MainWindow.xaml.cs | 2 +- .../Images/desktop.png | Bin 0 -> 1087 bytes .../Images/mycomputer.png | Bin 0 -> 1005 bytes .../Languages/en.xaml | 14 +++-- .../Languages/ko.xaml | 14 +++-- Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 51 ++++++++++++++++++ 6 files changed, 71 insertions(+), 10 deletions(-) create mode 100644 Plugins/Flow.Launcher.Plugin.Sys/Images/desktop.png create mode 100644 Plugins/Flow.Launcher.Plugin.Sys/Images/mycomputer.png diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 2b7db38cf..97b176ed4 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -556,4 +556,4 @@ namespace Flow.Launcher } } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Images/desktop.png b/Plugins/Flow.Launcher.Plugin.Sys/Images/desktop.png new file mode 100644 index 0000000000000000000000000000000000000000..cec17d34535cdca3ed9e1ed2d577d2536d98b629 GIT binary patch literal 1087 zcmV-F1i<@=P)2nZlX z!V(979Eqdg(1GRDfsKXD&KAM+^i;q1fmjDqlC|^jdcMEwuj=vuee}^sADawH-FW8Z2o6w5>a9$F_jhWY&rcv(Q}cg=vBTX+DNjCJ!s4TN{a0L?KJq8%x$17R7_ zfhd{W#)z_I{X8!0u$;p+=y8&ky9IOs^xmKp>1d%x3lx?_@7T3UeU`J{&+HSH{; z1)!Fzo+;n}JQUyn2Uc2AfVGFTlHCgcX_=^%3@{Zou)s~WQVedb zHL6Tz;99928v@`Mc&Z}-PVuf=#C&^=pYQgtQ<);Zsd4n-3~Druv`%(s9+8dCO6gYG z0@H$7C>Aj^gY?|O1Hh!xAexJn=guy%;#FeBGrMq*6$lYa3$XCqj1Vb-&Mw?S7It4z z%uy==u85Tc*s+-bO}M%sdEynRVTo7L!J%9G}yJhWsRs2!GV*(x%@EOgA zm%m})!|xq3=-6W&yh#9u0PynLgYqXG106s;hw*rijzMCquEd~lg}R0@=`lrLg!@<5 ze}KVvmIx?=0Q3Q}7vOyj+(35$v=hJ`kFcJQ_%{iF%*HAKJ?9ng#ftYDIA@}qQ@~M} z6%=7p2F6Q;y)A$_15htkJ!L^a_7U8-5Rnk0pfx-}+ygliT$kYrh=odn0gup43k5+W zGvPo-VJ+KG0;*=AZ6P5bX90RH!bxj6MO^iKCt&3~axwF7tf&EIU@+cK;Lw?9S%@&s zSFIyDkDLc`CVru+pdw&Q84Xw2>ph!d&hsR*5J6MHij@{^v;cMmu;Q65AZ<{CS@oir zq3dCyeJ1F}9^e&oqlTv~r2HR6*qW$;*ETWJKHJ6IR?xOk0+$v-(TT|R`~=R0b;j=F z3(4R@gy5Mipsf1!4{hs zO8>`B#J-4$o%l*07v!qji3yL0%>REhHi>u~6)~&0}=345!oQXdemhi%{Zh;d=ic zXn3fx6T=*(1*|RTTDz>;sa?1vZDTSqPe8Je1Fs4?0~Wik5aDJ7SqLT2a`p3pZh?Tb zaZkZ}EAJkoAy!>lNkCiRiIr~(Kzwg%krv+R_tNX`CYIp~aJTn!{yMQ(K(vrNeNMp_ z*^uxJaI+I3*35;RuY2 z#b3}+&P~BXzN^02=S+0uqi!6J9zSX3{L9JbP5v>KE~x*a{v1nC`88biIK8B-RTcKHZSx=Z5dvV~;)d b_=oWa-~E + - + Command Description @@ -16,6 +17,9 @@ Tweak this app Put computer to sleep Empty recycle bin + Open recycle bin + Open my computer + Desktop Hibernate computer Save all Flow Launcher settings Refreshes plugin data with new content @@ -24,7 +28,7 @@ Visit Flow Launcher's documentation for more help and how to use tips Open the location where Flow Launcher's settings are stored - + Success All Flow Launcher settings saved Reloaded all applicable plugin data diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml index 3442b180a..601835612 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml +++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml @@ -1,7 +1,10 @@ - - + + - + 명령어 설명 @@ -15,6 +18,9 @@ 이 프로그램을 조정합니다 PC를 절전모드로 전환 휴지통 비우기 + 휴지통 열기 + 내 컴퓨터 + 바탕 화면 최대 절전 모드 Flow Launcher 설정 저장 플러그인 데이터를 새 콘텐츠와 함께 다시 로드 @@ -23,7 +29,7 @@ Flow Launcher의 도움말 및 사용안내 Flow Launcher의 설정이 저장된 위치 열기 - + 성공 모든 Flow Launcher 설정을 저장했습니다 적용 가능한 모든 플러그인 데이터를 다시 로드했습니다 diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index 808f8ef19..d05cbdfbf 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -192,6 +192,42 @@ namespace Flow.Launcher.Plugin.Sys } }, new Result + { + Title = "My Computer", + SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openmycomputer"), + IcoPath = "Images\\mycomputer.png", + Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe7f4"), + Action = c => + { + // http://www.pinvoke.net/default.aspx/shell32/SHEmptyRecycleBin.html + // FYI, couldn't find documentation for this but if the recycle bin is already empty, it will return -2147418113 (0x8000FFFF (E_UNEXPECTED)) + // 0 for nothing + { + System.Diagnostics.Process.Start("explorer.exe", "shell:mycomputerfolder"); + } + + return true; + } + }, + new Result + { + Title = "Desktop", + SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openmydesktop"), + IcoPath = "Images\\desktop.png", + Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe7fb"), + Action = c => + { + // http://www.pinvoke.net/default.aspx/shell32/SHEmptyRecycleBin.html + // FYI, couldn't find documentation for this but if the recycle bin is already empty, it will return -2147418113 (0x8000FFFF (E_UNEXPECTED)) + // 0 for nothing + { + System.Diagnostics.Process.Start("explorer.exe", "shell:desktop"); + } + + return true; + } + }, + new Result { Title = "Empty Recycle Bin", SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_emptyrecyclebin"), @@ -215,6 +251,21 @@ namespace Flow.Launcher.Plugin.Sys } }, new Result + { + Title = "Open Recycle Bin", + SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin"), + IcoPath = "Images\\recyclebin.png", + Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"), + Action = c => + { + { + System.Diagnostics.Process.Start("explorer.exe", "shell:RecycleBinFolder"); + } + + return true; + } + }, + new Result { Title = "Exit", SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_exit"),