sway: add wmrctl

This commit is contained in:
Marco Thomas
2022-08-12 15:27:00 +02:00
parent 4ec8d449ef
commit aed265a147
4 changed files with 30 additions and 13 deletions

View File

@@ -16,13 +16,13 @@ SFMono also provides icons.
+ `wob` (progress bar)
+ `wofi` (launcher)
+ `slurp`, `grim`, `swappy` (screenshot)
+ [`wmrctl`](https://git.sr.ht/~brocellous/wlrctl) (window switcher)
### other (used in scripts)
+ `fzf` (used in many places)
+ `ripgrep`
+ `ripgrep-all` (used in grep scripts)
+ `fd` (rust find; used in scripts)
+ `fu` (find icons; not needed)
+ all `fcitx5` stuff (data, gtk, qt, mozc)
### theming stuff

View File

@@ -2,6 +2,9 @@
-- Treesitter with `:TSUpdate`
-- LSP with `:LSPInstall`, log with `:LSPInfo`
-- Don't load this in plugins.lua
vim.cmd("set termguicolors")
require 'plugins' -- Load plugins
require 'settings' -- General settings
require 'mappings' -- Keyboard mappings

View File

@@ -17,7 +17,6 @@ return require('packer').startup(function(use)
use({
'sainnhe/everforest',
config = function()
vim.cmd("set termguicolors")
vim.cmd("set background=light")
vim.cmd("let g:everforest_background = 'hard'")
vim.cmd("colorscheme everforest")

View File

@@ -95,17 +95,32 @@ input type:keyboard {
bindsym $mod+Shift+Backspace kill
# wofi
set $files fd -I "\.pdf$" $HOME | cut -f 4- -d "/"
set $lock_screen \
printf "/home/marc/.local/bin/lock.sh\nsystemctl suspend\nswaymsg reload\nshutdown now\nloginctl terminate-user marc"
bindsym $mod+d exec wofi --show drun -p 'Open application'
bindsym $mod+Shift+d exec wofi --show run -p 'dmenu'
bindsym $mod+p exec $files \
| wofi -d -p 'Search pdfs' -W 70% \
| xargs -d '\n' -r xdg-open
bindsym $mod+Ctrl+Backspace exec $lock_screen \
| wofi -d -p "Power" -L 6 \
| xargs -d '\n' -r /bin/bash -c
# show normal applications
bindsym $mod+d exec wofi --show drun -p 'Open application'
# show binaries in PATH
bindsym $mod+Shift+d exec wofi --show run -p 'dmenu'
# show all pdfs in HOME
bindsym $mod+p exec \
fd -I "\.pdf$" $HOME \
| cut -f 4- -d "/" \
| wofi -d -p 'Search pdfs' -W 70% \
| xargs -d '\n' -r xdg-open
# show shutdown menu
bindsym $mod+Ctrl+Backspace exec \
printf "/home/marc/.local/bin/lock.sh\nsystemctl suspend\nswaymsg reload\nshutdown now\nloginctl terminate-user marc" \
| wofi -d -p "Power" -L 6 \
| xargs -d '\n' -r /bin/bash -c
# switch windows
bindsym $mod+w exec \
wlrctl window list \
| awk '{print $1}' \
| sed 's/://' \
| wofi --dmenu \
| xargs -r wlrctl window focus
# Screenshot
bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy