added nvim, swaylock config; updated river config

This commit is contained in:
Alexey 2025-06-23 18:46:36 +03:00
commit 09a12619c0
4 changed files with 133 additions and 9 deletions

View file

@ -16,8 +16,8 @@ end
-- All the setting tables ──────────────────────────────────────────────────────
local wallpapers = {
primary = '~/Pictures/wallpaper/1772658.jpg',
secondary = '~/Pictures/wallpaper/83D9B0BF750C2763F9126AAAEF23F3DB3D3A6328-3688606028.png'
primary = '~/Pictures/wallpaper/leafeon.jpg',
secondary = '~/Pictures/wallpaper/phoenix.png'
}
local monitors = {
@ -50,6 +50,16 @@ local startup_commands = {
string.format("swaybg -o %s -i %s -o %s -i %s",
monitors.main, wallpapers.primary,
monitors.external, wallpapers.secondary)
},
-- Fetch mail
{
'fetchmail',
'-d', '600'
},
-- Update notmuch database
{
'notmuch',
'new'
}
}
@ -117,17 +127,29 @@ local mappings = {
key = 'Escape',
command = { 'spawn', [['wofi --show drun']] }
},
-- Screenshot
-- Region screenshot
{
mod = { 'Super', 'Shift' },
key = 'S',
command = { 'spawn', [['slurp | grim -g - - | wl-copy']] }
},
-- Output screenshot
{
mod = 'None',
key = 'Print',
command = { 'spawn', [['slurp -o | grim -g - - | wl-copy']] }
},
-- Screen locker
{
mod = 'Super',
key = 'O',
command = { 'spawn', [['waylock -init-color 0x352e2c -input-color 0x575e7a -fail-color 0x833b18']] }
command = { 'spawn', [['swaylock -i ']] .. wallpapers.primary }
},
-- Prompt wifi ssid and attempt to connect
{
mod = { 'Super', 'Alt' },
key = 'C',
command = { 'spawn', [['gui-prompt | fish -c wlan-connect']]}
},
-- Close view
{
@ -250,7 +272,7 @@ local mappings = {
{
mod = 'None',
key = 'XF86AudioNext',
command = { 'spawn', [['mpc next && mpc toggle']] }
command = { 'spawn', [['mpc next']] }
},
{
mod = 'None',
@ -302,6 +324,18 @@ local function tag_mappings()
os.execute(string.format('riverctl map normal Super+Shift 0 set-view-tags %s', all_tags))
end
-- Window rules
local window_rules = {
{
app_id = "gui-prompt",
rule = "float"
},
{
app_id = "gui-prompt",
rule = "ssd"
}
}
-- Apply settings ──────────────────────────────────────────────────────────────
for _, cmd in ipairs(startup_commands) do
@ -372,6 +406,19 @@ end
-- Mappings for tag management
tag_mappings()
for _, rule in ipairs(window_rules) do
local cmd = "riverctl rule-add "
if rule.app_id ~= nil then
cmd = cmd .. "-app-id " .. rule.app_id
end
if rule.title ~= nil then
cmd = cmd .. "-title " .. rule.title
end
cmd = cmd .. " " .. rule.rule
os.execute(cmd)
end
-- Launch the layout generator as the final initial process.
local unistd = require('posix.unistd')
unistd.execp('rivertile', {