Clean up awesome, add utils, remove vterm and add some more to emacs

This commit is contained in:
Leon Grünewald 2021-01-30 17:37:50 +01:00
parent f022689a83
commit f59fa65eee
3 changed files with 19 additions and 98 deletions

View file

@ -55,87 +55,45 @@ end
-- {{{ Autostart windowless processes -- {{{ Autostart windowless processes
-- This function will run once every time Awesome is started
local function run_once(cmd_arr) local function run_once(cmd_arr)
for _, cmd in ipairs(cmd_arr) do for _, cmd in ipairs(cmd_arr) do
awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd))
end end
end end
-- run_once({ "unclutter -root" }) -- entries must be separated by commas
awful.spawn.with_shell("picom -b --config $HOME/.config/picom.conf")
-- This function implements the XDG autostart specification
awful.spawn.with_shell( awful.spawn.with_shell(
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
'xrdb -merge <<< "awesome.started:true";' .. 'xrdb -merge <<< "awesome.started:true";' ..
-- list each of your autostart commands, followed by ; inside single quotes, followed by .. 'picom -b --config ~/.config/picom.conf' ..
'dex-autostart --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' .. -- https://github.com/jceb/dex 'dex-autostart --environment Awesome --autostart --search-paths "~/.config/autostart:~/autostart"' ..
'pipewire' .. 'pipewire' ..
'pipewire-pulse' 'pipewire-pulse'
) )
-- }}}
-- {{{ Variable definitions -- {{{ Variable definitions
local themes = { local chosen_theme = "copland"
"blackburn", -- 1
"copland", -- 2
"dremora", -- 3
"holo", -- 4
"multicolor", -- 5
"powerarrow", -- 6
"powerarrow-dark", -- 7
"rainbow", -- 8
"steamburn", -- 9
"vertex", -- 10
}
local chosen_theme = themes[2]
local modkey = "Mod4" local modkey = "Mod4"
local altkey = "Mod1" local altkey = "Mod1"
local terminal = "urxvtc" local terminal = "guake"
local vi_focus = false -- vi-like client focus - https://github.com/lcpz/awesome-copycats/issues/275 local vi_focus = false -- vi-like client focus - https://github.com/lcpz/awesome-copycats/issues/275
local cycle_prev = true -- cycle trough all previous client or just the first -- https://github.com/lcpz/awesome-copycats/issues/274 local cycle_prev = true -- cycle trough all previous client or just the first -- https://github.com/lcpz/awesome-copycats/issues/274
local editor = os.getenv("EDITOR") or "vim" local editor = os.getenv("EDITOR") or "vim"
local gui_editor = os.getenv("GUI_EDITOR") or "gvim" local gui_editor = os.getenv("GUI_EDITOR") or "emacs"
local browser = os.getenv("BROWSER") or "firefox" local browser = os.getenv("BROWSER") or "firefox"
local scrlocker = "slock" local scrlocker = "slock"
awful.util.terminal = terminal awful.util.terminal = terminal
awful.util.tagnames = { "1", "2", "3", "4", "5" } awful.util.tagnames = { "Work", "Message", "Offwork"}
awful.layout.layouts = { awful.layout.layouts = {
awful.layout.suit.max, awful.layout.suit.max,
awful.layout.suit.magnifier, awful.layout.suit.magnifier,
awful.layout.suit.spiral,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.fair, awful.layout.suit.fair,
awful.layout.suit.fair.horizontal, awful.layout.suit.fair.horizontal,
awful.layout.suit.corner.nw, awful.layout.suit.tile,
awful.layout.suit.corner.ne, awful.layout.suit.spiral,
--awful.layout.suit.floating,
--awful.layout.suit.tile,
--awful.layout.suit.tile.left,
--awful.layout.suit.tile.bottom,
--awful.layout.suit.tile.top,
--awful.layout.suit.fair,
--awful.layout.suit.fair.horizontal,
--awful.layout.suit.spiral,
--awful.layout.suit.spiral.dwindle,
--awful.layout.suit.max,
--awful.layout.suit.max.fullscreen,
--awful.layout.suit.magnifier,
--awful.layout.suit.corner.nw,
--awful.layout.suit.corner.ne,
--awful.layout.suit.corner.sw,
--awful.layout.suit.corner.se,
--lain.layout.cascade,
--lain.layout.cascade.tile,
--lain.layout.centerwork,
--lain.layout.centerwork.horizontal,
--lain.layout.termfair,
--lain.layout.termfair.center,
} }
awful.util.taglist_buttons = my_table.join( awful.util.taglist_buttons = my_table.join(
@ -268,15 +226,9 @@ root.buttons(my_table.join(
-- {{{ Key bindings -- {{{ Key bindings
globalkeys = my_table.join( globalkeys = my_table.join(
-- Take a screenshot
-- https://github.com/lcpz/dots/blob/master/bin/screenshot
-- awful.key({ altkey }, "p", function() os.execute("screenshot") end,
-- {description = "take a screenshot", group = "hotkeys"}),
-- X screen locker -- X screen locker
awful.key({ altkey, "Control" }, "l", function () os.execute(scrlocker) end, awful.key({ altkey, "Control" }, "l", function () os.execute(scrlocker) end,
{description = "lock screen", group = "hotkeys"}), {description = "lock screen", group = "hotkeys"}),
-- Hotkeys -- Hotkeys
awful.key({ modkey, }, "s", hotkeys_popup.show_help, awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description = "show help", group="awesome"}), {description = "show help", group="awesome"}),
@ -288,12 +240,6 @@ globalkeys = my_table.join(
awful.key({ modkey, }, "Escape", awful.tag.history.restore, awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}), {description = "go back", group = "tag"}),
-- Non-empty tag browsing
-- awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end,
-- {description = "view previous nonempty", group = "tag"}),
-- awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end,
-- {description = "view previous nonempty", group = "tag"}),
-- Default client focus -- Default client focus
awful.key({ modkey, }, "j", awful.key({ modkey, }, "j",
function () function ()
@ -381,12 +327,6 @@ globalkeys = my_table.join(
end, end,
{description = "toggle wibox", group = "awesome"}), {description = "toggle wibox", group = "awesome"}),
-- On the fly useless gaps change
awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end,
{description = "increment useless gaps", group = "tag"}),
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end,
{description = "decrement useless gaps", group = "tag"}),
-- Dynamic tagging -- Dynamic tagging
awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end, awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end,
{description = "add new tag", group = "tag"}), {description = "add new tag", group = "tag"}),
@ -540,27 +480,6 @@ globalkeys = my_table.join(
awful.key({ modkey }, "p", function() menubar.show() end, awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"}), {description = "show the menubar", group = "launcher"}),
-- Default
--[[ Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"})
--]]
--[[ dmenu
awful.key({ modkey }, "x", function ()
os.execute(string.format("dmenu_run -i -fn 'Monospace' -nb '%s' -nf '%s' -sb '%s' -sf '%s'",
beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus))
end,
{description = "show dmenu", group = "launcher"})
--]]
-- alternatively use rofi, a dmenu-like application with more features
-- check https://github.com/DaveDavenport/rofi for more details
--[[ rofi
awful.key({ modkey }, "x", function ()
os.execute(string.format("rofi -show %s -theme %s",
'run', 'dmenu'))
end,
{description = "show rofi", group = "launcher"}),
--]]
-- Prompt -- Prompt
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"}), {description = "run prompt", group = "launcher"}),
@ -810,3 +729,5 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n
-- possible workaround for tag preservation when switching back to default screen: -- possible workaround for tag preservation when switching back to default screen:
-- https://github.com/lcpz/awesome-copycats/issues/251 -- https://github.com/lcpz/awesome-copycats/issues/251
-- }}} -- }}}
lain.util.useless_gaps_resize(2)

View file

@ -40,9 +40,9 @@
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows (popup +defaults) ; tame sudden yet inevitable temporary windows
;;pretty-code ; ligatures or substitute text with pretty symbols ;;pretty-code ; ligatures or substitute text with pretty symbols
;;tabs ; an tab bar for Emacs tabs ; an tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows ;;window-select ; visually switch windows
@ -74,7 +74,7 @@
;;eshell ; the elisp shell that works everywhere ;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs ;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs ;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs ;;vterm ; the best terminal emulation in Emacs
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
@ -107,7 +107,7 @@
:lang :lang
;;agda ; types of types of types of types... ;;agda ; types of types of types of types...
cc ; C/C++/Obj-C madness cc ; C/C++/Obj-C madness
;;clojure ; java with a lisp clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all ;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs ;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
@ -131,7 +131,7 @@
;;(java +meghanada) ; the poster child for carpal tunnel syndrome ;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here)))))) javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB ;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun latex ; writing papers in Emacs has never been so fun
;;lean ;;lean
;;factor ;;factor

View file

@ -16,7 +16,7 @@ sudo dnf config-manager --set-enabled fedora-cisco-openh264
echo 'Installing base packages...' echo 'Installing base packages...'
sudo dnf install -y \ sudo dnf install -y \
git tar zsh neofetch which util-linux-user vim-enhanced git tar zsh ack neofetch which util-linux-user vim-enhanced
echo 'Installing fonts' echo 'Installing fonts'
sudo dnf install -y \ sudo dnf install -y \
@ -33,7 +33,7 @@ sudo dnf install -y \
echo 'Install my desktop stuff...' echo 'Install my desktop stuff...'
sudo dnf install -y \ sudo dnf install -y \
awesome picom ibus ibus-x11 pipewire pipewire-pulse dex-autostart pavucontrol awesome picom ibus ibus-x11 pipewire pipewire-pulse dex-autostart pavucontrol alsa-utils
echo 'Installing graphical applications...' echo 'Installing graphical applications...'
sudo dnf install -y \ sudo dnf install -y \