Compare commits
3 Commits
wip
...
2c4a011a91
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c4a011a91 | |||
| 21fdfcb77b | |||
| 950d782a11 |
@@ -54,14 +54,12 @@ end
|
||||
|
||||
local function read_theme()
|
||||
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 string.find(f:read('*all'), 'light') then
|
||||
theme = 'theme_light.lua'
|
||||
end
|
||||
theme = 'theme_light.lua'
|
||||
f:close()
|
||||
return theme
|
||||
end
|
||||
return theme
|
||||
end
|
||||
|
||||
local theme = read_theme()
|
||||
@@ -88,7 +86,7 @@ local function switch_theme()
|
||||
end
|
||||
|
||||
-- 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.
|
||||
local modkey = "Mod4"
|
||||
@@ -236,13 +234,15 @@ local function layout_menu()
|
||||
awful.menu(layouts):show()
|
||||
end
|
||||
|
||||
local function focus_nth_window (n)
|
||||
local function focus_nth_window(n)
|
||||
local cc = {}
|
||||
for _, c in ipairs(client.get()) do
|
||||
if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end
|
||||
end
|
||||
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
|
||||
|
||||
-- {{{ Key bindings
|
||||
@@ -296,7 +296,7 @@ local globalkeys = gears.table.join(
|
||||
{ description = "open a terminal", group = "launcher" }),
|
||||
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
|
||||
{ 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" }),
|
||||
awful.key({ modkey, }, "q", awesome.restart,
|
||||
{ description = "reload awesome", group = "awesome" }),
|
||||
@@ -347,7 +347,7 @@ local globalkeys = gears.table.join(
|
||||
end,
|
||||
{ description = "lua execute prompt", group = "awesome" }),
|
||||
-- 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" })
|
||||
)
|
||||
|
||||
@@ -377,11 +377,11 @@ local clientkeys = gears.table.join(
|
||||
{ description = "minimize", group = "client" }),
|
||||
awful.key({ modkey, }, "m",
|
||||
function(c)
|
||||
if awful.layout.getname() == "max" then
|
||||
awful.layout.set(awful.layout.suit.tile)
|
||||
else
|
||||
awful.layout.set(awful.layout.suit.max)
|
||||
end
|
||||
if awful.layout.getname() == "max" then
|
||||
awful.layout.set(awful.layout.suit.tile)
|
||||
else
|
||||
awful.layout.set(awful.layout.suit.max)
|
||||
end
|
||||
end,
|
||||
{ description = "(un)maximize", group = "client" }),
|
||||
awful.key({ modkey, }, "v",
|
||||
@@ -539,15 +539,15 @@ awful.rules.rules = {
|
||||
-- {{{ Signals
|
||||
|
||||
local function set_border_width(c)
|
||||
local t = awful.screen.focused().selected_tag
|
||||
if #t:clients() == 1 or t.layout.name == 'max' then
|
||||
c = c or client.focus
|
||||
c.border_width = 0
|
||||
else
|
||||
for _, cl in ipairs(t:clients()) do
|
||||
cl.border_width = beautiful.border_width
|
||||
end
|
||||
local t = awful.screen.focused().selected_tag
|
||||
if #t:clients() == 1 or t.layout.name == 'max' then
|
||||
c = c or client.focus
|
||||
c.border_width = 0
|
||||
else
|
||||
for _, cl in ipairs(t:clients()) do
|
||||
cl.border_width = beautiful.border_width
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Signal function to execute when a new client appears.
|
||||
@@ -571,20 +571,20 @@ client.connect_signal("mouse::enter", function(c)
|
||||
end)
|
||||
|
||||
-- local function set_border(c)
|
||||
-- local s = awful.screen.focused()
|
||||
-- if c.maximized
|
||||
-- or (#s.tiled_clients == 1 and not c.floating)
|
||||
-- or (s.selected_tag and s.selected_tag.layout.name == 'max')
|
||||
-- then
|
||||
-- c.border_width = 0
|
||||
-- else
|
||||
-- c.border_width = beautiful.border_width
|
||||
-- end
|
||||
-- local s = awful.screen.focused()
|
||||
-- if c.maximized
|
||||
-- or (#s.tiled_clients == 1 and not c.floating)
|
||||
-- or (s.selected_tag and s.selected_tag.layout.name == 'max')
|
||||
-- then
|
||||
-- c.border_width = 0
|
||||
-- else
|
||||
-- c.border_width = beautiful.border_width
|
||||
-- end
|
||||
-- end
|
||||
|
||||
client.connect_signal("focus", function(c)
|
||||
c.border_color = beautiful.border_focus
|
||||
set_border_width(c)
|
||||
c.border_color = beautiful.border_focus
|
||||
set_border_width(c)
|
||||
end)
|
||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal; end)
|
||||
tag.connect_signal("property::layout", function() set_border_width(nil) end)
|
||||
|
||||
@@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi
|
||||
|
||||
local theme = {}
|
||||
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.font = "HurmitNerdFont 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 30
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi
|
||||
|
||||
local theme = {}
|
||||
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.font = "HurmitNerdFont 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 30
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
font_family FiraCode Nerd
|
||||
font_family HurmitNerdFont
|
||||
font_size 11
|
||||
|
||||
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
|
||||
|
||||
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+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+2 goto_tab 2
|
||||
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+8 goto_tab 8
|
||||
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
|
||||
# Afterglow
|
||||
# Kanagawa
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
||||
|
||||
@@ -74,6 +74,9 @@ if ok then
|
||||
set("n", "<leader>ep", function()
|
||||
builtin.find_files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
|
||||
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>F", builtin.find_files, { desc = "Telescope find files" })
|
||||
set("n", "<leader>fh", function()
|
||||
|
||||
@@ -28,17 +28,18 @@ xsettingsd &
|
||||
|
||||
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
|
||||
|
||||
if which dwm > /dev/null; then
|
||||
lupan-clock &
|
||||
exec dwm
|
||||
fi
|
||||
picom -b -I 1 -O 1 -e 1 --no-fading-openclose --backend glx || compton -b --no-fading-openclose
|
||||
|
||||
if which awesome > /dev/null; then
|
||||
exec awesome
|
||||
fi
|
||||
|
||||
if which dwm > /dev/null; then
|
||||
dunst &
|
||||
lupan-clock &
|
||||
exec dwm
|
||||
fi
|
||||
|
||||
if which dk > /dev/null; then
|
||||
for m in $(polybar --list-monitors | cut -d: -f1); do
|
||||
MONITOR=$m polybar --reload bar &
|
||||
|
||||
@@ -46,9 +46,9 @@ fi
|
||||
|
||||
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
|
||||
if [ "$THEME" = dark ]; then
|
||||
kitten themes --reload-in=all Afterglow
|
||||
kitten themes --reload-in=all Kanagawa
|
||||
elif [ "$THEME" = light ]; then
|
||||
kitten themes --reload-in=all One Half Light
|
||||
kitten themes --reload-in=all Dayfox
|
||||
fi
|
||||
|
||||
# GTK
|
||||
|
||||
Reference in New Issue
Block a user