Compare commits

...

3 Commits

7 changed files with 83 additions and 54 deletions

View File

@@ -54,14 +54,12 @@ end
local function read_theme() local function read_theme()
local theme = "theme_dark.lua" local theme = "theme_dark.lua"
local f = io.open(os.getenv('HOME') .. '/.config/alacritty/alacritty.toml') local f = io.open(os.getenv('HOME') .. '/.lightmode')
if f then if f then
if string.find(f:read('*all'), 'light') then
theme = 'theme_light.lua' theme = 'theme_light.lua'
end
f:close() f:close()
return theme
end end
return theme
end end
local theme = read_theme() local theme = read_theme()
@@ -88,7 +86,7 @@ local function switch_theme()
end end
-- This is used later as the default terminal and editor to run. -- This is used later as the default terminal and editor to run.
local terminal = "st" local terminal = "kitty --single-instance --instance-group default"
-- Default modkey. -- Default modkey.
local modkey = "Mod4" local modkey = "Mod4"
@@ -236,13 +234,15 @@ local function layout_menu()
awful.menu(layouts):show() awful.menu(layouts):show()
end end
local function focus_nth_window (n) local function focus_nth_window(n)
local cc = {} local cc = {}
for _, c in ipairs(client.get()) do for _, c in ipairs(client.get()) do
if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end
end end
local new_focused = cc[n] local new_focused = cc[n]
if new_focused then client.focus = new_focused; new_focused:raise() end if new_focused then
client.focus = new_focused; new_focused:raise()
end
end end
-- {{{ Key bindings -- {{{ Key bindings
@@ -296,7 +296,7 @@ local globalkeys = gears.table.join(
{ description = "open a terminal", group = "launcher" }), { description = "open a terminal", group = "launcher" }),
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end, awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
{ description = "open a terminal", group = "launcher" }), { description = "open a terminal", group = "launcher" }),
awful.key({ modkey, "Shift" }, "F6", switch_theme, awful.key({ modkey, "Control", "Shift" }, "t", switch_theme,
{ description = "switch theme", group = "launcher" }), { description = "switch theme", group = "launcher" }),
awful.key({ modkey, }, "q", awesome.restart, awful.key({ modkey, }, "q", awesome.restart,
{ description = "reload awesome", group = "awesome" }), { description = "reload awesome", group = "awesome" }),
@@ -347,7 +347,7 @@ local globalkeys = gears.table.join(
end, end,
{ description = "lua execute prompt", group = "awesome" }), { description = "lua execute prompt", group = "awesome" }),
-- Menubar -- Menubar
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end, awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'HurmitNerdFont:size=16'") end,
{ description = "run command", group = "launcher" }) { description = "run command", group = "launcher" })
) )
@@ -571,15 +571,15 @@ client.connect_signal("mouse::enter", function(c)
end) end)
-- local function set_border(c) -- local function set_border(c)
-- local s = awful.screen.focused() -- local s = awful.screen.focused()
-- if c.maximized -- if c.maximized
-- or (#s.tiled_clients == 1 and not c.floating) -- or (#s.tiled_clients == 1 and not c.floating)
-- or (s.selected_tag and s.selected_tag.layout.name == 'max') -- or (s.selected_tag and s.selected_tag.layout.name == 'max')
-- then -- then
-- c.border_width = 0 -- c.border_width = 0
-- else -- else
-- c.border_width = beautiful.border_width -- c.border_width = beautiful.border_width
-- end -- end
-- end -- end
client.connect_signal("focus", function(c) client.connect_signal("focus", function(c)

View File

@@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi
local theme = {} local theme = {}
theme.font = "Fira Code Nerd Font 10" theme.font = "HurmitNerdFont 10"
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.wibar_height = 30 theme.wibar_height = 30

View File

@@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi
local theme = {} local theme = {}
theme.font = "Fira Code Nerd Font 10" theme.font = "HurmitNerdFont 10"
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.wibar_height = 30 theme.wibar_height = 30

View File

@@ -1,20 +1,20 @@
font_family FiraCode Nerd font_family HurmitNerdFont
font_size 11 font_size 11
cursor_blink_interval 0 cursor_blink_interval 0
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title} {index}" tab_bar_style powerline
tab_bar_filter session:~ or session:^$
tab_title_template "{index}:{session_name}:{bell_symbol}{activity_symbol}{title}"
tab_powerline_style round
open_url_with qutebrowser
action_alias launch_tab launch --type=tab --cwd=current action_alias launch_tab launch --type=tab --cwd=current
map ctrl+shift+n launch_tab tmux
map ctrl+shift+t launch_tab tmux attach
map ctrl+shift+s launch_tab zsh
map ctrl+shift+6 no_op map ctrl+shift+6 no_op
map ctrl+shift+0 nth_window -1
map ctrl+shift+h previous_tab
map ctrl+shift+l next_tab
map ctrl+shift+p goto_tab -1
map ctrl+alt+1 goto_tab 1 map ctrl+alt+1 goto_tab 1
map ctrl+alt+2 goto_tab 2 map ctrl+alt+2 goto_tab 2
map ctrl+alt+3 goto_tab 3 map ctrl+alt+3 goto_tab 3
@@ -24,9 +24,34 @@ map ctrl+alt+6 goto_tab 6
map ctrl+alt+7 goto_tab 7 map ctrl+alt+7 goto_tab 7
map ctrl+alt+8 goto_tab 8 map ctrl+alt+8 goto_tab 8
map ctrl+alt+9 goto_tab 9 map ctrl+alt+9 goto_tab 9
map ctrl+alt+0 goto_tab 10 map ctrl+alt+0 goto_tab -1
map ctrl+alt+h neighboring_window left
map ctrl+alt+j neighboring_window down
map ctrl+alt+k neighboring_window up
map ctrl+alt+l neighboring_window right
map ctrl+alt+return last_used_layout
map ctrl+alt+f goto_layout fat
map ctrl+alt+g goto_layout grid
map ctrl+alt+v goto_layout tall
map ctrl+alt+space goto_session -1
map ctrl+alt+e launch_tab nvim
map ctrl+alt+m toggle_layout stack
map ctrl+alt+o goto_session ~/.config/kitty/sessions
map ctrl+alt+s launch --stdin-source=@screen_scrollback --type=overlay nvim -R -
map ctrl+alt+w new_window_with_cwd
map ctrl+alt+t new_tab_with_cwd
map ctrl+alt+x close_window_with_confirmation
map ctrl+alt+y new_window nvim @selection
map ctrl+alt+shift+s save_as_session --base-dir ~/.config/kitty/sessions --match=session:.
map ctrl+alt+shift+t detach_tab
map ctrl+alt+shift+w detach_window
map ctrl+alt+shift+x close_session .
# BEGIN_KITTY_THEME # BEGIN_KITTY_THEME
# Afterglow # Kanagawa
include current-theme.conf include current-theme.conf
# END_KITTY_THEME # END_KITTY_THEME

View File

@@ -74,6 +74,9 @@ if ok then
set("n", "<leader>ep", function() set("n", "<leader>ep", function()
builtin.find_files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") }) builtin.find_files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
end, { desc = "Telescope find files" }) end, { desc = "Telescope find files" })
set("n", "<leader>es", function()
builtin.find_files({ cwd = vim.fs.normalize('~/.config/kitty/sessions') })
end, { desc = "Telescope kitty sessions" })
set("n", "<leader>fa", builtin.git_files, { desc = "Telescope nvim package files" }) set("n", "<leader>fa", builtin.git_files, { desc = "Telescope nvim package files" })
set("n", "<leader>F", builtin.find_files, { desc = "Telescope find files" }) set("n", "<leader>F", builtin.find_files, { desc = "Telescope find files" })
set("n", "<leader>fh", function() set("n", "<leader>fh", function()

View File

@@ -28,17 +28,18 @@ xsettingsd &
xsetroot -cursor_name left_ptr xsetroot -cursor_name left_ptr
picom -b -I 1 -O 1 -i 1 -e 1 --no-fading-openclose --backend glx || compton -b --no-fading-openclose picom -b -I 1 -O 1 -e 1 --no-fading-openclose --backend glx || compton -b --no-fading-openclose
if which dwm > /dev/null; then
lupan-clock &
exec dwm
fi
if which awesome > /dev/null; then if which awesome > /dev/null; then
exec awesome exec awesome
fi fi
if which dwm > /dev/null; then
dunst &
lupan-clock &
exec dwm
fi
if which dk > /dev/null; then if which dk > /dev/null; then
for m in $(polybar --list-monitors | cut -d: -f1); do for m in $(polybar --list-monitors | cut -d: -f1); do
MONITOR=$m polybar --reload bar & MONITOR=$m polybar --reload bar &

View File

@@ -46,9 +46,9 @@ fi
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf) XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
kitten themes --reload-in=all Afterglow kitten themes --reload-in=all Kanagawa
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
kitten themes --reload-in=all One Half Light kitten themes --reload-in=all Dayfox
fi fi
# GTK # GTK