diff --git a/doom-emacs/.doom.d/config.el b/doom-emacs/.doom.d/config.el index 4fe259d..21332d3 100644 --- a/doom-emacs/.doom.d/config.el +++ b/doom-emacs/.doom.d/config.el @@ -7,7 +7,7 @@ ;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; clients, file templates and snippets. (setq user-full-name "minhtrannhat" - user-mail-address "minhtrannhat2001@gmail.com") + user-mail-address "minhtrannhat@tutanota.com") ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here ;; are the three important ones: @@ -28,8 +28,8 @@ (setq fancy-splash-image "/home/minhradz/.doom.d/marivector.png") (defun synchronize-theme () -(let* ((light-theme 'doom-nord-light) - (dark-theme 'doom-nord) +(let* ((light-theme 'doom-gruvbox-light) + (dark-theme 'doom-gruvbox) (start-time-light-theme 6) (end-time-light-theme 16) (hour (string-to-number (substring (current-time-string) 11 13))) @@ -142,11 +142,7 @@ :after org-roam) (use-package! org-roam-ui - :after org-roam ;; or :after org -;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have -;; a hookable mode anymore, you're advised to pick something yourself -;; if you don't care about startup time, use -;; :hook (after-init . org-roam-ui-mode) + :after org-roam :config (setq org-roam-ui-sync-theme t org-roam-ui-follow t diff --git a/fish/.config/fish/completions/fisher.fish b/fish/.config/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/fish/.config/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index a9b3bfa..2b1966c 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -1,6 +1,5 @@ set fish_greeting -fish_vi_key_bindings -set fish_bind_mode insert +theme_gruvbox dark medium alias rm 'rm -i' alias nnn 'nnn -e' diff --git a/fish/.config/fish/fish_plugins b/fish/.config/fish/fish_plugins new file mode 100644 index 0000000..54f49bf --- /dev/null +++ b/fish/.config/fish/fish_plugins @@ -0,0 +1,2 @@ +jorgebucaran/fisher +jomik/fish-gruvbox diff --git a/fish/.config/fish/fish_variables b/fish/.config/fish/fish_variables new file mode 100644 index 0000000..3d8b508 --- /dev/null +++ b/fish/.config/fish/fish_variables @@ -0,0 +1,38 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR --export GTK_IM_MODULE:ibus +SETUVAR --export QT_IM_MODULE:ibus +SETUVAR --export SSH_AGENT_PID:946 +SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXX6HJbdl/agent\x2e945 +SETUVAR --export XMODIFIERS:\x40im\x3dibus +SETUVAR __fish_initialized:3100 +SETUVAR _fisher_jomik_2F_fish_2D_gruvbox_files:/home/minhradz/\x2econfig/fish/functions/theme_gruvbox\x2efish +SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/minhradz/\x2econfig/fish/functions/fisher\x2efish\x1e/home/minhradz/\x2econfig/fish/completions/fisher\x2efish +SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejomik/fish\x2dgruvbox +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:005fd7 +SETUVAR fish_color_comment:990000 +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:009900 +SETUVAR fish_color_error:ff0000 +SETUVAR fish_color_escape:00a6b2 +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:00a6b2 +SETUVAR fish_color_param:00afff +SETUVAR fish_color_quote:999900 +SETUVAR fish_color_redirection:00afff +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:\x1d +SETUVAR fish_pager_color_description:B3A06D\x1eyellow +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/fish/.config/fish/functions/fisher.fish b/fish/.config/fish/functions/fisher.fish new file mode 100644 index 0000000..72203a2 --- /dev/null +++ b/fish/.config/fish/functions/fisher.fish @@ -0,0 +1,211 @@ +function fisher --argument-names cmd --description "A plugin manager for Fish" + set --query fisher_path || set --local fisher_path $__fish_config_dir + set --local fisher_version 4.3.1 + set --local fish_plugins $__fish_config_dir/fish_plugins + + switch "$cmd" + case -v --version + echo "fisher, version $fisher_version" + case "" -h --help + echo "Usage: fisher install Install plugins" + echo " fisher remove Remove installed plugins" + echo " fisher update Update installed plugins" + echo " fisher update Update all installed plugins" + echo " fisher list [] List installed plugins matching regex" + echo "Options:" + echo " -v or --version Print version" + echo " -h or --help Print this help message" + echo "Variables:" + echo " \$fisher_path Plugin installation path. Default: ~/.config/fish" + case ls list + string match --entire --regex -- "$argv[2]" $_fisher_plugins + case install update remove + isatty || read --local --null --array stdin && set --append argv $stdin + + set --local install_plugins + set --local update_plugins + set --local remove_plugins + set --local arg_plugins $argv[2..-1] + set --local old_plugins $_fisher_plugins + set --local new_plugins + + if ! set --query argv[2] + if test "$cmd" != update + echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 + else if test ! -e $fish_plugins + echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 + end + set arg_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins) + end + + for plugin in $arg_plugins + test -e "$plugin" && set plugin (realpath $plugin) + contains -- "$plugin" $new_plugins || set --append new_plugins $plugin + end + + if set --query argv[2] + for plugin in $new_plugins + if contains -- "$plugin" $old_plugins + test "$cmd" = remove && + set --append remove_plugins $plugin || + set --append update_plugins $plugin + else if test "$cmd" = install + set --append install_plugins $plugin + else + echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1 + end + end + else + for plugin in $new_plugins + contains -- "$plugin" $old_plugins && + set --append update_plugins $plugin || + set --append install_plugins $plugin + end + + for plugin in $old_plugins + contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin + end + end + + set --local pid_list + set --local source_plugins + set --local fetch_plugins $update_plugins $install_plugins + echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal) + + for plugin in $fetch_plugins + set --local source (command mktemp -d) + set --append source_plugins $source + + command mkdir -p $source/{completions,conf.d,functions} + + fish --command " + if test -e $plugin + command cp -Rf $plugin/* $source + else + set temp (command mktemp -d) + set name (string split \@ $plugin) || set name[2] HEAD + set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2] + + echo Fetching (set_color --underline)\$url(set_color normal) + + if curl --silent \$url | tar -xzC \$temp -f - 2>/dev/null + command cp -Rf \$temp/*/* $source + else + echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 + command rm -rf $source + end + command rm -rf \$temp + end + + set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files + " & + + set --append pid_list (jobs --last --pid) + end + + wait $pid_list 2>/dev/null + + for plugin in $fetch_plugins + if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source + if set --local index (contains --index -- "$plugin" $install_plugins) + set --erase install_plugins[$index] + else + set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)] + end + end + end + + for plugin in $update_plugins $remove_plugins + if set --local index (contains --index -- "$plugin" $_fisher_plugins) + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + if contains -- "$plugin" $remove_plugins + for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) + emit {$name}_uninstall + end + printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var + end + + command rm -rf $$plugin_files_var + functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var) + + for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var) + complete --erase --command $name + end + + set --erase _fisher_plugins[$index] + set --erase $plugin_files_var + end + end + + if set --query update_plugins[1] || set --query install_plugins[1] + command mkdir -p $fisher_path/{functions,conf.d,completions} + end + + for plugin in $update_plugins $install_plugins + set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] + set --local files $source/{functions,conf.d,completions}/* + + if set --local index (contains --index -- $plugin $install_plugins) + set --local user_files $fisher_path/{functions,conf.d,completions}/* + set --local conflict_files + + for file in (string replace -- $source/ $fisher_path/ $files) + contains -- $file $user_files && set --append conflict_files $file + end + + if set --query conflict_files[1] && set --erase install_plugins[$index] + echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2 + continue + end + end + + for file in (string replace -- $source/ "" $files) + command cp -Rf $source/$file $fisher_path/$file + end + + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files) + + contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin + contains -- $plugin $install_plugins && set --local event install || set --local event update + + printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var + + for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var) + source $file + if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) + emit {$name}_$event + end + end + end + + command rm -rf $source_plugins + + set --query _fisher_plugins[1] || set --erase _fisher_plugins + set --query _fisher_plugins && + printf "%s\n" $_fisher_plugins >$fish_plugins || + command rm -f $fish_plugins + + set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) + test "$total" != "0 0 0" && echo (string join ", " ( + test $total[1] = 0 || echo "Installed $total[1]") ( + test $total[2] = 0 || echo "Updated $total[2]") ( + test $total[3] = 0 || echo "Removed $total[3]") + ) plugin/s + case \* + echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1 + end +end + +## Migrations ## +function _fisher_fish_postexec --on-event fish_postexec + if functions --query _fisher_list + fisher update >/dev/null 2>/dev/null + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher + functions --erase _fisher_list _fisher_plugin_parse + set --erase fisher_data + end + functions --erase _fisher_fish_postexec +end diff --git a/fish/.config/fish/functions/theme_gruvbox.fish b/fish/.config/fish/functions/theme_gruvbox.fish new file mode 100644 index 0000000..58a3cf2 --- /dev/null +++ b/fish/.config/fish/functions/theme_gruvbox.fish @@ -0,0 +1,141 @@ +#!/usr/bin/fish +function theme_gruvbox --description 'Apply gruvbox theme' + set -l mode 'light' + if test (count $argv) -gt 0 + set mode $argv[1] + end + + set -g contrast 'medium' + if test (count $argv) -gt 1 + set contrast $argv[2] + end + + switch $contrast + case 'soft' + case 'medium' + case 'hard' + case '*' + set_color $fish_color_error + echo 'Unknown contrast $contrast, choose soft, medium or hard' + set_color $fish_color_normal + return 1 + end + + switch $mode + case 'light' + __theme_gruvbox_base + __theme_gruvbox_light + case 'dark' + __theme_gruvbox_base + __theme_gruvbox_dark + case '*' + set_color $fish_color_error + echo 'Unknown mode $mode, choose light or dark' + set_color $fish_color_normal + return 1 + end + __theme_gruvbox_palette + return 0 +end + +function __theme_gruvbox_base + __printf_color 1 'cc/24/1d' + __printf_color 2 '98/97/1a' + __printf_color 3 'd7/99/21' + __printf_color 4 '45/85/88' + __printf_color 5 'b1/62/86' + __printf_color 6 '68/9d/6a' +end + +function __theme_gruvbox_light + set -l bg 'fb/f1/c7' + switch $contrast + case "soft" + set bg 'f2/e5/bc' + case "hard" + set bg 'f9/f5/d7' + end + command printf "\033]11;rgb:$bg\007" + + set -l fg '3c/38/36' + command printf "\033]10;rgb:$fg\007" + + __printf_color 0 $bg + __printf_color 7 '7c/6f/64' + __printf_color 8 '92/83/74' + __printf_color 9 '9d/00/06' + __printf_color 10 '79/74/0e' + __printf_color 11 'b5/76/14' + __printf_color 12 '07/66/78' + __printf_color 13 '8f/3f/71' + __printf_color 14 '42/7b/58' + __printf_color 15 $fg +end + +function __theme_gruvbox_dark + set -l bg '28/28/28' + switch $contrast + case "soft" + set bg '32/30/2f' + case "hard" + set bg '1d/20/21' + end + command printf "\033]11;rgb:$bg\007" + + set -l fg 'eb/db/b2' + command printf "\033]10;rgb:$fg\007" + + __printf_color 0 $bg + __printf_color 7 'a8/99/84' + __printf_color 8 '92/83/74' + __printf_color 9 'fb/59/34' + __printf_color 10 'b8/bb/26' + __printf_color 11 'fa/bd/2f' + __printf_color 12 '83/a5/98' + __printf_color 13 'd3/86/9b' + __printf_color 14 '8e/c0/7c' + __printf_color 15 $fg +end + +function __theme_gruvbox_palette + __printf_color 236 '32/30/2f' + __printf_color 234 '1d/20/21' + + __printf_color 235 '28/28/28' + __printf_color 237 '3c/38/36' + __printf_color 239 '50/49/45' + __printf_color 241 '66/5c/54' + __printf_color 243 '7c/6f/64' + + __printf_color 244 '92/83/74' + __printf_color 245 '92/83/74' + + __printf_color 228 'f2/e5/bc' + __printf_color 230 'f9/f5/d7' + + __printf_color 229 'fb/f1/c7' + __printf_color 223 'eb/db/b2' + __printf_color 250 'd5/c4/a1' + __printf_color 248 'bd/ae/93' + __printf_color 246 'a8/99/84' + + __printf_color 167 'fb/49/34' + __printf_color 142 'b8/bb/26' + __printf_color 214 'fa/bd/2f' + __printf_color 109 '83/a5/98' + __printf_color 175 'd3/86/9b' + __printf_color 108 '8e/c0/7c' + __printf_color 208 'fe/80/19' + + __printf_color 88 '9d/00/06' + __printf_color 100 '79/74/0e' + __printf_color 136 'b5/76/14' + __printf_color 24 '07/66/78' + __printf_color 96 '8f/3f/71' + __printf_color 66 '42/7b/58' + __printf_color 130 'af/3a/03' +end + +function __printf_color + command printf "\033]4;$argv[1];rgb:$argv[2]\007" +end diff --git a/git/.gitconfig b/git/.gitconfig index e895823..ba6b3ae 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,7 +1,7 @@ [pull] rebase = false [user] - email = minhtrannhat2001@gmail.com + email = minhtrannhat@tutanota.com name = minhtrannhat signingkey = 894C6A5801E01CA9 [commit] @@ -21,7 +21,7 @@ line-numbers = true plus-style = "syntax #012800" minus-style = "syntax #340001" - syntax-theme = Nord + syntax-theme = gruvbox-dark navigate = true [interactive] diff --git a/kitty/.config/kitty/gruvbox_dark.conf b/kitty/.config/kitty/gruvbox_dark.conf new file mode 100644 index 0000000..afd0147 --- /dev/null +++ b/kitty/.config/kitty/gruvbox_dark.conf @@ -0,0 +1,55 @@ +# Based on https://github.com/morhetz/gruvbox by morhetz +# Adapted to kitty by wdomitrz + +cursor #928374 +cursor_text_color background + +url_color #83a598 + +visual_bell_color #8ec07c +bell_border_color #8ec07c + +active_border_color #d3869b +inactive_border_color #665c54 + +background #282828 +foreground #fbf1c7 +selection_foreground #928374 +selection_background #ebdbb2 + +active_tab_foreground #fbf1c7 +active_tab_background #665c54 +inactive_tab_foreground #a89984 +inactive_tab_background #3c3836 + +# black +color0 #282828 +color8 #7c6f64 + +# red +color1 #cc241d +color9 #fb4934 + +#: green +color2 #98971a +color10 #b8bb26 + +# yellow +color3 #d79921 +color11 #fabd2f + +# blue +color4 #458588 +color12 #83a598 + +# purple +color5 #b16286 +color13 #d3869b + +# aqua +color6 #689d6a +color14 #8ec07c + +# white +color7 #a89984 +color15 #fbf1c7 diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index 3f65270..45729dc 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -7,10 +7,43 @@ bold_font auto italic_font auto bold_italic_font auto +cursor_shape beam + disable_ligatures never font_size 15.0 enable_audio_bell no -include nord.conf +enabled_layouts splits:split_axis=horizontal + +# Create a new window splitting the space used by the existing one so that +# the two windows are placed one above the other +map F5 launch --location=hsplit + +# Create a new window splitting the space used by the existing one so that +# the two windows are placed side by side +map F6 launch --location=vsplit + +# Create a new window splitting the space used by the existing one so that +# the two windows are placed side by side if the existing window is wide or +# one above the other if the existing window is tall. +map F4 launch --location=split + +# Rotate the current split, chaging its split axis from vertical to +# horizontal or vice versa +map F7 layout_action rotate + +# Move the active window in the indicated direction +map shift+up move_window up +map shift+left move_window left +map shift+right move_window right +map shift+down move_window down + +# Switch focus to the neighboring window in the indicated direction +map ctrl+left neighboring_window left +map ctrl+right neighboring_window right +map ctrl+up neighboring_window up +map ctrl+down neighboring_window down + +include gruvbox_dark.conf diff --git a/kitty/.config/kitty/nord.conf b/kitty/.config/kitty/nord.conf deleted file mode 100644 index 54f3a96..0000000 --- a/kitty/.config/kitty/nord.conf +++ /dev/null @@ -1,43 +0,0 @@ -# Nord Colorscheme for Kitty -# Based on: -# - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192 -# - https://github.com/arcticicestudio/nord-hyper - -foreground #D8DEE9 -background #2E3440 -selection_foreground #000000 -selection_background #FFFACD -url_color #0087BD -cursor #81A1C1 - -# black -color0 #3B4252 -color8 #4C566A - -# red -color1 #BF616A -color9 #BF616A - -# green -color2 #A3BE8C -color10 #A3BE8C - -# yellow -color3 #EBCB8B -color11 #EBCB8B - -# blue -color4 #81A1C1 -color12 #81A1C1 - -# magenta -color5 #B48EAD -color13 #B48EAD - -# cyan -color6 #88C0D0 -color14 #8FBCBB - -# white -color7 #E5E9F0 -color15 #ECEFF4 diff --git a/lvim/.config/lvim/config.lua b/lvim/.config/lvim/config.lua index d6d0d54..8343f6e 100644 --- a/lvim/.config/lvim/config.lua +++ b/lvim/.config/lvim/config.lua @@ -13,12 +13,9 @@ lvim.builtin.nvimtree.side = "left" lvim.builtin.nvimtree.show_icons.git = 1 lvim.builtin.terminal.shell = "/bin/fish" -vim.g.nord_contrast = true -vim.g.nord_borders = true -vim.g.nord_disable_background = false -vim.g.nord_italic = true vim.termguicolors = true -lvim.colorscheme = "nord" +vim.background = "dark" +lvim.colorscheme = "gruvbox" lvim.builtin.treesitter.ensure_installed = {} lvim.builtin.treesitter.ignore_install = { "" } @@ -54,7 +51,7 @@ linters.setup({ -- Additional Plugins lvim.plugins = { - { "shaunsingh/nord.nvim" }, + { "ellisonleao/gruvbox.nvim" }, { "ray-x/lsp_signature.nvim", config = function() diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 0e9be77..494b1da 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -23,6 +23,11 @@ exec autotiling # window manager exec env RUST_BACKTRACE=1 swayrd > /tmp/swayrd.log 2>&1 +#============================clipman===================================================== +exec wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman/clipman-primary.json" +exec clipman restore +exec wl-paste -t text --watch clipman store + ### Variables # # Logo key. Use Mod1 for Alt. @@ -39,35 +44,30 @@ set $term kitty -1 # on the original workspace that the command was run on. set $menu wofi -input 1267:47:Elan_Touchpad events disabled - # Disable titlebar default_border pixel 5 font pango:FiraCodeNerdFontMono Regular 11 -# Window decoration -# class border backgr. text indicator child_border -client.focused #5e81ac #5e81ac #eceff4 #434c5e #5e81ac -client.focused_inactive #4c566a #4c566a #d8dee9 #3b4252 #434c5e -client.unfocused #4c566a #4c566a #d8dee9 #3b4252 #434c5e -client.urgent #bf616a #bf616a #eceff4 #900000 #bf616a -client.placeholder #000000 #0c0c0c #eceff4 #000000 #0c0c0c + # # class border bground text indicator child_border +client.focused #F3722C #EBDBB2 #3C3836 #D65D0E #FE8019 +client.unfocused #3C3836 #3C3836 #EBDBB2 #CC241D #504945 +client.focused_inactive #3C3836 #EBDBB2 #3C3836 #000000 #00000000 # Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size. -gaps inner 12 -gaps outer 5 +gaps inner 6 +gaps outer 3 ### Output configuration # # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) -output * bg /home/minhradz/Downloads/william-moreland-W61Rp5RouCA-unsplash.png fill +output * bg /home/minhradz/Downloads/lantern.jpg fill # # Example configuration: # -output eDP-1 pos 0 0 res 1920x1080 -output HDMI-A-2 res 1920x1080 position 1920,0 +output LVDS-1 pos 0 0 res 1366x768 +output DP-1 res 1920x1080 position 1366,0 # # You can get the names of your outputs by running: swaymsg -t get_outputs # @@ -122,7 +122,10 @@ for_window [app_id="jellyfinmediaplayer"] inhibit_idle fullscreen; max_render_ti bindsym $mod+Shift+c reload # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec exec wlogout -p layer-shell + bindsym $mod+Shift+e exec exec nwgbar + + # clipboard manager + bindsym $mod+p exec clipman pick -t wofi # # Moving around: # @@ -249,6 +252,3 @@ bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -2 && pulsemixer -- bindsym XF86AudioMute exec pulsemixer --toggle-mute && ( pulsemixer --get-mute && echo 0 > $SWAYSOCK.wob ) || pamixer --get-volume > $SWAYSOCK.wob bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 -bindsym XF86AudioNext exec mpc --host=192.168.0.100 --port=6600 next -bindsym XF86AudioPrev exec mpc --host=192.168.0.100 --port=6600 prev -bindsym XF86AudioStop exec mpc --host=192.168.0.100 --port=6600 toggle diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 2f3a513..4664959 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -10,7 +10,7 @@ bind - split-window -v unbind '"' unbind % -set-option -g default-shell /bin/fish +set-option -g default-shell /usr/bin/fish # index number starts at 1 set -g base-index 1 @@ -49,9 +49,11 @@ set -g bell-action none # List of plugins set -g @plugin 'tmux-plugins/tpm' -set -g @plugin "arcticicestudio/nord-tmux" +set -g @plugin 'egel/tmux-gruvbox' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @tmux-gruvbox 'dark' # or 'light' + # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm' diff --git a/waybar/.config/waybar/README.md b/waybar/.config/waybar/README.md new file mode 100644 index 0000000..68cc37e --- /dev/null +++ b/waybar/.config/waybar/README.md @@ -0,0 +1,32 @@ +## Waybar + +![Red waybar](https://user-images.githubusercontent.com/39676098/153702595-1b836a1c-1d31-44c1-bc3f-cf94d4cb28ac.png) + +My personal Waybar config. + +Instead of directly editing the `.css` file, I recommend using Sass and +edit the [`style.scss`](./_style.scss) and `_colors.scss` files instead. This allows you for example, to +change the entire color of the bar with just one variable change. + +[Install the latest version of Sass](https://github.com/sass/dart-sass/releases) +and run this in the `waybar/` directory so that the CSS file will be automatically updated as you edit the Sass files: + +```sass --watch . --no-source-map``` + +By just editing the `$bg` value in [`_colors.scss`](./_colors.scss), you can get an entirely different color: + +![Orange waybar](https://user-images.githubusercontent.com/39676098/153702593-fc17a027-25c4-4ba3-989b-f43a71fc2f74.png) +![Green waybar](https://user-images.githubusercontent.com/39676098/153702590-aa256ff6-7fa3-445e-b1f9-4dc851399659.png) +![Blue waybar](https://user-images.githubusercontent.com/39676098/153702589-854d4c15-348a-49cb-816c-dc9192f21915.png) +![Purple waybar](https://user-images.githubusercontent.com/39676098/153702586-c74292d9-0c78-4396-8038-2b7f77bab677.png) + + +## Fonts + +If the River workspace fonts don't show up, you need to download the specific Japanese font, Han Sans JP. +The command for this on Arch/Arch-based systems should be `sudo pacman -S adobe-source-han-sans-jp-fonts` . + +## Dependencies + +For the GitHub download stats counter to work, you need to have Python 3 installed and also the Requests library. +Install it with `pip install requests`. You also need mpd installed AND running for the modules at the center. diff --git a/waybar/.config/waybar/_colors.scss b/waybar/.config/waybar/_colors.scss new file mode 100644 index 0000000..8508de7 --- /dev/null +++ b/waybar/.config/waybar/_colors.scss @@ -0,0 +1,37 @@ +// Gruvbox Material theme + +$red: #ea6962; +$orange: #e78a4e; +$yellow: #d8a657; +$green: #a9b665; +$cyan: #89b482; +$blue: #7daea3; +$magenta: #d3869b; + +$bg: #464646; +$fg: $orange; + +$fg-opposite: scale-color($fg, $lightness: -25%, $saturation: -15%); + +// Box shadow of modules automatically calculated from the background color +$shadow: scale-color($bg, $lightness: -34%, $saturation: -28%); + +$fg-alt: $shadow; +@if lightness($bg) < 50% { + $fg-alt: scale-color($bg, $lightness: 27%); +} + +// Accent color used by the River active tags +$accent-color: $fg; + +// Foreground + accent color for modules w/o backgrounds +$fg-no-bg: $fg; +$accent-color-no-bg: $shadow; + +// Set this to true or false depending if the mpd module is readable +$dark-theme: true; + +@if $dark-theme { + $fg-no-bg: $fg-opposite; + $accent-color-no-bg: $bg; +} diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index 5e12a6d..62904fa 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -1,39 +1,38 @@ -// -*- mode: json -*- -[ +// Angelo's Waybar config +// https://github.com/angelofallars/dotfiles + { - "layer": "bottom", - "position": "top", - "modules-left": [ - "custom/menu", - "custom/separator", - "sway/workspaces", - "custom/separator" - ], - "modules-center": [ - "custom/separator", - "clock", - "custom/separator", - "battery", - "custom/separator" - ], - "modules-right": [ - "tray", - "custom/separator", - "temperature", - "custom/separator", - "cpu", - "custom/separator", - "memory", - "custom/separator", - "sway/mode", - //"custom/separator", - //"backlight", - "custom/separator", - "network", - "custom/separator", - "pulseaudio", - "custom/separator" - ], + "layer": "bottom", + "height": 33, + "spacing": 0, + "margin-top": 4, + + // If you're using sway, replace `river/tags` with `sway/workspaces` . + + "modules-left": ["sway/workspaces"], + "modules-right": ["tray","cpu", "memory", "battery", "clock#date", "clock", "pulseaudio"], + + "sway/workspaces": { + "disable-scroll": true, + "disable-markup" : false, + "all-outputs": true, + "format": " {icon} ", + //"format":"{icon}", + "format-icons": { + "1": "一", + "2": "二", + "3": "三", + "4": "四", + "5": "五", + "6": "六", + "7": "七", + "8": "八", + "9": "九", + "10": "十", + "focused": "", + "default": "" + } + }, "cpu": { "interval": 5, "tooltip": false, @@ -52,117 +51,13 @@ }, }, - "custom/menu": { - "tooltip-format": "Applications", - "tooltip": true, - "format": "", - "on-click": "wofi -p Run -L 10 -w 2 --show drun" - }, - "wlr/taskbar": { - "format": "{icon}", - "icon-size": 16, - "icon-theme": "Numix-Circle", - "tooltip-format": "{title}", - "on-click": "activate", - "on-click-middle": "close" - }, - "bluetooth": { - "format": "{icon}", - "interval": 30, - "format-icons": { - "enabled": " [X]", - "disabled": " [ ]" - }, - "tooltip-format": "{}", - "on-click": "blueberry" - }, - "temperature": { - "critical-threshold": 90, - "interval": 5, - //"format": "{icon} {temperatureC}°C", - "format": "{icon} {temperatureC}°", - "format-icons": [ - "", // Icon: temperature-empty - "", // Icon: temperature-quarter - "", // Icon: temperature-half - "", // Icon: temperature-three-quarters - "" // Icon: temperature-full - ], - "tooltip": false - }, - "network": { - "interval": 5, - "format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi - "format-ethernet": " {ifname}", - "format-disconnected": "Disconnected", - "tooltip": false - }, - "sway/workspaces": { - "disable-scroll": true, - "all-outputs": true, - "format": "{name}", - "persistent_workspaces": { - "1": [], - "2": [], - "3": [], - "4": [], - "5": [], - "6": [], - "7": [], - "8": [], - "9": [] - }, - "format-icons": { - "urgent": "", - "focused": "", - "default": "" - } - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - } - }, - "sway/mode": { - "format": "{}" - }, - "backlight": { - "format": "{icon} {percent}%", - "format-icons": ["", ""], - "on-scroll-up": "brightnessctl set +5%", - "on-scroll-down": "brightnessctl set 5%-" - }, - "clock": { - "format": "{:%a %d %b %H:%M}", - "tooltip": false - }, - "pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} {volume}%", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", - "", - "" - ] - }, - "on-click": "pavucontrol" - }, - "battery": { + "battery": { "states": { "good": 100, "warning": 30, "critical": 15 }, - "format": "{icon} {capacity}%", + "format": "{icon} {capacity}%", "format-icons": [ "", "", @@ -171,21 +66,34 @@ "" ] }, - "custom/separator": { - "format": "", - "tooltip": false + + "tray": { + // "icon-size": 21, + // "spacing": 10 + }, + + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%I:%M %p}", + }, + + "clock#date": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%B %d, %A}", + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", + "format-icons": { + "headphone": "", + "default": [ + "", + "", + "" + ] + }, + "on-click": "pavucontrol" }, - "custom/shutdown": { - "tooltip-format": "Power menu", - "format": "", - "on-click": "wlogout -p layer-shell -r 50", - }, - "memory": { - "interval": 5, - "format": "memory {}%", // Icon: memory - "states": { - "warning": 70, - "critical": 90 - } - }} -] +} + diff --git a/waybar/.config/waybar/sass.sh b/waybar/.config/waybar/sass.sh new file mode 100755 index 0000000..f0d61bc --- /dev/null +++ b/waybar/.config/waybar/sass.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sass --watch . --no-source-map diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 3933b3a..3f45281 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -1,147 +1,134 @@ -/* Polar Night */ -@define-color nord0 #2e3440; -@define-color nord1 #3b4252; -@define-color nord2 #434c5e; -@define-color nord3 #4c566a; - -/* Snow Storm */ -@define-color nord4 #d8dee9; -@define-color nord5 #e5e9f0; -@define-color nord6 #eceff4; - -/* Frost */ -@define-color nord7 #8fbcbb; -@define-color nord8 #88c0d0; -@define-color nord9 #81a1c1; -@define-color nord10 #5e81ac; - -/* Aurora */ -@define-color nord11 #bf616a; -@define-color nord12 #d08770; -@define-color nord13 #ebcb8b; -@define-color nord14 #a3be8c; -@define-color nord15 #b48ead; - -/* Simple color names */ -@define-color bgkdark @nord0; -@define-color bgkgrey @nord2; -@define-color text @nord4; -@define-color lightblue @nord7; -@define-color darkblue @nord10; -@define-color red @nord11; -@define-color orange @nord12; -@define-color yellow @nord13; -@define-color green @nord14; -@define-color purple @nord15; +#backlight, #battery, #cpu, #disk, #idle_inhibitor, #keyboard-state, +#pulseaudio, #clock, #tags, #language, #memory, #network, #sndio, +#mode, #window, #workspaces, #temperature, #taskbar, #workspaces, +#custom-treefetch-downloads, #custom-update-count { + box-shadow: 4px 4px 0 #2e2e2e; + margin-bottom: 4px; + margin-right: 4px; + margin-left: 3px; + margin-right: 7px; + padding-left: 10px; + padding-right: 10px; + background: #464646; + border-radius: 0px; +} * { - font-size: 16; - font-family: "Fira Code Nerd Font Mono", "Font Awesome 5 Free"; -} - -:hover { - border: 1px solid @purple; - background: @bgkgrey; -} - -window#waybar { - color: @lightblue; - background: @bgkdark; - border: 1px solid @darkblue; -} - -/* Base styling for modules */ -#workspaces, -#mode, -#window, -#idle_inhibitor, -#bluetooth, -#pulseaudio, -#clock, -#battery, -#backlight, -#network, -#custom-separator, -#custom-shutdown, -#cpu, -#memory, -#temperature, -#custom-menu, -#taskbar, -#tray { - padding: 2px 7px 2px 7px; - margin: 5px 0px 5px 0px; - background: @bgkgrey; - border-radius: 5px; -} - -#custom-shutdown { - color: @bgkgrey; - background: @red; -} - -#custom-menu { - color: @bgkgrey; - background: @purple; -} - -#custom-separator { - opacity: 0; - padding: 0px; -} - -#custom-menu { - margin-left: 5px; -} -#workspaces { - padding: 0px; + min-height: 0; } #workspaces button { - color: @purple; - margin: 0; - padding: 1px 3px 0px 3px; -} -#workspaces button.persistent { - color: @lightblue; + color: #d8a657; + margin: 0; + padding: 1px 1px 0px 1px; } + #workspaces button.focused { - border: 1px solid @green; + border: 1px solid #e78a4e; } -#mode { - color: @red; +window#waybar { + background: transparent; + color: #e78a4e; } -#custom-shutdown { - margin-right: 5px; +.modules-left, .modules-center, .modules-right { + background: transparent; + margin-top: 0px; + border-radius: 0px; + font-family: "JetBrains Mono Nerd Font", monospace; + font-size: 15px; + font-weight: 500; } -#battery.warning { - color: @yellow; +.modules-left { + margin-left: 6px; } -#battery.critical { - color: @orange; +.modules-right { + margin-right: 6px; } -#taskbar, -#tray, -#window { - padding: 0; -} -#taskbar button { - color: @lightblue; - padding: 5px 3px 1px 3px; -} -#taskbar button.active { - border: 1px solid @green; -} -#taskbar { - border: 1px solid transparent; +#mpd, #custom-mpd-song-scroll { + font-size: 12px; + font-weight: 700; + margin: 0; + padding: 0; } -#tray, -#window { - padding: 5px 0px 5px 0px; +#mpd { + color: #464646; + margin-left: 5px; +} + +#custom-mpd-song-scroll { + color: #bf6429; + margin-right: 50px; +} + +#tags button { + color: #787878; + font-family: "Source Han Sans JP Heavy"; + font-weight: 700; + padding: 0 3px; + margin: 0 2px; + min-width: 15px; + font-size: 17px; + border-radius: 0; + border: none; + transition: none; +} + +#tags button.occupied { + color: inherit; +} + +#tags button:hover { + color: #464646; + background: #787878; + box-shadow: none; + text-shadow: none; + transition: 0; +} + +#tags button.focused { + color: #464646; + background: #e78a4e; +} + +#tags button.urgent { + color: #ea6962; +} + +@keyframes fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +tooltip { + background: #464646; + border-radius: 7px; + font-family: "JetBrains Mono Nerd Font", monospace; + font-weight: 500; + font-size: 15px; + padding: 10px; + animation-name: fadein; + animation-duration: 0.2s; + border: 2px solid #787878; + text-shadow: none; + color: #e78a4e; +} + +tooltip label { + color: #e78a4e; +} + +#tray menu { + background: #464646; + color: #e78a4e; + border-radius: 5px; + border: 2px solid #787878; } diff --git a/waybar/.config/waybar/style.scss b/waybar/.config/waybar/style.scss new file mode 100644 index 0000000..f638231 --- /dev/null +++ b/waybar/.config/waybar/style.scss @@ -0,0 +1,189 @@ +// Angelo's Waybar config +// https://github.com/angelofallars/dotfiles + +// Use Sass to compile this file down to CSS and restyle my bar. +// https://sass-lang.com/installhttps://sass-lang.com/install +// After downloading Sass, run this in this directory +// to compile your changes: +// $ sass --watch . --no-source-map + +// NOTE: If the Japanese River workspace icons do not show up, +// you should install the Han Sans JP font. +// Arch Linux: +// $ sudo pacman -S adobe-source-han-sans-jp-fonts + +@use 'colors'; + +// Distance of the entire bar from the sides +$screen-margin: 6px; + +// Distance from the top of the screen +$top-margin: 0px; + +// Margin/padding of individual modules +$module-margin: 3px; +$module-padding: 10px; + +// Font config +$font: "JetBrains Mono Nerd Font"; +$font-size: 15px; +$font-weight: 500; + +// How far away should the box shadow effect be diagonally +$box-shadow-distance: 4px; + +// Border radius. Turning this option up will also round the offset shadows. +$bar-border-radius: 0px; + +// ------------------------- +// Actual styling of the bar +// ------------------------- + +@mixin square-shadow { + box-shadow: $box-shadow-distance $box-shadow-distance 0 colors.$shadow; + margin-bottom: $box-shadow-distance; + margin-right: $box-shadow-distance; +} + +@mixin single-module { + @include square-shadow; + margin-left: $module-margin; + margin-right: $module-margin + $box-shadow-distance; + padding-left: $module-padding; + padding-right: $module-padding; + + background: colors.$bg; + border-radius: $bar-border-radius; +} + +// !! If you add new custom modules, put their class name in here. +#backlight, #battery, #cpu, #disk, #idle_inhibitor, #keyboard-state, +#pulseaudio, #clock, #tags, #language, #memory, #network, #sndio, +#mode, #window, #workspaces, #temperature, #taskbar, #workspaces, +#custom-treefetch-downloads, #custom-update-count +{ + @include single-module; +} + +* { + min-height: 0; +} + +#workspaces button { + color: colors.$yellow; + margin: 0; + padding: 1px 1px 0px 1px; +} + +#workspaces button.focused { + border: 1px solid colors.$fg; +} + +window#waybar { + background: transparent; + color: colors.$fg; +} + +.modules-left, .modules-center, .modules-right { + background: transparent; + margin-top: $top-margin; + border-radius: $bar-border-radius; + font-family: $font, monospace; + font-size: $font-size; + font-weight: $font-weight; +} + +.modules-left { + margin-left: $screen-margin; +} + +.modules-right { + margin-right: $screen-margin; +} + +#mpd, #custom-mpd-song-scroll { + font-size: 12.0px; + font-weight: 700; + margin: 0; + padding: 0; +} + +#mpd { + color: colors.$accent-color-no-bg; + margin-left: $module-margin + 2px; +} + +#custom-mpd-song-scroll { + color: colors.$fg-no-bg; + margin-right: 50px; +} + +// River tags + +#tags button { + color: colors.$fg-alt; + font-family: "Source Han Sans JP Heavy"; + font-weight: 700; + padding: 0 3px; + margin: 0 2px; + min-width: 15px; + font-size: 17px; + border-radius: 0; + border: none; + transition: none; +} + +#tags button.occupied { + color: inherit; +} + +#tags button:hover { + color: colors.$bg; + background: colors.$fg-alt; + box-shadow: none; + text-shadow: none; + transition: 0; +} + +#tags button.focused { + color: colors.$bg; + background: colors.$accent-color; +} + +#tags button.urgent { + color: colors.$red; +} + +@keyframes fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +tooltip { + background: colors.$bg; + border-radius: 7px; + font-family: $font, monospace; + font-weight: $font-weight; + font-size: $font-size; + padding: 10px; + animation-name: fadein; + animation-duration: 0.2s; + border: 2px solid colors.$fg-alt; + text-shadow: none; + color: colors.$fg; +} + +tooltip label { + color: colors.$fg; +} + +#tray menu { + background: colors.$bg; + color: colors.$fg; + border-radius: 5px; + border: 2px solid colors.$fg-alt; +} diff --git a/wofi/.config/wofi/config b/wofi/.config/wofi/config index 1baf3c3..acfcb8f 100644 --- a/wofi/.config/wofi/config +++ b/wofi/.config/wofi/config @@ -1,20 +1,5 @@ -stylesheet=/home/minhradz/.config/wofi/style.css -xoffset=0% -yoffset=0% -hide_scroll=true -show=drun -width=15% -lines=10 -line_wrap=word -term=kitty -allow_markup=true -always_parse_args=true -show_all=true -print_command=true -layer=overlay +term=kitty -1 allow-images=true -insensitive=true -prompt= image_size=25 -display_generic=true key_expand=Tab +show=drun diff --git a/wofi/.config/wofi/style.css b/wofi/.config/wofi/style.css index d47d336..b62340a 100644 --- a/wofi/.config/wofi/style.css +++ b/wofi/.config/wofi/style.css @@ -1,65 +1,63 @@ -#entry { -border-radius: 5px; -padding: 7px; -margin: 0px 5px 0px 5px; +#window { + padding: 2px; + background-color: transparent; + font-family: JetBrainsMonoMedium Nerd Font Mono; } -@keyframes fadeIn { - from {opacity: 0;} - to {opacity: 1;} +#entry { +border-radius: 5px; +padding: 5px; +margin-bottom: 5px; } #entry:selected { -background-color: #5e81ac; +background-color: #665C54; } + +#text { +padding: 5px; +font-size: 13px; +color:#FBF1C7; +background-color: transparent; +} #text:selected { -color: #d8dee9; -} - -#window { -background-color: #3b4252; -background-color: transparent; -border-radius: 15px; -font-family: Product Sans; -animation: fadeIn; -animation-duration: 0.3s; + font-size:14px; + font-weight:400; +color: #ffffff; } + #input { -border: 2px solid #5e81ac; -background-color: #4c566a; -padding: 6px; -margin: 15px; -margin-bottom: 0px; -font-size: 16px; -border-radius: 5px; +border: 2px solid #3C3836; +background-color: #EBDBB2; +padding: 5px; +font-size: 13px; +border-radius: 8px; +color: #1D2021; + box-shadow: 0 0 5px black; } #inner-box { -color: #d8dee9; -padding: 10px; -padding-top: 5px; + margin-top: 10px; + color: #d8dee9; + padding: 8px; + border-radius:8px; + border-width: 2px; + border:2px solid #BDAE93; + background-color: #282828; + box-shadow: 0 0 5px black; } #outer-box { margin: 15px; -border-radius: 15px; -background-color: rgba(53,59,73,1.0); -box-shadow: 0px 0px 5px 0 #0F0F0F; +background-color: transparent; } #scroll { margin-top: 10px; -margin-bottom: 10px; } -#text { -font-size: 16px; -padding: 7px; -color: #d8dee9; -background-color: transparent; -} #img { background-color: transparent; diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc new file mode 100644 index 0000000..ea10740 --- /dev/null +++ b/zathura/.config/zathura/zathurarc @@ -0,0 +1 @@ +set selection-clipboard clipboard