From fd39425cb1b216dd177f559fd27507591003cfae Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 20 May 2022 15:09:34 +0800 Subject: [PATCH] feat: super + o for openning note --- gui/awesome.sh | 9 +++++---- gui/awesome/rc.lua | 8 ++++++-- gui/rofi/config.rasi | 8 +++++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gui/awesome.sh b/gui/awesome.sh index f4f1aa5..8419d59 100755 --- a/gui/awesome.sh +++ b/gui/awesome.sh @@ -34,15 +34,16 @@ export VIM_MODE=enhanced export XDG_RUNTIME_DIR=/tmp/runtime-klesh mkdir -p $XDG_RUNTIME_DIR -export LOCKER='i3lock -i /home/klesh/Nextcloud/wallpapers/1027.png -t --nofork' +export LOCKER='/usr/bin/i3lock -i /home/klesh/Nextcloud/wallpapers/1027.png -t --nofork' autorandr --change --force mpd picomdaemon -# power save -xset 600 -xss-lock $(command -v lock.sh) & +# disable screen saver / turn off monitor if inactived for 300 secs +xset s off +xset dpms 300 300 300 +xss-lock -l $(command -v lock.sh) & exec dbus-run-session -- awesome 2> /tmp/awesome.log EOT diff --git a/gui/awesome/rc.lua b/gui/awesome/rc.lua index 7040bec..7caa74e 100644 --- a/gui/awesome/rc.lua +++ b/gui/awesome/rc.lua @@ -542,8 +542,12 @@ clientkeys = gears.table.join( {description = "toggle floating", group = "client"}), awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, {description = "move to master", group = "client"}), - awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, - {description = "move to screen", group = "client"}), + --awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + --{description = "move to screen", group = "client"}), + awful.key({ modkey, }, "o", function (c) + awful.spawn.with_shell("find ~/Nextcloud/notes/ | rofi -dmenu -title notes | xargs xdg-open") + end, + {description = "open note", group = "hotkeys"}), --awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, --{description = "toggle keep on top", group = "client"}), awful.key({ modkey, }, "n", diff --git a/gui/rofi/config.rasi b/gui/rofi/config.rasi index 970aab7..e3c02d7 100644 --- a/gui/rofi/config.rasi +++ b/gui/rofi/config.rasi @@ -1,5 +1,5 @@ configuration{ - combi-modi: "drun,run,window"; + combi-modi: "drun,run,window,filebrowser"; modi: "drun,run,window"; lines: 5; font: "monospace 14"; @@ -15,6 +15,12 @@ configuration{ display-window: " 﩯 window"; display-Network: " 󰤨 Network"; sidebar-mode: true; + matching: "fuzzy"; + + filebrowser { + sorting-method: "name"; + directories-first: true; + } } @theme "catppuccin"