Skip to content

Commit

Permalink
add default lxqt settings
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintRyoh committed Nov 3, 2023
1 parent abca03a commit d47a604
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 14 deletions.
2 changes: 1 addition & 1 deletion rabbithole/components/buttons/client.lua
Expand Up @@ -5,7 +5,7 @@ local awful = require("awful")
return setmetatable({}, {
__constructor = function (settings)

local modkey = settings.core_settings.modkey
local modkey = settings.keys.modkey
local clientbuttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
Expand Down
4 changes: 2 additions & 2 deletions rabbithole/components/buttons/taglist-global.lua
Expand Up @@ -31,7 +31,7 @@ return setmetatable({}, {
end

end),
awful.button({ settings.core_settings.modkey }, 3, function(t)
awful.button({ settings.keys.modkey }, 3, function(t)
taglistmenu:updateMenu(t)
taglistmenu.taglist_menu:toggle()
-- if client.focus then
Expand All @@ -41,7 +41,7 @@ return setmetatable({}, {
awful.button({ "Ctrl" }, 1, function(t)
sharedtags.viewtoggle(t, t.screen)
end ),
awful.button({ settings.core_settings.modkey }, 2, function(t)
awful.button({ settings.keys.modkey }, 2, function(t)
workspaceManagerService:deleteTagFromWorkspaceWithConfirm(nil, t)
end ),
awful.button({ }, 4, function(t) workspaceManagerService:viewNextTag() end),
Expand Down
4 changes: 2 additions & 2 deletions rabbithole/components/buttons/taglist.lua
Expand Up @@ -32,7 +32,7 @@ return setmetatable({}, {
end

end),
awful.button({ settings.core_settings.modkey }, 3, function(t)
awful.button({ settings.keys.modkey }, 3, function(t)
taglistmenu:updateMenu(t)
taglistmenu.taglist_menu:toggle()
-- if client.focus then
Expand All @@ -42,7 +42,7 @@ return setmetatable({}, {
awful.button({ "Control" }, 1, function(t)
sharedtags.viewtoggle(t, t.screen)
end ),
awful.button({ settings.core_settings.modkey }, 2, function(t)
awful.button({ settings.keys.modkey }, 2, function(t)
workspaceManagerService:deleteTagFromWorkspaceWithConfirm(nil, t)
end ),
awful.button({ }, 4, function(t) workspaceManagerService:viewNextTag() end),
Expand Down
2 changes: 1 addition & 1 deletion rabbithole/components/keys/client.lua
Expand Up @@ -8,7 +8,7 @@ local awful = require("awful")
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
return setmetatable({}, {
__constructor = function (settings)
local modkey = settings.core_settings.modkey
local modkey = settings.keys.modkey
local clientkeys = gears.table.join(
awful.key({ modkey, }, "f",
function (c)
Expand Down
4 changes: 2 additions & 2 deletions rabbithole/components/keys/global.lua
Expand Up @@ -16,8 +16,8 @@ local _M = {} -- TO RYOH: Idk why this is here, if its not needed anymore, remov
return setmetatable({}, {
__constructor = function(workspaceManagerService, settings, rabbithole__components__menus__main)
-- Resource Configuration
local modkey = settings.core_settings.modkey or "Mod4"
local altkey = settings.core_settings.altkey or "Mod1"
local modkey = settings.keys.modkey or "Mod4"
local altkey = settings.keys.altkey or "Mod1"
local mainmenu = rabbithole__components__menus__main
local terminal = settings.default_programs.terminal
local launcher = settings.default_programs.launcher_cmd
Expand Down
7 changes: 2 additions & 5 deletions rabbithole/services/global.lua
@@ -1,14 +1,12 @@
local awful = require("awful")
local gears = require("gears")
--local autorandr = require("scripts.autorandr-dbus") -- listens for udev changes in the display and runs autorandr -c

return setmetatable({}, {
__constructor = function (
rabbithole__components__buttons__global,
rabbithole__components__keys__global,
rabbithole__components__layouts__default,
rabbithole__components__rules__client___default,
rabbithole__services__rabid___daemons
rabbithole__components__rules__client___default
)
-- Set what happens when you click on the desktop
root.buttons(rabbithole__components__buttons__global)
Expand All @@ -18,12 +16,11 @@ return setmetatable({}, {

-- Set default layout list
awful.layout.layouts = rabbithole__components__layouts__default

-- Set default client rules
awful.rules.rules = gears.table.join(
awful.rules.rules,
rabbithole__components__rules__client___default
)

rabbithole__services__rabid___daemons:run()
end
})
8 changes: 7 additions & 1 deletion rc.lua
@@ -1,6 +1,8 @@
require("paths")
require("error-handling")

local gears = require("gears")

-- if AWM_DEBUG set in environment then require debug
Debugger = nil
if os.getenv("AWM_DEBUG") == '1' then
Expand Down Expand Up @@ -45,7 +47,11 @@ RC = {
end
--
-- Values
config.bindings.values.settings = require("settings")
if gears.filesystem.file_readable(gears.filesystem.get_configuration_dir() .. "/settings.lua") then
config.bindings.values.settings = require("settings")
else
config.bindings.values.settings = require("settings-lxqt")
end



Expand Down
68 changes: 68 additions & 0 deletions settings-lxqt.lua
@@ -0,0 +1,68 @@
--[[ Settings flat file for Rabbithole
Returns a settings object to be used with the settingsManager service.
Theme table:
These are the only colors that need to be set for a custom theme.
The rest of the colors will be generated automatically. You can also
use a single color and pick a color theory and tesseract will generate an
Md3 and color theory compliant theme for you. Themes can also be generated
from the background image or URL. We thought of everything.
]]
local colors = require("rabbithole.services.tesseractThemeEngine.colors")
local config_dir = require("gears.filesystem").get_configuration_dir()

return {
--[[ For color_scheme, you can use any of the color schemes listed here:
polychromatic, monochromatic, analogous, complementary, split_complementary, triadic,
tetradic, TODO: clash, five_tone, six_tone, neutral, and custom.
Default settinngs mimic the default theme.lua. Generated with tesseract.
]]
theme = {
-- [[[ Tesseract theme generation settings
use_default = false, -- toggling uses the default template only
generate_theme = false, -- this will generate a theme using the tesseractThemeEngine when true
color_scheme = "monochromatic", -- this is the color theory used to generate the theme
-- ]]]
theme_name = "rabbithole", -- TODO: used later for logic in saving themes
theme_template = "/themes/rabbithole/theme.lua",
wallpaper = config_dir .. "/themes/rabbithole/wallpapers/cozy-room.jpg",
-- [[[ Theme colors--These are the most important settings.
base_color = colors["Blue"]["400"], -- If you're generating a theme, you only need to pass a base_color
secondary_color = colors["Periwinkle"]["500"],
tertiary_1 = colors["Blue"]["700"],
tertiary_2 = colors["Blue"]["600"],
neutral = colors["Blue Grey"]["900"],
-- ]]]
-- [[[ Fonts
font = "Ubuntu 8",
fg_normal = colors["Black"],
fg_focus = colors["Black"],
fg_urgent = colors["Black"],
-- ]]]
-- The following should be left as defaults, but you can change if desired.
--neutral = colors["Blue Grey"]["900"],
--success = colors["Green"]["500"],
--info = colors["Blue"]["500"],
--warning = colors["Yellow"]["500"],
--danger = colors["Red"]["500"],
},
default_programs = {
terminal = os.getenv("TERMINAL") or "qterminal",
browser = os.getenv("BROWSER") or "google-chrome-stable",
editor = "featherpad",
file_manager = "pcmanfm-qt",
screenshot_tool = "lximage-qt --screenshot",
launcher_cmd = "lxqt-runner",
lock_screen = "lxqt-leave",
volume_up = "pactl set-sink-volume @DEFAULT_SINK@ +5%",
volume_down = "pactl set-sink-volume @DEFAULT_SINK@ -5%",
brightness_up = "brightnessctl set +10%",
brightness_down = "brightnessctl set 10%-",
},
keys = {
modkey = "Mod4",
altkey = "Mod1",
},
}

0 comments on commit d47a604

Please sign in to comment.