Compare commits

..

8 Commits

11 changed files with 149 additions and 53 deletions

View File

@@ -88,7 +88,7 @@ local function switch_theme()
end
-- This is used later as the default terminal and editor to run.
local terminal = "alacritty"
local terminal = "st"
-- Default modkey.
local modkey = "Mod4"
@@ -123,7 +123,7 @@ local mykeyboardlayout = awful.widget.keyboardlayout()
-- {{{ Wibar
-- Create a textclock widget
local mytextclock = wibox.widget.textclock()
local mytextclock = wibox.widget.textclock('%H:%M ')
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
@@ -236,6 +236,15 @@ local function layout_menu()
awful.menu(layouts):show()
end
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
end
-- {{{ Key bindings
local globalkeys = gears.table.join(
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
@@ -368,8 +377,11 @@ local clientkeys = gears.table.join(
{ description = "minimize", group = "client" }),
awful.key({ modkey, }, "m",
function(c)
c.maximized = not c.maximized
c:raise()
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",
@@ -432,7 +444,11 @@ for i = 1, 9 do
end
end
end,
{ description = "toggle focused client on tag #" .. i, group = "tag" })
{ description = "toggle focused client on tag #" .. i, group = "tag" }),
--- Focus nth window
awful.key({ "Control" }, "#" .. i + 9,
function() focus_nth_window(i) end,
{ description = "focus window index #" .. i, group = "client" })
)
end

View File

@@ -9,26 +9,26 @@ theme.font = "Fira Code Nerd Font 10"
theme.tasklist_disable_icon = true
theme.wibar_height = 30
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
theme.bg_focus = "#478575" -- hsl(165deg 30% 40%)
theme.bg_urgent = "#5c3d45" -- hsl(345deg 20% 30%)
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
theme.bg_focus = "#316781" -- hsl(200 45% 35%)
theme.bg_urgent = "#814c31" -- hsl(20 45% 35%)
theme.bg_minimize = "#454f54" -- hsl(200 10% 30%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#3d5c54" -- hsl(165deg 20% 30%)
theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%)
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
theme.fg_focus = "#b1babd"
theme.fg_normal = "#73848c" -- hsl(200 10% 50%)
theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%)
theme.fg_urgent = theme.bg_focus
theme.fg_minimize = "#8a9294"
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
theme.fg_minimize = theme.fg_normal
theme.taglist_fg_empty = "#454f54" -- hsl(200 10% 30%)
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
theme.border_normal = "#708090"
theme.border_focus = "#a0522d"
theme.border_marked = "#91231c"
theme.border_normal = "#73848c" -- hsl(200 10% 50%)
theme.border_focus = "#b25e34" -- hsl(20 55% 45%)
theme.border_marked = "#3488b2" -- hsl(200 55% 45%)
theme.bg_wallpaper = "#424a4c"
theme.bg_wallpaper = "#454f54" -- hsl(200 10% 30%)
theme.hotkeys_font = theme.font
theme.hotkeys_description_font = theme.font

View File

@@ -9,26 +9,26 @@ theme.font = "Fira Code Nerd Font 10"
theme.tasklist_disable_icon = true
theme.wibar_height = 30
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
theme.bg_focus = "#a9d6ca" -- hsl(165deg 35% 75%)
theme.bg_urgent = "#bc8f9b" -- hsl(345deg 25% 65%)
theme.bg_minimize = "#62847b" -- hsl(165deg 15% 45%)
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
theme.bg_focus = "#d0e3fb" -- hsl(214 85% 90%)
theme.bg_urgent = "#f2d1a6" -- hsl(34 75% 80%)
theme.bg_minimize = "#8596ad" -- hsl(214 20% 60%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#8fbcb1" -- hsl(165deg 25% 65%)
theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%)
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
theme.fg_focus = "#363d3e"
theme.fg_urgent = "#e9f2f5"
theme.fg_minimize = "#4b5456"
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
theme.fg_normal = "#a9bcd6" -- hsl(214 35% 75%)
theme.fg_focus = "#454b54" -- hsl(214 10% 30%)
theme.fg_urgent = "#70675c" -- hsl(34 10% 40%)
theme.fg_minimize = "#70675c" -- hsl(34 10% 40%)
theme.taglist_fg_empty = theme.fg_minimize
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
theme.border_normal = "#bebebe"
theme.border_focus = "#ff7f50"
theme.border_marked = "#91231c"
theme.border_normal = theme.bg_minimize
theme.border_focus = "#df8c20" -- hsl(34 75% 50%)
theme.border_marked = "#2073df" -- hsl(214 75% 50%)
theme.bg_wallpaper = "#b0bec2"
theme.bg_wallpaper = theme.fg_normal
theme.hotkeys_font = theme.font
theme.hotkeys_description_font = theme.font

View File

@@ -0,0 +1,9 @@
os:
edit: 'vis {{filename}}'
editAtLine: 'vis +:{{line}} {{filename}}'
editAtLineAndWait: 'vis +:{{line}} {{filename}}'
editInTerminal: true
openDirInEditor: 'vis {{dir}}'
gui:
nerdFontsVersion: "3"

View File

@@ -1,9 +1,6 @@
alias v=nvim
alias v=vis
alias ll='ls -l'
alias ta='tmux attach -t'
alias tl='tmux list-sessions'
alias tn='tmux new -s'
alias fv='fzf --preview="bat --color=always --theme=Nord {}" --bind="enter:become(nvim {})"'
alias rgh='rg -.'
alias fdh='fd -H'
@@ -15,10 +12,22 @@ fi
alias nocaps='setxkbmap pl -option ctrl:nocaps'
alias fixdp='xrandr --output DP-0 --right-of DP-2'
vf() {
if [ -z "$1" ]; then
vis $(fzf)
tn() {
if [ $# -eq 0 ]; then
tmux new
else
vis $(fzf -q $1)
tmux new -s "$@"
fi
}
ta() {
if [ $# -eq 0 ]; then
tmux attach
else
tmux attach -t "$@"
fi
}
vf() {
fzf --bind 'enter:become:vis {}' -q "$1"
}

View File

@@ -33,20 +33,20 @@ bind-key Left resize-pane -L 8
bind-key Up resize-pane -U 4
bind-key Down resize-pane -D 4
set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
set -as terminal-features ",*:RGB"
set -g base-index 1
setw -g base-index 1
set -g set-titles on
set -g set-titles-string "#H [#S]"
set -g set-titles-string "#H [#S] #W"
set -g status-justify centre
set -g status-left " #[fg=green]#[bg=green]#[fg=black] #H #[bg=default]#[fg=green]#[fg=default] #S"
set -g status-left " #[fg=#316781]#[bg=#316781]#[fg=#abb5ba] #H #[bg=default]#[fg=#316781]#[fg=default] #S"
set -g status-left-length 50
set -g status-right "#[fg=green]#[bg=green]#[fg=black] %H:%M #[bg=default]#[fg=green] "
set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W#F #[fg=green]#[bg=black]'
set -g status-right "#[fg=#316781]#[bg=#316781]#[fg=#abb5ba] %H:%M #[bg=default]#[fg=#316781] "
set-window-option -g window-status-current-format '#[fg=#316781]#[bg=#316781]#[fg=#abb5ba] #I:#W#F #[fg=#316781]#[bg=black]'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
@@ -85,3 +85,7 @@ bind-key -T copy-mode-vi C-M-k swap-pane -s "{up-of}"
bind-key -T copy-mode-vi C-M-l swap-pane -s "{right-of}"
bind-key -n M-0 run-shell tmux-session-menu
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind P paste-buffer

View File

@@ -31,8 +31,8 @@ lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:#e6fefe'
lexers.STYLE_CURSOR_LINE = 'underlined'
lexers.STYLE_COLOR_COLUMN = 'back:red'
lexers.STYLE_SELECTION = 'back:#4d5580,bold'
lexers.STYLE_STATUS = 'reverse'
lexers.STYLE_STATUS_FOCUSED = 'reverse,bold'
lexers.STYLE_STATUS = 'back:#1c3b4a,fore:#73848c'
lexers.STYLE_STATUS_FOCUSED = 'back:#1c3b4a,fore:#abb5ba,bold'
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
lexers.STYLE_INFO = 'bold'
lexers.STYLE_EOF = ''

View File

@@ -1,6 +1,6 @@
-- Eight-color scheme
local lexers = vis.lexers
lexers.STYLE_DEFAULT ='back:#dbdff0,fore:#1f212e'
lexers.STYLE_DEFAULT ='back:#dae4f1,fore:#1f212e'
lexers.STYLE_NOTHING = ''
lexers.STYLE_ATTRIBUTE = 'fore:#a1a3aa,bold'
lexers.STYLE_CLASS = 'fore:yellow,bold'
@@ -30,7 +30,7 @@ lexers.STYLE_CURSOR = 'back:#bf8040,fore:#1f212e'
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:#e6fefe'
lexers.STYLE_CURSOR_LINE = 'underlined'
lexers.STYLE_COLOR_COLUMN = 'back:red'
lexers.STYLE_SELECTION = 'back:#a1a3aa,bold'
lexers.STYLE_SELECTION = 'back:#a6c7f2,bold'
lexers.STYLE_STATUS = 'reverse'
lexers.STYLE_STATUS_FOCUSED = 'reverse,bold'
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT

View File

@@ -1,3 +1,5 @@
#define THEME_DARK
#if HEIGHT >= 2160
Xft.dpi: 160
Xcursor.size: 48
@@ -53,3 +55,49 @@ XTerm.vt100.color14: #8FBCBB
! white
XTerm.vt100.color7: #E5E9F0
XTerm.vt100.color15: #ECEFF4
st.font: FiraCode Nerd Font:size=10
#ifdef THEME_DARK
st.background: #1f212e
st.foreground: #9da0af
st.cursorColor: #bf8040
st.reverse-cursor: #1f212e
st.color0: #1f212e
st.color1: #862d2d
st.color2: #3a783a
st.color3: #707010
st.color4: #345eb2
st.color5: #cc66cc
st.color6: #3a7878
st.color7: #a1a3aa
st.color8: #4d4d4d
st.color9: #c27070
st.color10: #40bf40
st.color11: #acac53
st.color12: #6b8ac7
st.color13: #8f248f
st.color14: #509595
st.color15: #dbdff0
#else
st.background: #dae4f1
st.foreground: #1f212e
st.cursorColor: #bf8040
st.reverse-cursor: #1f212e
st.color0: #1f212e
st.color1: #862d2d
st.color2: #3a783a
st.color3: #707010
st.color4: #345eb2
st.color5: #cc66cc
st.color6: #3a7878
st.color7: #a1a3aa
st.color8: #73778c
st.color9: #c27070
st.color10: #40bf40
st.color11: #acac53
st.color12: #6b8ac7
st.color13: #8f248f
st.color14: #509595
st.color15: #dae4f1
#endif

View File

@@ -30,6 +30,10 @@ xsetroot -cursor_name left_ptr
picom -b -I 1 -O 1 -i 1 -e 1 --no-fading-openclose || compton -b --no-fading-openclose
if which awesome > /dev/null; then
exec awesome
fi
if which dk > /dev/null; then
for m in $(polybar --list-monitors | cut -d: -f1); do
MONITOR=$m polybar --reload bar &
@@ -43,10 +47,6 @@ if which dwm > /dev/null; then
exec dwm
fi
if which awesome > /dev/null; then
exec awesome
fi
if which xmonad > /dev/null && test -f ~/.config/xmonad/xmonad.hs; then
exec xmonad
fi

View File

@@ -19,6 +19,16 @@ else
exit 1
fi
if [ -f ~/.Xresources ]; then
if [ "$THEME" = dark ]; then
sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' ~/.Xresources
elif [ "$THEME" = light ]; then
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' ~/.Xresources
fi
xrdb -merge ~/.Xresources
killall -USR1 st
fi
# Alacritty
if [ -f ~/.config/alacritty/alacritty.yml ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml