Skip to content

Commit

Permalink
awesomeWM fish
Browse files Browse the repository at this point in the history
  • Loading branch information
SushiJ committed Oct 31, 2023
1 parent d4d6e52 commit 66a43a6
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 39 deletions.
81 changes: 42 additions & 39 deletions awesome/.config/awesome/rc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,44 +169,65 @@ end)

-- {{{ Key bindings
globalkeys = gears.table.join(

-- awesome
awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
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 }, "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" }),

-- 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" }),

-- client
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" }),

-- 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" }),
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" }),

-- Standard program
-- launcher
awful.key({ modkey }, "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, "Shift" }, "a", function()
awful.spawn("pavucontrol")
end, { description = "Open pavucontrol", group = "launcher" }),
awful.key({ modkey }, "r", function()
awful.screen.focused().mypromptbox:run()
end, { description = "run prompt", group = "launcher" }),

-- layout
awful.key({ modkey }, "l", function()
awful.tag.incmwfact(0.05)
end, { description = "increase master width factor", group = "layout" }),
Expand All @@ -232,29 +253,18 @@ globalkeys = gears.table.join(
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" })
-- screen
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" })
)

-- Set keys
root.keys(globalkeys)
-- }}}
clientkeys = gears.table.join(
awful.key({ modkey }, "f", function(c)
c.fullscreen = not c.fullscreen
Expand Down Expand Up @@ -297,9 +307,6 @@ clientkeys = gears.table.join(
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, 9 do
globalkeys = gears.table.join(
globalkeys,
Expand Down Expand Up @@ -354,10 +361,6 @@ clientbuttons = gears.table.join(
end)
)

-- Set keys
root.keys(globalkeys)
-- }}}

-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
Expand Down
41 changes: 41 additions & 0 deletions fish/.config/fish/themes/rose_pine.theme
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# syntax highlighting variables
# https://fishshell.com/docs/current/interactive.html#syntax-highlighting-variables
fish_color_normal e0def4
fish_color_command c4a7e7
fish_color_keyword 9ccfd8
fish_color_quote f6c177
fish_color_redirection 31748f
fish_color_end 908caa
fish_color_error eb6f92
fish_color_param ebbcba
fish_color_comment 908caa
# fish_color_match --background=brblue
fish_color_selection --reverse
# fish_color_history_current --bold
fish_color_operator e0def4
fish_color_escape 31748f
fish_color_autosuggestion 908caa
fish_color_cwd ebbcba
# fish_color_cwd_root red
fish_color_user f6c177
fish_color_host 9ccfd8
fish_color_host_remote c4a7e7
fish_color_cancel e0def4
fish_color_search_match --background=191724
fish_color_valid_path

# pager color variables
# https://fishshell.com/docs/current/interactive.html#pager-color-variables
fish_pager_color_progress ebbcba
fish_pager_color_background --background=1f1d2e
fish_pager_color_prefix 9ccfd8
fish_pager_color_completion 908caa
fish_pager_color_description 908caa
fish_pager_color_secondary_background
fish_pager_color_secondary_prefix
fish_pager_color_secondary_completion
fish_pager_color_secondary_description
fish_pager_color_selected_background --background=26233a
fish_pager_color_selected_prefix 9ccfd8
fish_pager_color_selected_completion e0def4
fish_pager_color_selected_description e0def4

0 comments on commit 66a43a6

Please sign in to comment.