Mar 16 Update

This commit is contained in:
Augusto Gunsch 2023-03-16 10:12:44 +01:00
parent a241c47ff4
commit 50659b7837
28 changed files with 890 additions and 632 deletions

View File

@ -111,7 +111,7 @@ font:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
family: Hack
family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face.
#style: Regular
@ -150,7 +150,7 @@ font:
#style: Bold Italic
# Point size
size: 8.0
size: 10.0
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
@ -205,8 +205,8 @@ font:
# XTerm's default colors
colors:
primary:
background: '0x000000'
foreground: '0xffffff'
background: '0xffffff'
foreground: '0x000000'
normal:
black: '0x000000'
red: '0xcd0000'

View File

@ -0,0 +1,51 @@
-- {{{ Modules
local awful = require("awful")
-- }}}
-- {{{ Variables
-- Applications that will be started
local start_applications = {
"picom",
"flameshot",
"nm-applet",
"lxpolkit",
"unclutter",
"radiotray-ng",
"keepassxc"
}
-- Applications that will be killed on exit/restart
local kill_applications = {
"keepassxc"
}
-- }}}
-- {{{ Functions
local function kill_apps()
for _, cmd in ipairs(kill_applications) do
awful.spawn("pkill " .. cmd)
end
end
local function restart()
kill_apps()
awesome.restart()
end
local function quit()
kill_apps()
awesome.quit()
end
-- }}}
--- {{{ Script
for _, cmd in ipairs(start_applications) do
awful.spawn.single_instance(cmd)
end
return {
kill_apps = kill_apps,
restart = restart,
quit = quit
}
-- }}}

View File

@ -0,0 +1,308 @@
-- {{{ Modules
local gears = require("gears")
local awful = require("awful")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
local cmus_widget = require("awesome-wm-widgets.cmus-widget.cmus")
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
local options = require("options")
local modkey = options.modkey
local applications = require("custom.applications")
local macros = require("custom.macros")
-- }}}
-- {{{ Script
-- Menubar configuration
menubar.utils.terminal = options.terminal -- Set the terminal for applications that require it
-- Mouse bindings
root.buttons(gears.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end)
))
-- Key bindings
globalkeys = gears.table.join(
awful.key({ }, "Print", function () awful.util.spawn("flameshot gui", false) end),
-- Volume widget
awful.key({ }, "XF86AudioRaiseVolume", function() volume_widget:inc(5) end, {description = "increase volume", group = "custom"}),
awful.key({ }, "XF86AudioLowerVolume", function() volume_widget:dec(5) end, {description = "decrease volume", group = "custom"}),
awful.key({ }, "XF86AudioMute", function() volume_widget:toggle() end, {description = "toggle mute", group = "custom"}),
-- Brightness widget
awful.key({ }, "XF86MonBrightnessUp", function () brightness_widget:inc() end, {description = "increase brightness", group = "custom"}),
awful.key({ }, "XF86MonBrightnessDown", function () brightness_widget:dec() end, {description = "decrease brightness", group = "custom"}),
-- Cmus widget
awful.key({ modkey, "Shift" }, "p", function () cmus_widget:play_pause() end, {description = "toggle track", group = "cmus"}),
awful.key({ }, "XF86AudioPlay", function () cmus_widget:play() end, {description = "play track", group = "cmus"}),
awful.key({ }, "XF86AudioPause", function () cmus_widget:pause() end, {description = "pause track", group = "cmus"}),
awful.key({ }, "XF86AudioNext", function () cmus_widget:next_track() end, {description = "next track", group = "cmus"}),
awful.key({ }, "XF86AudioPrev", function () cmus_widget:prev_track() end, {description = "previous track", group = "cmus"}),
awful.key({ }, "XF86AudioStop", function () cmus_widget:stop() end, {description = "stop track", group = "cmus"}),
-- Lock Screen
awful.key({ }, "XF86HomePage", function() awful.spawn(options.screen_locker) end,
{description = "lock the screen", group = "awesome"}),
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx(1)
end,
{description = "focus next by index", group = "client"}
),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
end,
{description = "focus previous by index", group = "client"}
),
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
{description = "show main menu", group = "awesome"}),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
{description = "swap with next client by index", group = "client"}),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
{description = "swap with previous client by index", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{description = "go back", group = "client"}),
-- Standard program
awful.key({ modkey, "Shift" }, "Return", function () awful.spawn(options.terminal) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey, "Control" }, "r", menubar.refresh,
{description = "reload launcher", group = "awesome"}),
awful.key({ modkey, "Shift" }, "r", applications.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "q", applications.quit,
{description = "quit awesome", group = "awesome"}),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
{description = "decrease master width factor", group = "layout"}),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
{description = "increase the number of master clients", group = "layout"}),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
{description = "decrease the number of master clients", group = "layout"}),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
{description = "increase the number of columns", group = "layout"}),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
{description = "decrease the number of columns", group = "layout"}),
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
{description = "select next", group = "layout"}),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}),
awful.key({ modkey, "Control" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
end
end,
{description = "restore minimized", group = "client"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"}),
awful.key({ modkey }, "b", function() mywibox.visible = not mywibox.visible end,
{description = "toggle wibox", group = "layout"}),
-- Macros
awful.key({ modkey, "Control" }, "w", macros.work_apps,
{description = "Open applications required for working", group = "macros"}),
-- Macros
awful.key({ modkey, "Control" }, "p", macros.end_work,
{description = "Close applications required for working", group = "macros"})
)
local client_keys = gears.table.join(
awful.key({ modkey, }, "f",
function (c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, }, "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, }, "t", function (c) c.ontop = not c.ontop end,
{description = "toggle keep on top", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end ,
{description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}),
awful.key({ modkey, "Control" }, "m",
function (c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end ,
{description = "(un)maximize vertically", group = "client"}),
awful.key({ modkey, "Shift" }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end ,
{description = "(un)maximize horizontally", group = "client"})
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 10.
for i = 1, 10 do
globalkeys = gears.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end,
{description = "view tag #"..i, group = "tag"}),
-- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end,
{description = "toggle tag #" .. i, group = "tag"}),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
{description = "move focused client to tag #"..i, group = "tag"}),
-- Toggle tag on focused client.
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
{description = "toggle focused client on tag #" .. i, group = "tag"})
)
end
local client_buttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
end),
awful.button({ modkey }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.resize(c)
end)
)
-- Define taglist buttons and tasklist buttons
local taglist_buttons = gears.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end)
)
local tasklist_buttons = gears.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
c:emit_signal(
"request::activate",
"tasklist",
{raise = true}
)
end
end),
awful.button({ }, 3, function()
awful.menu.client_list({ theme = { width = 250 } })
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
end))
-- Set keys
root.keys(globalkeys)
return {
client_keys = client_keys,
client_buttons = client_buttons,
taglist_buttons = taglist_buttons,
tasklist_buttons = tasklist_buttons
}
-- }}}

View File

@ -0,0 +1,70 @@
-- {{{ Modules
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local cmus_widget = require("awesome-wm-widgets.cmus-widget.cmus")
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
-- }}}
-- {{{ Variables
local mytextclock = wibox.widget.textclock()
-- }}}
-- {{{ Script
return function(s)
-- Layout box widget
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
return {
layout = wibox.layout.fixed.horizontal,
{
widget = wibox.container.margin,
right = 7,
{
layout = wibox.layout.fixed.horizontal,
spacing = 14,
wibox.widget.separator{
orientation = "vertical",
forced_width = 5,
visible = false
},
wibox.widget.systray(),
wibox.widget.separator{
orientation = "vertical",
forced_width = 5
}
}
},
{
cmus_widget(),
widget = wibox.container.margin,
right = 10,
left = 7,
space = 5,
draw_empty = false
},
{
widget = wibox.container.margin,
left = 7,
{
layout = wibox.layout.fixed.horizontal,
spacing = 14,
volume_widget{
widget_type = 'icon_and_text',
with_icon = true,
mute_color = beautiful.bg_urgent
},
mytextclock,
s.mylayoutbox,
}
}
}
end
-- }}}

View File

@ -0,0 +1,80 @@
-- {{{ Modules
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local cmus_widget = require("awesome-wm-widgets.cmus-widget.cmus")
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
-- }}}
-- {{{ Variables
local mytextclock = wibox.widget.textclock()
-- }}}
-- {{{ Script
return function(s)
-- Layout box widget
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
return {
layout = wibox.layout.fixed.horizontal,
{
widget = wibox.container.margin,
right = 7,
{
layout = wibox.layout.fixed.horizontal,
spacing = 14,
wibox.widget.separator{
orientation = "vertical",
forced_width = 5,
visible = false
},
wibox.widget.systray(),
wibox.widget.separator{
orientation = "vertical",
forced_width = 5
}
}
},
{
cmus_widget(),
widget = wibox.container.margin,
right = 10,
left = 7,
space = 5,
draw_empty = false
},
{
widget = wibox.container.margin,
left = 7,
{
layout = wibox.layout.fixed.horizontal,
spacing = 14,
volume_widget{
widget_type = 'icon_and_text',
with_icon = true,
mute_color = beautiful.bg_urgent
},
battery_widget{
enable_battery_warning = true
},
brightness_widget {
type = 'icon_and_text',
program = 'brightnessctl',
percentage = false
},
mytextclock,
s.mylayoutbox,
}
}
}
end
-- }}}

View File

@ -0,0 +1,46 @@
-- {{{ Modules
local awful = require("awful")
-- }}}
-- {{{ Script
local function instanceExists(class)
local function filter(client)
return awful.rules.match(client, {class = class})
end
-- Return true if any instance is found
return awful.client.iterate(filter)() ~= nil
end
local function spawnIfNoInstance(command, class)
if not instanceExists(class) then
awful.spawn(command)
end
end
local function work_apps()
spawnIfNoInstance("slack", "Slack")
spawnIfNoInstance("firefox --class WorkFirefox", "WorkFirefox")
spawnIfNoInstance("brave", "Brave")
spawnIfNoInstance("phpstorm", "jetbrains-phpstorm")
spawnIfNoInstance("sh -c 'alacritty --class WorkAlacritty -e tmux new-session -c ~/repos/rockar-peppermint'", "WorkAlacritty")
awful.spawn.with_shell("cd ~/repos/rockar-peppermint; make up")
--spawnIfNoInstance("dbeaver", "DBeaver")
end
local function end_work()
awful.spawn("pkill slack")
awful.spawn("xdotool search --class jetbrains-phpstorm windowkill")
awful.spawn("xdotool search --class WorkAlacritty windowquit")
awful.spawn("xdotool search --class WorkFirefox windowkill")
awful.spawn.with_shell("cd ~/repos/rockar-peppermint; make stop")
-- Dbeaver requires to be killed twice
--awful.spawn("xdotool search --class DBeaver windowkill")
--awful.spawn("xdotool search --class DBeaver windowkill")
end
return {
work_apps = work_apps,
end_work = end_work
}
-- }}}

View File

@ -0,0 +1,90 @@
-- {{{ Modules
local awful = require("awful")
local beautiful = require("beautiful")
local bindings = require("custom.bindings")
-- }}}
-- {{{ Script
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = bindings.client_keys,
buttons = bindings.client_buttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
},
-- Floating clients.
{ rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer"},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
}, properties = { floating = true }},
-- Add titlebars to normal clients and dialogs
{ rule_any = {type = { "normal", "dialog" }
}, properties = { titlebars_enabled = false }
},
-- Make Work programs spanw at specific tags
{ rule_any = {class = { "Brave" }
}, properties = { tag = "1" }
},
{ rule_any = {class = { "WorkFirefox" }
}, properties = { tag = "1" }
},
{ rule_any = {class = { "WorkAlacritty" }
}, properties = { tag = "2" }
},
{ rule_any = {class = { "jetbrains-phpstorm" }
}, properties = { tag = "3" }
},
{ rule_any = {class = { "DBeaver" }
}, properties = { tag = "9" }
},
{ rule_any = {
class = { "DBeaver" },
}, properties = { tag = "9" }
},
{ rule_any = {class = { "Slack" }
}, properties = { tag = "0" }
},
}
-- }}}

View File

@ -0,0 +1,58 @@
-- {{{ Modules
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local options = require ("options")
local modkey = options.modkey
local widgets = require("custom." .. options.profile .. ".widgets")
local bindings = require("custom.bindings")
-- }}}
-- {{{ Functions
mywibox = awful.wibar({ position = "top", screen = s })
local function set_wallpaper(s)
awful.spawn.with_shell("nitrogen --restore")
end
-- }}}
-- {{{ Script
-- Update wallpaper when screen size changes
screen.connect_signal("property::geometry", set_wallpaper)
-- Setup each screen
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" }, s, awful.layout.layouts[2])
-- Tag list
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = bindings.taglist_buttons
}
-- Task list
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = bindings.tasklist_buttons
}
-- Wibox
s.mywibox = mywibox
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
s.mytaglist,
s.mytasklist,
widgets(s)
}
end)
-- }}}

View File

@ -0,0 +1,68 @@
-- {{{ Modules
local awful = require("awful")
local beautiful = require("beautiful")
-- }}}
-- {{{ Script
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({ }, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end)
)
awful.titlebar(c) : setup {
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,
layout = wibox.layout.fixed.horizontal
},
{ -- Middle
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c)
},
buttons = buttons,
layout = wibox.layout.flex.horizontal
},
{ -- Right
awful.titlebar.widget.floatingbutton (c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton (c),
awful.titlebar.widget.ontopbutton (c),
awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal()
},
layout = wibox.layout.align.horizontal
}
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}

View File

@ -0,0 +1,28 @@
-- {{{ Modules
local gears = require("gears")
-- }}}
-- Available profiles: desktop, laptop
local profile = "desktop"
-- Default apps
local terminal = "alacritty"
local editor = os.getenv("EDITOR") or "nvim"
local editor_cmd = terminal .. " -e " .. editor
local screen_locker = "cinnamon-screensaver-command -l"
-- Default modkey
local modkey = "Mod1"
-- Chosen theme
local theme = gears.filesystem.get_configuration_dir() .. "themes/default/theme.lua"
return {
profile = profile,
terminal = terminal,
editor = editor,
editor_cmd = editor_cmd,
screen_locker = screen_locker,
modkey = modkey,
theme = theme
}

View File

@ -1,32 +1,24 @@
-- {{{ Modules
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")
local options = require("options")
-- Load Debian menu entries
local is_deb, debian = pcall(require, "debian.menu")
local has_fdo, freedesktop = pcall(require, "freedesktop")
-- awesome-wm-widgets
local cmus_widget = require("awesome-wm-widgets.cmus-widget.cmus")
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
-- }}}
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
@ -53,11 +45,12 @@ do
end
-- }}}
-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
theme = gears.filesystem.get_configuration_dir() .. "themes/default/theme.lua"
-- {{{ Initialization
-- Run apps on startup
require("custom.applications")
if not beautiful.init(theme) then
-- Initialize theme
if not beautiful.init(options.theme) then
naughty.notify({ preset = naughty.config.presets.critical,
title = string.format("Couldn't load custom theme at %s! Falling back to the default one.", theme),
text = awesome.startup_errors })
@ -65,29 +58,6 @@ if not beautiful.init(theme) then
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") -- Fallback to default themes
end
-- Default apps
terminal = "alacritty"
editor = os.getenv("EDITOR") or "nvim"
editor_cmd = terminal .. " -e " .. editor
scrlocker = "cinnamon-screensaver-command -l"
-- Default modkey
modkey = "Mod1"
-- Commands
local background_processes = {
"compton",
"flameshot",
"nm-applet",
"lxpolkit",
"unclutter",
"radiotray-ng"
}
local reload_programs = {
"customkeys",
}
-- Table of layouts to cover with awful.layout.inc, order matters.
awful.layout.layouts = {
awful.layout.suit.floating,
@ -95,12 +65,11 @@ awful.layout.layouts = {
awful.layout.suit.max
}
-- {{{ Menu
-- Create a launcher widget and a main menu
myawesomemenu = {
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "manual", options.terminal .. " -e man awesome" },
{ "edit config", options.editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end },
}
@ -130,556 +99,15 @@ else
})
end
-- Initialize screens
require("custom.screen")
--mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
--menu = mymainmenu })
-- Set keybindings
require("custom.bindings")
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- Load client rules
require("custom.rules")
-- Load client signals
require("custom.signals")
-- }}}
-- Keyboard map indicator and switcher
mykeyboardlayout = awful.widget.keyboardlayout()
-- {{{ Wibar
-- Create a textclock widget
mytextclock = wibox.widget.textclock()
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end)
--awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
--awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
)
local tasklist_buttons = gears.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
c:emit_signal(
"request::activate",
"tasklist",
{raise = true}
)
end
end),
awful.button({ }, 3, function()
awful.menu.client_list({ theme = { width = 250 } })
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
end))
local function run_once(cmd_arr)
for _, cmd in ipairs(cmd_arr) do
awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd))
end
end
local function set_wallpaper(s)
awful.spawn.with_shell("nitrogen --restore")
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
local mywibox = awful.wibar({ position = "top", screen = s })
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" }, s, awful.layout.layouts[2])
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons
}
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons
}
-- Create the wibox
s.mywibox = mywibox
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
--mylauncher,
s.mytaglist,
s.mypromptbox,
},
s.mytasklist, -- Middle widget
{
layout = wibox.layout.fixed.horizontal,
{
widget = wibox.container.margin,
right = 7,
{
layout = wibox.layout.fixed.horizontal,
spacing = 14,
wibox.widget.separator{
orientation = "vertical",
forced_width = 5,
visible = false
},
wibox.widget.systray(),
wibox.widget.separator{
orientation = "vertical",
forced_width = 5
}
}
},
{
cmus_widget(),
widget = wibox.container.margin,
right = 10,
left = 7,
space = 5,
draw_empty = false
},
{
widget = wibox.container.margin,
left = 7,
{
layout = wibox.layout.fixed.horizontal,
spacing = 14,
volume_widget{
widget_type = 'icon_and_text',
with_icon = true,
mute_color = beautiful.bg_urgent
},
battery_widget{
enable_battery_warning = true
},
brightness_widget {
type = 'icon_and_text',
program = 'brightnessctl',
percentage = false
},
mytextclock,
s.mylayoutbox,
}
}
}
}
end)
-- }}}
-- {{{ Mouse bindings
root.buttons(gears.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end)
--awful.button({ }, 4, awful.tag.viewnext),
--awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}
-- {{{ Key bindings
globalkeys = gears.table.join(
awful.key({ }, "Print", function () awful.util.spawn("flameshot gui", false) end),
-- Volume widget
awful.key({ }, "XF86AudioRaiseVolume", function() volume_widget:inc(5) end, {description = "increase volume", group = "custom"}),
awful.key({ }, "XF86AudioLowerVolume", function() volume_widget:dec(5) end, {description = "decrease volume", group = "custom"}),
awful.key({ }, "XF86AudioMute", function() volume_widget:toggle() end, {description = "toggle mute", group = "custom"}),
-- Brightness widget
awful.key({ }, "XF86MonBrightnessUp", function () brightness_widget:inc() end, {description = "increase brightness", group = "custom"}),
awful.key({ }, "XF86MonBrightnessDown", function () brightness_widget:dec() end, {description = "decrease brightness", group = "custom"}),
-- cmus
awful.key({ modkey, "Shift" }, "p", function () cmus_widget:play_pause() end, {description = "toggle track", group = "cmus"}),
awful.key({ }, "XF86AudioPlay", function () cmus_widget:play() end, {description = "play track", group = "cmus"}),
awful.key({ }, "XF86AudioPause", function () cmus_widget:pause() end, {description = "pause track", group = "cmus"}),
awful.key({ }, "XF86AudioNext", function () cmus_widget:next_track() end, {description = "next track", group = "cmus"}),
awful.key({ }, "XF86AudioPrev", function () cmus_widget:prev_track() end, {description = "previous track", group = "cmus"}),
awful.key({ }, "XF86AudioStop", function () cmus_widget:stop() end, {description = "stop track", group = "cmus"}),
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
end,
{description = "focus next by index", group = "client"}
),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
end,
{description = "focus previous by index", group = "client"}
),
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
{description = "show main menu", group = "awesome"}),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
{description = "swap with next client by index", group = "client"}),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
{description = "swap with previous client by index", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{description = "go back", group = "client"}),
-- Standard program
awful.key({ modkey, "Shift" }, "Return", function () awful.spawn(terminal) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "q", awesome.quit,
{description = "quit awesome", group = "awesome"}),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
{description = "decrease master width factor", group = "layout"}),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
{description = "increase the number of master clients", group = "layout"}),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
{description = "decrease the number of master clients", group = "layout"}),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
{description = "increase the number of columns", group = "layout"}),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
{description = "decrease the number of columns", group = "layout"}),
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
{description = "select next", group = "layout"}),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}),
awful.key({ modkey, "Control" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
end
end,
{description = "restore minimized", group = "client"}),
-- Prompt
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
awful.prompt.run {
prompt = "Run Lua code: ",
textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = awful.util.eval,
history_path = awful.util.get_cache_dir() .. "/history_eval"
}
end,
{description = "lua execute prompt", group = "awesome"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"}),
-- Lock Screen
awful.key({ }, "XF86Display", function() awful.spawn(scrlocker) end,
{description = "lock the screen", group = "custom"}),
awful.key({ modkey }, "b", function() mywibox.visible = not mywibox.visible end,
{description = "toggle wibox", group = "layout"})
)
clientkeys = gears.table.join(
awful.key({ modkey, }, "f",
function (c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, }, "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, }, "t", function (c) c.ontop = not c.ontop end,
{description = "toggle keep on top", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end ,
{description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}),
awful.key({ modkey, "Control" }, "m",
function (c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end ,
{description = "(un)maximize vertically", group = "client"}),
awful.key({ modkey, "Shift" }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end ,
{description = "(un)maximize horizontally", group = "client"})
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 10 do
globalkeys = gears.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end,
{description = "view tag #"..i, group = "tag"}),
-- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end,
{description = "toggle tag #" .. i, group = "tag"}),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
{description = "move focused client to tag #"..i, group = "tag"}),
-- Toggle tag on focused client.
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
{description = "toggle focused client on tag #" .. i, group = "tag"})
)
end
clientbuttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
end),
awful.button({ modkey }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.resize(c)
end)
)
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
},
-- Floating clients.
{ rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer"},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
}, properties = { floating = true }},
-- Add titlebars to normal clients and dialogs
{ rule_any = {type = { "normal", "dialog" }
}, properties = { titlebars_enabled = false }
},
-- Set Firefox to always map on the tag named "2" on screen 1.
-- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } },
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({ }, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end)
)
awful.titlebar(c) : setup {
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,
layout = wibox.layout.fixed.horizontal
},
{ -- Middle
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c)
},
buttons = buttons,
layout = wibox.layout.flex.horizontal
},
{ -- Right
awful.titlebar.widget.floatingbutton (c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton (c),
awful.titlebar.widget.ontopbutton (c),
awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal()
},
layout = wibox.layout.align.horizontal
}
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
local function trim(s)
return s:find'^%s*$' and '' or s:match'^%s*(.*%S)'
end
-- Autostart applications
for _, cmd in ipairs(background_processes) do
awful.spawn.single_instance(cmd)
end
for _, cmd in ipairs(reload_programs) do
awful.spawn(cmd)
end

View File

@ -11,7 +11,7 @@ local themes_path = gfs.get_themes_dir()
local theme = {}
theme.font = "sans 8"
theme.font = "Noto Sans 12"
theme.bg_normal = "#000000"
theme.bg_focus = "#333333"
@ -128,6 +128,8 @@ theme.awesome_icon = theme_assets.awesome_icon(
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = nil
theme.hotkeys_modifiers_fg = '#fcc100'
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,4 +1,5 @@
[Settings]
gtk-icon-theme-name = Material-Black-Lime-Numix
gtk-theme-name = Material-Black-Lime
gtk-application-prefer-dark-theme = true
gtk-theme-name = Mint-X
gtk-cursor-theme-name = Human
gtk-application-prefer-dark-theme = false

View File

@ -7,6 +7,7 @@ application/pdf=mupdf.desktop
video/mp4=mpv.desktop
image/png=feh.desktop
image/jpg=feh.desktop
x-scheme-handler/http=brave.desktop
x-scheme-handler/https=brave.desktop
text/html=brave.desktop
x-scheme-handler/http=brave-browser.desktop
x-scheme-handler/https=brave-browser.desktop
application/xhtml+xml=brave-browser.desktop
text/html=brave-browser.desktop

View File

@ -7,8 +7,6 @@ set nu rnu
set smartindent
set nocp
set bo=all
set mouse=a
colorscheme torte
set list
set listchars=tab:*·,lead,trail:~,extends:>,precedes:<
filetype indent off
@ -26,7 +24,7 @@ packadd! matchit
let mapleader = " "
let maplocalleader = ","
nnoremap <silent> <F2> <cmd>ToggleDiagOff<cr>:Gdiffsplit<cr>
nnoremap <silent> <F2> <cmd>Gdiffsplit<cr>
nnoremap <silent> <F3> <cmd>%!sed 's/[ \t]*$//'<cr>
nnoremap <silent> <F4> <cmd>%s/"/'/g<cr>
nnoremap <silent> <F5> <cmd>ToggleDiag<cr>
@ -41,7 +39,8 @@ nnoremap <silent> <C-p> <cmd>let @+=expand("%")<cr><cmd>echo "Copied relative fi
nnoremap <silent> <leader>ev <cmd>tabnew $MYVIMRC<cr>
nnoremap <silent> <leader>sv <cmd>source $MYVIMRC<cr><cmd>AirlineRefresh<cr>
nnoremap <C-s> :%s//gc<left><left><left>
nnoremap <C-s> <cmd>w<cr>
nnoremap <C-b> :%s//gc<left><left><left>
nnoremap <silent> <C-w>t <cmd>tabnew<cr>
nnoremap dL 0D
@ -64,7 +63,7 @@ augroup nerdtree
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
augroup END
let g:airline_theme = "powerlineish"
let g:airline_theme = "papercolor"
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
let g:airline#extensions#nerdtree_statusline = 1
@ -86,7 +85,7 @@ Plug 'tpope/vim-fugitive'
Plug 'drmingdrmer/xptemplate'
Plug 'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim'
"Plug 'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim'
Plug 'preservim/tagbar'
@ -97,6 +96,8 @@ Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-obsession'
Plug 'olimorris/onedarkpro.nvim'
call plug#end()
lua << EOF
@ -170,6 +171,8 @@ for _, lsp in ipairs(servers) do
end
EOF
colorscheme onelight
" auto close scratch buffer (preview window)
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif

View File

@ -70,7 +70,10 @@ shadow-exclude = [
"class_g = 'Cairo-clock'",
# "class_g = 'dwm'",
"class_g = 'dmenu'",
"_GTK_FRAME_EXTENTS@:c"
"_GTK_FRAME_EXTENTS@:c",
"class_g = 'firefox'",
"class_g = 'WorkFirefox'"
"class_g = 'thunderbird'"
];
# Specify a X geometry that describes the region in which shadow should not

View File

@ -6,5 +6,5 @@
"notification-verbose" : true,
"notifications" : true,
"split-title" : true,
"volume-level" : 34
"volume-level" : 100
}

View File

@ -1 +1,27 @@
keycode 151 = Multi_key Multi_key Multi_key
! Make Caps Lock act as Escape, unless Shift is pressed
clear lock
keycode 66 = Escape Caps_Lock Escape
! Turn AltGr into Mode_switch
keycode 108 = Mode_switch
! Turn Windows key into multi key
keycode 133 = Multi_key Multi_key Multi_key
!
! Turn Tilde, Grave and Circumflex into dead versions
keycode 15 = 6 dead_circumflex 6 dead_circumflex
keycode 49 = dead_grave dead_tilde dead_grave dead_tilde
! Turn Right Control into Dead Acute
clear control
add control = Control_L
keycode 105 = dead_acute dead_acute dead_acute
! Make different letters when Mode_switch is being pressed
! Portuguese:
keycode 54 = c C ccedilla Ccedilla
! Polish:
keycode 26 = e E U0119 U0118
keycode 38 = a A U0105 U0104
keycode 46 = l L U0142 U0141
keycode 52 = z Z U017C U017B

View File

@ -1 +1 @@
Xft.dpi: 156
Xft.dpi: 96

View File

@ -1,5 +1,5 @@
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.config/composer/vendor/bin:$PATH"
export EDITOR="/usr/local/bin/nvim"
export EDITOR="/usr/bin/nvim"
# vim
alias vim="nvim"
@ -44,7 +44,7 @@ alias venv="source venv/bin/activate"
alias grepa="grep -I -n --color=always -r --exclude-dir=venv --exclude-dir=node_modules"
# cat
alias cat="batcat -p --paging=never"
alias cat="bat -p --paging=never --theme=OneHalfLight"
# pipe yd-dlp to mpv
ytmpv() {

View File

@ -1,3 +1,4 @@
gtk-icon-theme-name = "Material-Black-Lime-Numix"
gtk-theme-name = "Material-Black-Lime"
gtk-application-prefer-dark-theme = "true"
gtk-theme-name = "Mint-X"
gtk-cursor-theme-name = "Human"
gtk-application-prefer-dark-theme = "false"

View File

@ -1,3 +1,4 @@
Host vps
User root
HostName augustogunsch.com
IdentityFile ~/.ssh/id_rsa

View File

@ -65,9 +65,7 @@ set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-format '#[fg=colour233,bg=colour21]#[bg=colour21,fg=colour184] #I#[fg=colour255]-#W #[bg=colour233,fg=colour21]'
setw -g window-status-format '#[fg=colour233,bg=colour237]#[bg=colour237,fg=colour184] #I#[fg=colour249]-#W #[bg=colour233,fg=colour237]'
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
setw -g window-status-separator ''

View File

@ -24,7 +24,7 @@ bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
export PROMPT='%B%F{63}[%F{68}%n@%m %F{white}%~%F{63}]$%b%f '
export PROMPT='%B%F{4}[%F{20}%n@%m %F{124}%~%F{4}]$%b%f '
export LS_COLORS='di=1;94:ex=4;92:ln=3;96'
# aliases:

View File

@ -0,0 +1,2 @@
[icon theme]
Inherits=Human

View File

@ -3,6 +3,9 @@ set -e
cd "$(dirname "$0")"
PWD="$(pwd)"
git submodule init
git submodule update
clone_dir() {
local dir=${1:-home}
local to=${2:-$HOME}

View File

@ -1,10 +0,0 @@
#!/bin/sh
# Compose key: windows key
setxkbmap -option compose:lwin
# Caps turned into escape
setxkbmap -option caps:escape_shifted_capslock
# dead_greek as control right
xmodmap ~/.Xmodmap

View File

@ -7,6 +7,6 @@ application/pdf=mupdf.desktop
video/mp4=mpv.desktop
image/png=feh.desktop
image/jpg=feh.desktop
x-scheme-handler/http=qutebrowser.desktop
x-scheme-handler/https=qutebrowser.desktop
text/html=qutebrowser.desktop
x-scheme-handler/http=brave-browser.desktop
x-scheme-handler/https=brave-browser.desktop
text/html=brave-browser.desktop