Compare commits

..

No commits in common. "744e8389017e2dbe7b667282d977fbf6076e8ab8" and "843d683a1d9f2c7f1f9e2f43b4d29db1131ff252" have entirely different histories.

8 changed files with 62 additions and 104 deletions

View File

@ -18,8 +18,6 @@ local hotkeys_popup = require("awful.hotkeys_popup")
-- when client with a matching name is opened: -- when client with a matching name is opened:
require("awful.hotkeys_popup.keys") require("awful.hotkeys_popup.keys")
---@diagnostic disable: undefined-global
-- {{{ Error handling -- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to -- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config) -- another config (This code will only ever execute for the fallback config)
@ -54,10 +52,6 @@ end
local theme = "theme_dark.lua" local theme = "theme_dark.lua"
beautiful.init(gears.filesystem.get_configuration_dir() .. theme) beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
local function set_wallpaper(s)
gears.wallpaper.set(beautiful.bg_wallpaper)
end
local function switch_theme() local function switch_theme()
if theme == "theme_dark.lua" then if theme == "theme_dark.lua" then
theme = "theme_light.lua" theme = "theme_light.lua"
@ -67,11 +61,6 @@ local function switch_theme()
awful.spawn("lupan-set-theme dark") awful.spawn("lupan-set-theme dark")
end end
beautiful.init(gears.filesystem.get_configuration_dir() .. theme) beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
set_wallpaper()
for s in screen do
awful.tag.viewtoggle(s.tags[1])
awful.tag.viewtoggle(s.tags[1])
end
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.
@ -152,6 +141,10 @@ local tasklist_buttons = gears.table.join(
awful.client.focus.byidx(-1) awful.client.focus.byidx(-1)
end)) end))
local function set_wallpaper(s)
gears.wallpaper.set(beautiful.bg_wallpaper)
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper) screen.connect_signal("property::geometry", set_wallpaper)
@ -209,7 +202,7 @@ awful.screen.connect_for_each_screen(function(s)
end) end)
-- }}} -- }}}
local function layout_menu() function layout_menu()
local layouts = {} local layouts = {}
for i, layout in pairs(awful.layout.layouts) do for i, layout in pairs(awful.layout.layouts) do
layouts[i] = layouts[i] =
@ -224,7 +217,7 @@ local function layout_menu()
end end
-- {{{ Key bindings -- {{{ Key bindings
local globalkeys = gears.table.join( globalkeys = gears.table.join(
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" }),
awful.key({ modkey, }, "Left", awful.tag.viewprev, awful.key({ modkey, }, "Left", awful.tag.viewprev,
@ -329,7 +322,7 @@ local globalkeys = gears.table.join(
{ description = "show the menubar", group = "launcher" }) { description = "show the menubar", group = "launcher" })
) )
local clientkeys = gears.table.join( clientkeys = gears.table.join(
awful.key({ modkey, }, "f", awful.key({ modkey, }, "f",
function(c) function(c)
c.fullscreen = not c.fullscreen c.fullscreen = not c.fullscreen
@ -423,7 +416,7 @@ for i = 1, 9 do
) )
end end
local clientbuttons = gears.table.join( clientbuttons = gears.table.join(
awful.button({}, 1, function(c) awful.button({}, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true }) c:emit_signal("request::activate", "mouse_click", { raise = true })
end), end),
@ -521,6 +514,21 @@ client.connect_signal("manage", function(c)
end end
end) end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.resize(c)
end)
)
end)
-- Enable sloppy focus, so that focus follows mouse. -- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c) client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", { raise = false }) c:emit_signal("request::activate", "mouse_enter", { raise = false })

View File

@ -9,18 +9,18 @@ theme.font = "GoMono Nerd Font 10.5"
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.wibar_height = 40 theme.wibar_height = 40
theme.bg_normal = "#292b3d" theme.bg_normal = "#1e293b"
theme.bg_focus = "#454654" theme.bg_focus = "#475569"
theme.bg_urgent = "#dfaa9f" theme.bg_urgent = "#ff5555"
theme.bg_minimize = "#5c5e70" theme.bg_minimize = "#444444"
theme.bg_systray = theme.bg_normal theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#3d405c" theme.tasklist_bg_focus = "#334155"
theme.fg_normal = "#7a7fb8" theme.fg_normal = "#64748B"
theme.fg_focus = "#b3b6d6" theme.fg_focus = "#94A3B8"
theme.fg_urgent = theme.bg_focus theme.fg_urgent = "#111827"
theme.fg_minimize = "#b9bac6" theme.fg_minimize = "#ffffff"
theme.taglist_fg_empty = "#535888" theme.taglist_fg_empty = "#334155"
theme.useless_gap = dpi(1) theme.useless_gap = dpi(1)
theme.border_width = dpi(2) theme.border_width = dpi(2)
@ -28,7 +28,7 @@ theme.border_normal = "#708090"
theme.border_focus = "#a0522d" theme.border_focus = "#a0522d"
theme.border_marked = "#91231c" theme.border_marked = "#91231c"
theme.bg_wallpaper = "#505262" theme.bg_wallpaper = "#4a4a4a"
-- You can use your own layout icons like this: -- You can use your own layout icons like this:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png" theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"

View File

@ -9,18 +9,18 @@ theme.font = "GoMono Nerd Font 10.5"
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.wibar_height = 40 theme.wibar_height = 40
theme.bg_normal = "#292b3d" theme.bg_normal = "#0c4a6e"
theme.bg_focus = "#999fe6" theme.bg_focus = "#0284c7"
theme.bg_urgent = "#dfaa9f" theme.bg_urgent = "#ff5555"
theme.bg_minimize = "#5c5e70" theme.bg_minimize = "#444444"
theme.bg_systray = theme.bg_normal theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#7e85cd" theme.tasklist_bg_focus = "#075985"
theme.fg_normal = "#9599c6" theme.fg_normal = "#cbd5e1"
theme.fg_focus = "#252637" theme.fg_focus = "#bae6fd"
theme.fg_urgent = theme.fg_focus theme.fg_urgent = "#111827"
theme.fg_minimize = "#b9bac6" theme.fg_minimize = "#ffffff"
theme.taglist_fg_empty = "#6469a0" theme.taglist_fg_empty = "#9ca3af"
theme.useless_gap = dpi(1) theme.useless_gap = dpi(1)
theme.border_width = dpi(2) theme.border_width = dpi(2)
@ -28,7 +28,7 @@ theme.border_normal = "#bebebe"
theme.border_focus = "#ff7f50" theme.border_focus = "#ff7f50"
theme.border_marked = "#91231c" theme.border_marked = "#91231c"
theme.bg_wallpaper = "#9d9eaf" theme.bg_wallpaper = "#dde1e3"
-- You can use your own layout icons like this: -- You can use your own layout icons like this:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png" theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"

View File

@ -1,10 +0,0 @@
alias v=nvim
alias ll='ls -l'
if which exa > /dev/null; then
alias ls='exa --icons'
alias tree='exa --tree --icons'
fi
alias nocaps='setxkbmap pl -option ctrl:nocaps'
alias fixdp='xrandr --output DP-0 --right-of DP-2'

View File

@ -1,4 +0,0 @@
alias hs='history -$HISTSIZE | rg'
alias -s pdf=zathura
alias -s {jpg,jpeg,png}=sxiv

View File

@ -6,6 +6,8 @@ export FZF_DEFAULT_OPTS='--color=bw,hl:green,hl+:green'
zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
plug "zap-zsh/supercharge"
plug "zap-zsh/exa"
plug "zap-zsh/vim" plug "zap-zsh/vim"
autoload -Uz compinit autoload -Uz compinit
@ -28,28 +30,3 @@ zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b '
zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' enable git
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b ' PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
RPROMPT='%(?..%B%F{red}%?%f%b)' RPROMPT='%(?..%B%F{red}%?%f%b)'
# History.
HISTFILE=${ZDOTDIR:-~}/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_find_no_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt inc_append_history
setopt share_history
# Convenience.
setopt autocd
bindkey -M vicmd '^[h' run-help
bindkey -M viins '^[h' run-help
# Aliases.
for f in ~/.config/shellconfig/*.sh(N) ~/.config/shellconfig/*.zsh(N); do source "$f"; done

View File

@ -1,38 +1,13 @@
set -g status-bg colour0 set -g status-bg colour0
set -g status-fg colour7 set -g status-fg colour7
set -g prefix C-t
bind-key C-t send-prefix
bind-key C-j select-pane -D bind-key C-j select-pane -D
bind-key C-k select-pane -U bind-key C-k select-pane -U
bind-key C-h select-pane -L bind-key C-h select-pane -L
bind-key C-l select-pane -R bind-key C-l select-pane -R
bind-key j switch-client -n
bind-key k switch-client -p
bind-key h previous-window
bind-key l next-window
bind-key t last-window
bind-key T switch-client -l
bind -n S-Left previous-window
bind -n S-Right next-window
bind -n C-S-Left swap-window -t -1
bind -n C-S-Right swap-window -t 1
bind -n S-Up switch-client -p
bind -n S-Down switch-client -n
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
set -as terminal-features ",xterm-256color:RGB"
set -g base-index 1
setw -g base-index 1
set -g set-titles on set -g set-titles on
set -g set-titles-string "#H [#S]" set -g set-titles-string "[#S] #P:#W #T"
set -g status-justify centre
set -g status-left "#[bg=green]#[fg=black] #H #[bg=default]#[fg=default] #S"
set -g status-left-length 50
set -g status-right "#[bg=green]#[fg=black] %H:%M "
set-window-option -g window-status-current-style bg=green
set-window-option -ga window-status-current-style fg=black

View File

@ -11,14 +11,21 @@ if [ "$THEME" = "toggle" ]; then
fi fi
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
BGCOLOR=#4a4a4a
GTK_THEME=Materia-dark GTK_THEME=Materia-dark
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
BGCOLOR=#cacaca
GTK_THEME=Materia-light GTK_THEME=Materia-light
else else
echo "error: unknown theme: should be either dark, light or toggle" >&2 echo "error: unknown theme: should be either dark, light or toggle" >&2
exit 1 exit 1
fi fi
# Background color
if [ ! -x ~/.fehbg ]; then
hsetroot -solid "$BGCOLOR"
fi
# Alacritty # Alacritty
if [ -f ~/.config/alacritty/alacritty.yml ]; then if [ -f ~/.config/alacritty/alacritty.yml ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
@ -29,3 +36,8 @@ if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf
pkill -HUP -x xsettingsd pkill -HUP -x xsettingsd
fi fi
# Emacs
if which emacsclient > /dev/null; then
emacsclient --eval "(my-select-theme '$THEME)"
fi