Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove blank space margin #25

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions conf/awesome/main/apps.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local apps = {
terminal = "wezterm",
launcher = "rofi -show drun",
terminal = "alacritty",
--launcher = "rofi -show drun",
launcher = os.getenv( "HOME" ) .. "/.config/rofi/launcher/launcher.sh",
browser = "firefox",
picture = "feh",
fileManager = "thunar",
Expand Down
197 changes: 111 additions & 86 deletions conf/awesome/main/bindings/bindings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local awful = require "awful"
local gears = require "gears"
local naughty = require "naughty"
local beautiful = require "beautiful"

--local menubar = require "menubar"
local apps = require "main.apps"

modkey = "Mod4"
Expand All @@ -23,90 +23,109 @@ awful.keyboard.append_global_keybindings({
}
end,
{description = "lua execute prompt", group = "awesome"}),
awful.key({ modkey, }, "Return", function () awful.spawn(apps.terminal) end,
awful.key({ modkey, "Shift" }, "Return", function () awful.spawn(apps.terminal) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"}),
--awful.key({ modkey }, "p", function() menubar.show() end,
--{description = "show the menubar", group = "launcher"}),
})

-- Tag bindings
awful.keyboard.append_global_keybindings({
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, }, "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.keyboard.append_global_keybindings({
awful.key {
modifiers = { modkey },
keygroup = "numrow",
description = "only view tag",
group = "tag",
on_press = function (index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
tag:view_only()
end
end,
},
awful.key {
modifiers = { modkey, "Control" },
keygroup = "numrow",
description = "toggle tag",
group = "tag",
on_press = function (index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
awful.tag.viewtoggle(tag)
end
end,
},
awful.key {
modifiers = { modkey, "Shift" },
keygroup = "numrow",
description = "move focused client to tag",
group = "tag",
on_press = function (index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
},
awful.key {
modifiers = { modkey, "Control", "Shift" },
keygroup = "numrow",
description = "toggle focused client on tag",
group = "tag",
on_press = function (index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
},
awful.key {
modifiers = { modkey },
keygroup = "numpad",
description = "select layout directly",
group = "layout",
on_press = function (index)
local t = awful.screen.focused().selected_tag
if t then
t.layout = t.layouts[index] or t.layout
end
end,
}
})
-- 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, 5 do
awful.keyboard.append_global_keybindings({
-- 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"}),
awful.key({ modkey }, "F" .. i,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i + 5]
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"}),
awful.key({ modkey, "Control" }, "F" .. i,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i + 5]
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"}),
awful.key({ modkey, "Shift" }, "F" .. i,
function ()
if client.focus then
local tag = client.focus.screen.tags[i + 5]
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"}),
awful.key({ modkey, "Control", "Shift" }, "F" .. i,
function ()
if client.focus then
local tag = client.focus.screen.tags[i + 5]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
{description = "toggle focused client on tag #" .. i, group = "tag"})
})
end

-- Focus bindings
awful.keyboard.append_global_keybindings({
Expand All @@ -122,13 +141,13 @@ awful.keyboard.append_global_keybindings({
end,
{description = "focus previous by index", group = "client"}
),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
awful.key({ modkey, }, "Tab", awful.tag.history.restore,
--function ()
--awful.client.focus.history.previous()
--if client.focus then
--client.focus:raise()
--end
--end,
{description = "go back", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
Expand Down Expand Up @@ -180,8 +199,14 @@ client.connect_signal("request::default_keybindings", function()
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey }, "q", function (c) c:kill() end,
-- Close Window
--awful.key({ modkey }, "q", function (c) c:kill() end,
--{description = "close", group = "client"}),
--awful.key({ modkey }, "w", function (c) c:kill() end,
--{description = "close", 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, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
Expand Down Expand Up @@ -221,8 +246,8 @@ end)
-- Mouse bindings
awful.mouse.append_global_mousebindings({
awful.button({ }, 3, function () mainmenu:toggle() return end),
awful.button({ }, 4, awful.tag.viewprev),
awful.button({ }, 5, awful.tag.viewnext),
--awful.button({ }, 4, awful.tag.viewprev),
--awful.button({ }, 5, awful.tag.viewnext),
})

client.connect_signal("request::default_mousebindings", function()
Expand Down
24 changes: 23 additions & 1 deletion conf/awesome/main/bindings/custom_bindings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ modkey = "Mod4"
alt = "Mod1"

awful.keyboard.append_global_keybindings({
awful.key({modkey}, "r", function() awful.spawn(apps.launcher, false) end), -- Rofi
awful.key({modkey}, "p", function() awful.spawn(apps.launcher, false) end), -- Rofi
awful.key({modkey}, "e", function() awful.spawn(apps.fileManager, false) end), -- Rofi
awful.key({modkey}, "t", function() awful.spawn("feh /home/cleff/timetable.jpg", false) end), -- Rofi
awful.key({alt}, "c", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar
awful.key({alt}, "t", function() awful.titlebar.toggle(client.focus) end), -- Toggle titlebar
awful.key({modkey}, ".", function() awful.spawn("rofi -modi emoji -show emoji", false) end), -- Show Rofi Emoji Picker
})

-- Volume
Expand All @@ -25,3 +28,22 @@ awful.keyboard.append_global_keybindings({
awful.key({ }, "XF86MonBrightnessUp", function() brightness.increase() end),
awful.key({ }, "XF86MonBrightnessDown", function() brightness.decrease() end)
})

awful.keyboard.append_global_keybindings({
-- Change Volume
awful.key({ modkey }, "Up", function() awful.util.spawn_with_shell("~/.scripts/check/changevolumeup") end,
{description = "increase volume", group = "launcher"}),
awful.key({ modkey }, "Down", function() awful.util.spawn_with_shell("~/.scripts/check/changevolumedown") end,
{description = "decrease volume", group = "launcher"}),
-- Change Brightness
awful.key({ modkey }, "Left", function() awful.util.spawn_with_shell("~/.scripts/check/changebrightnessdown") end,
{description = "decrease brightness", group = "launcher"}),
awful.key({ modkey }, "Right", function() awful.util.spawn_with_shell("~/.scripts/check/changebrightnessup") end,
{description = "increase brightness", group = "launcher"}),
-- Screenshot
awful.key({ modkey, "Shift" }, "s", function() awful.util.spawn_with_shell("scrot -s '/home/cleff/Pictures/Screenshots/%d-%m-%Y-%T-screenshot.jpg'") end,
{description = "take a screenshot", group = "launcher"}),
-- Powermenu
awful.key({}, "XF86PowerOff", function() awful.util.spawn_with_shell("/home/cleff/.config/rofi/powermenu/powermenu.sh") end,
{description = "powermenu", group = "launcher"}),
})
2 changes: 1 addition & 1 deletion conf/awesome/main/tags.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local awful = require "awful"

screen.connect_signal("request::desktop_decoration", function(s)
awful.tag({"1", "2", "3", "4"}, s, awful.layout.layouts[1])
awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}, s, awful.layout.layouts[1])
end)
5 changes: 3 additions & 2 deletions conf/awesome/main/wallpaper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local function set_wall(s)
},
valign = "center",
halign = "center",
tiled = false,
tiled = true,
widget = wibox.container.tile,
}
}
Expand All @@ -26,6 +26,7 @@ screen.connect_signal("request::wallpaper", function(s)
if not use_feh then
set_wall(s)
else
awful.spawn("feh --bg-fill "..beautiful.wallpaper, false)
--awful.spawn("feh --bg-fill "..beautiful.wallpaper, false)
awful.spawn.with_shell("~/.fehbg", false)
end
end)
2 changes: 1 addition & 1 deletion conf/awesome/misc/bar/clock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local clock = wibox.widget.textbox()
clock.font = "Roboto Medium 14"

gears.timer {
timeout = 30,
timeout = 1,
autostart = true,
call_now = true,
callback = function()
Expand Down
31 changes: 15 additions & 16 deletions conf/awesome/misc/bar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,22 @@ local info = wibox.widget {
widget = wibox.container.margin,
}

-- Systray
--Systray
local systray = wibox.widget {
{
{
{
{
{
{
wibox.widget.systray,
layout = wibox.layout.fixed.horizontal,
},
margins = {top = dpi(2), bottom = dpi(2), left = dpi(6), right = dpi(6)},
widget = wibox.container.margin,
},
shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,8) end,
bg = beautiful.bg_alt,
widget = wibox.container.background,
},
margins = {top = dpi(6), bottom = dpi(6)},
widget = wibox.container.margin,
layout = wibox.layout.fixed.horizontal,
},
widget = wibox.container.margin,
},
shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,8) end,
bg = beautiful.bg_alt,
widget = wibox.container.background,
},
margins = {top = dpi(6), bottom = dpi(6)},
widget = wibox.container.margin,
}

-- Right
Expand Down Expand Up @@ -89,7 +88,7 @@ local function get_bar(s)
ontop = false,
width = s.geometry.width,
height = dpi(60),
y = s.geometry.height - dpi(60),
y = s.geometry.height - dpi(60),
bg = beautiful.bg,
type = 'dock'
}
Expand Down
1 change: 1 addition & 0 deletions conf/awesome/misc/bar/volume.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ awesome.connect_signal("signal::volume", function(vol, mute)
volume.markup = "<span foreground='"..beautiful.red.."'>󰸈</span>"
percentage.markup = "Muted"
else
if vol == nil then vol = 0 end
if vol < 20 then
volume.markup = "<span foreground='"..beautiful.red.."'>󰕿</span>"
percentage.markup = vol .. "%"
Expand Down
2 changes: 1 addition & 1 deletion conf/awesome/misc/bar/wifi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ local function get_wifi()

awful.spawn.easy_async_with_shell(get_strength, function(stdout)
local strength = tonumber(stdout)
if strength < 20 then
if strength == nil or strength < 20 then
wifi.markup = "<span foreground='"..beautiful.green.."'>󰤯</span>"
elseif strength < 40 then
wifi.markup = "<span foreground='"..beautiful.green.."'>󰤟</span>"
Expand Down
Loading