From 12ae4e5f267241d2c30e3a8ee3ff58677055c7ae Mon Sep 17 00:00:00 2001 From: starr-dusT Date: Sat, 10 Dec 2022 13:54:27 -0800 Subject: [PATCH] many updates before chezmoi --- .config/alacritty/alacritty.yml | 2 - .config/alacritty/dracula.yml | 61 ---------------- .config/alacritty/gruvbox.yml | 36 ---------- .config/i3/config | 94 ++++++++++++++++--------- .config/i3/scripts/scratch.sh | 34 +++++++++ .config/kitty/dracula.conf | 66 +++++++++++++++++ .config/kitty/kitty.conf | 2 + .config/nvim/after/plugin/color.lua | 1 + .config/nvim/lua/tstarr/packer.lua | 2 +- .config/nvim/plugin/packer_compiled.lua | 10 +-- .config/swhkd/launch.sh | 4 -- .config/swhkd/sxhkdrc | 0 .tmux.conf | 5 +- additional-setup.md | 7 +- provision/tasks/desktop/packages.yml | 4 +- provision/tasks/system/packages.yml | 1 - 16 files changed, 180 insertions(+), 149 deletions(-) delete mode 100644 .config/alacritty/alacritty.yml delete mode 100644 .config/alacritty/dracula.yml delete mode 100644 .config/alacritty/gruvbox.yml create mode 100755 .config/i3/scripts/scratch.sh create mode 100644 .config/kitty/dracula.conf create mode 100644 .config/kitty/kitty.conf delete mode 100755 .config/swhkd/launch.sh delete mode 100644 .config/swhkd/sxhkdrc diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml deleted file mode 100644 index 06111ed0..00000000 --- a/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,2 +0,0 @@ -import: - - /home/tstarr/.config/alacritty/dracula.yml diff --git a/.config/alacritty/dracula.yml b/.config/alacritty/dracula.yml deleted file mode 100644 index 529782fc..00000000 --- a/.config/alacritty/dracula.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Dracula theme for Alacritty -# https://draculatheme.com/alacritty -# -# Color palette -# https://spec.draculatheme.com -# -# Template -# https://github.com/alacritty/alacritty/blob/master/alacritty.yml - -colors: - primary: - background: '#282a36' - foreground: '#f8f8f2' - bright_foreground: '#ffffff' - cursor: - text: CellBackground - cursor: CellForeground - vi_mode_cursor: - text: CellBackground - cursor: CellForeground - search: - matches: - foreground: '#44475a' - background: '#50fa7b' - focused_match: - foreground: '#44475a' - background: '#ffb86c' - footer_bar: - background: '#282a36' - foreground: '#f8f8f2' - hints: - start: - foreground: '#282a36' - background: '#f1fa8c' - end: - foreground: '#f1fa8c' - background: '#282a36' - line_indicator: - foreground: None - background: None - selection: - text: CellForeground - background: '#44475a' - normal: - black: '#21222c' - red: '#ff5555' - green: '#50fa7b' - yellow: '#f1fa8c' - blue: '#bd93f9' - magenta: '#ff79c6' - cyan: '#8be9fd' - white: '#f8f8f2' - bright: - black: '#6272a4' - red: '#ff6e6e' - green: '#69ff94' - yellow: '#ffffa5' - blue: '#d6acff' - magenta: '#ff92df' - cyan: '#a4ffff' - white: '#ffffff' diff --git a/.config/alacritty/gruvbox.yml b/.config/alacritty/gruvbox.yml deleted file mode 100644 index dd361b6b..00000000 --- a/.config/alacritty/gruvbox.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Base16 Gruvbox dark, medium - alacritty color config -# Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) -colors: - # Default colors - primary: - background: '0x282828' - foreground: '0xd5c4a1' - - # Colors the cursor will use if `custom_cursor_colors` is true - cursor: - text: '0x282828' - cursor: '0xd5c4a1' - - # Normal colors - normal: - black: '0x282828' - red: '0xfb4934' - green: '0xb8bb26' - yellow: '0xfabd2f' - blue: '0x83a598' - magenta: '0xd3869b' - cyan: '0x8ec07c' - white: '0xd5c4a1' - - # Bright colors - bright: - black: '0x665c54' - red: '0xfe8019' - green: '0x3c3836' - yellow: '0x504945' - blue: '0xbdae93' - magenta: '0xebdbb2' - cyan: '0xd65d0e' - white: '0xfbf1c7' - -draw_bold_text_with_bright_colors: false diff --git a/.config/i3/config b/.config/i3/config index 621f5463..1d358b3e 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -1,4 +1,5 @@ # i3 config file (v4) +# TODO: add scratchpads (terminal, password manager, discord, task) #------------------------------------------------------------------------------- #----- VARIABLES @@ -6,8 +7,14 @@ set $HOME /home/tstarr -set $DISP_PRI DP-4 -set $DISP_SEC HDMI-0 +#set $DISP_PRI DP-4 +#set $DISP_SEC HDMI-0 + +set $DISP_PRI HDMI-0 +set $DISP_SEC DP-4 + +#set $DISP_PRI HDMI-0 +#set $DISP_SEC HDMI-0 set $BOR_WIDTH 2 set $GAP_INNER 2 @@ -17,13 +24,11 @@ set $mod Mod4 set $tag1 "1:game" set $tag2 "2:dev" set $tag3 "3:web" -set $tag4 "4:dev" +set $tag4 "4:web" set $tag5 "5:web" set $tag6 "6:web" -set $tag7 "7:web" -set $tag8 "8:web" -set $tag9 "9:comm" -set $tag0 "10:task" +set $tag7 "7:comm" +set $tag8 "8:task" #------------------------------------------------------------------------------- #----- COLORS @@ -50,16 +55,14 @@ default_floating_border pixel 1 #----- BINDING WORKSPACE TO DISPLAY #------------------------------------------------------------------------------- -workspace $tag1 output $DISP_PRI $DISP_SEC -workspace $tag2 output $DISP_PRI $DISP_SEC -workspace $tag3 output $DISP_PRI $DISP_SEC -workspace $tag4 output $DISP_PRI $DISP_SEC -workspace $tag5 output $DISP_PRI $DISP_SEC -workspace $tag6 output $DISP_SEC $DISP_PRI -workspace $tag7 output $DISP_SEC $DISP_PRI -workspace $tag8 output $DISP_SEC $DISP_PRI -workspace $tag9 output $DISP_SEC $DISP_PRI -workspace $tag0 output $DISP_SEC $DISP_PRI +workspace $tag1 output $DISP_PRI +workspace $tag2 output $DISP_PRI +workspace $tag3 output $DISP_PRI +workspace $tag4 output $DISP_PRI +workspace $tag5 output $DISP_SEC +workspace $tag6 output $DISP_SEC +workspace $tag7 output $DISP_SEC +workspace $tag8 output $DISP_SEC #------------------------------------------------------------------------------- #----- CONTAINER GAPS @@ -82,6 +85,16 @@ gaps left 0 for_window [title="Steam - News"] floating enable for_window [title="Friends List"] floating enable +for_window [title="Picture-in-Picture"] sticky toggle + +for_window [con_mark="scratch-term"] floating enable, \ + resize set 800 px 600 px, \ + move position 880 px 420 px + +for_window [con_mark="scratch-warden"] floating enable, \ + resize set 1000 px 800 px, \ + move position 780 px 320 px + #------------------------------------------------------------------------------- #----- BINDING APPLICATIONS TO WORKSPACE #------------------------------------------------------------------------------- @@ -96,19 +109,26 @@ for_window [class="Steam"] move container to workspace "1:game" # i3 utility commands bindsym $mod+Ctrl+r restart bindsym $mod+Ctrl+q exit +bindsym $mod+Ctrl+h resize shrink width 50 +bindsym $mod+Ctrl+j resize shrink height 50 +bindsym $mod+Ctrl+k resize grow height 50 +bindsym $mod+Ctrl+l resize grow width 50 # layout commands bindsym $mod+z layout splith bindsym $mod+x layout tabbed bindsym $mod+c layout stacked bindsym $mod+v layout splitv +bindsym $mod+s split h +bindsym $mod+Shift+s split v # program management bindsym $mod+d kill -bindsym $mod+Shift+f floating toggle -bindsym $mod+Shift+s sticky toggle -bindsym $mod+Tab focus mode_toggle bindsym $mod+f fullscreen toggle +bindsym $mod+t floating toggle +bindsym $mod+g sticky toggle +bindsym $mod+Tab focus mode_toggle +floating_modifier $mod # spatial container management bindsym $mod+h focus left @@ -125,40 +145,44 @@ bindsym $mod+1 workspace $tag1 bindsym $mod+2 workspace $tag2 bindsym $mod+3 workspace $tag3 bindsym $mod+4 workspace $tag4 -bindsym $mod+5 workspace $tag5 -bindsym $mod+q workspace $tag6 -bindsym $mod+w workspace $tag7 -bindsym $mod+e workspace $tag8 -bindsym $mod+r workspace $tag9 -bindsym $mod+t workspace $tag0 -bindsym $mod+b workspace back_and_forth +bindsym $mod+q workspace $tag5 +bindsym $mod+w workspace $tag6 +bindsym $mod+e workspace $tag7 +bindsym $mod+r workspace $tag8 bindsym $mod+Shift+1 move container to workspace $tag1 bindsym $mod+Shift+2 move container to workspace $tag2 bindsym $mod+Shift+3 move container to workspace $tag3 bindsym $mod+Shift+4 move container to workspace $tag4 -bindsym $mod+Shift+5 move container to workspace $tag5 -bindsym $mod+Shift+q move container to workspace $tag6 -bindsym $mod+Shift+w move container to workspace $tag7 -bindsym $mod+Shift+e move container to workspace $tag8 -bindsym $mod+Shift+r move container to workspace $tag9 -bindsym $mod+Shift+t move container to workspace $tag0 +bindsym $mod+Shift+q move container to workspace $tag5 +bindsym $mod+Shift+w move container to workspace $tag6 +bindsym $mod+Shift+e move container to workspace $tag7 +bindsym $mod+Shift+r move container to workspace $tag8 # system utils bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +2% bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -2% bindsym XF86AudioMute exec amixer -q set Master toggle +# TODO: flameshot (mod+Ctrl+f) +# TODO: gamemode (mod+Ctrl+g). Needs script to toggle # open applications -bindsym $mod+Return exec alacritty +bindsym $mod+Return exec kitty bindsym $mod+a exec rofi -show drun -theme gruvbox-dark-soft -show-icons bindsym $mod+Shift+a exec rofi -show window -theme gruvbox-dark-soft -show-icons bindsym $mod+u exec firefox +bindsym $mod+i exec steam + +# open scratchpads +bindsym $mod+Shift+Return exec $HOME/.config/i3/scripts/scratch.sh \ + 'scratch-term' 'kitty' + +bindsym $mod+b exec --no-startup-id $HOME/.config/i3/scripts/scratch.sh \ + 'scratch-warden' 'firefoxpwa site launch 01GKYZS658452DK05DVDCRF5V4' #------------------------------------------------------------------------------- #----- AUTOSTART WITH I3 #------------------------------------------------------------------------------- exec --no-startup-id $HOME/.config/i3/scripts/xrandr.sh -exec_always --no-startup-id $HOME/.config/sxhkd/launch.sh exec_always --no-startup-id $HOME/.config/i3/scripts/polybar.sh exec_always --no-startup-id nitrogen --restore diff --git a/.config/i3/scripts/scratch.sh b/.config/i3/scripts/scratch.sh new file mode 100755 index 00000000..a71ec5a1 --- /dev/null +++ b/.config/i3/scripts/scratch.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +if [ $# -ne 2 ]; then + echo "Usage: "${0}" " + echo "Example: ${0} 'scratch-emacs' 'emacsclient -c -a emacs'" + exit 1 +fi + +I3_MARK=${1} +LAUNCH_CMD=${2} + +scratchpad_show() { + i3-msg "[con_mark=${I3_MARK}]" scratchpad show +} + +# try showing the scratchpad window +if ! scratchpad_show; then + # if there is no such window... + + # launch the application. + eval "${LAUNCH_CMD}" & + + # Wait for the next window event. + i3-msg -t subscribe '[ "window" ]' + + # Set a mark + i3-msg mark ${I3_MARK} + + # Move it to the scratchpad workspace + i3-msg move scratchpad + + # show the scratchpad window + scratchpad_show +fi diff --git a/.config/kitty/dracula.conf b/.config/kitty/dracula.conf new file mode 100644 index 00000000..8f05c52a --- /dev/null +++ b/.config/kitty/dracula.conf @@ -0,0 +1,66 @@ +# https://draculatheme.com/kitty +# +# Installation instructions: +# +# cp dracula.conf ~/.config/kitty/ +# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf +# +# Then reload kitty for the config to take affect. +# Alternatively copy paste below directly into kitty.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a + +url_color #8be9fd + +# black +color0 #21222c +color8 #6272a4 + +# red +color1 #ff5555 +color9 #ff6e6e + +# green +color2 #50fa7b +color10 #69ff94 + +# yellow +color3 #f1fa8c +color11 #ffffa5 + +# blue +color4 #bd93f9 +color12 #d6acff + +# magenta +color5 #ff79c6 +color13 #ff92df + +# cyan +color6 #8be9fd +color14 #a4ffff + +# white +color7 #f8f8f2 +color15 #ffffff + +# Cursor colors +cursor #f8f8f2 +cursor_text_color background + +# Tab bar colors +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 + +# Marks +mark1_foreground #282a36 +mark1_background #ff5555 + +# Splits/Windows +active_border_color #f8f8f2 +inactive_border_color #6272a4 diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 00000000..077a4fff --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,2 @@ +include dracula.conf +confirm_os_window_close 0 diff --git a/.config/nvim/after/plugin/color.lua b/.config/nvim/after/plugin/color.lua index 32f2f9be..c052830e 100644 --- a/.config/nvim/after/plugin/color.lua +++ b/.config/nvim/after/plugin/color.lua @@ -1 +1,2 @@ +vim.o.termguicolors = true vim.cmd[[colorscheme dracula]] diff --git a/.config/nvim/lua/tstarr/packer.lua b/.config/nvim/lua/tstarr/packer.lua index c05d2583..9e588127 100644 --- a/.config/nvim/lua/tstarr/packer.lua +++ b/.config/nvim/lua/tstarr/packer.lua @@ -5,7 +5,7 @@ return require('packer').startup(function(use) use 'wbthomason/packer.nvim' -- Colors - use ('Mofiqul/dracula.nvim') + use ('dracula/vim') -- IDE use('nvim-lua/plenary.nvim') diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index 537f0305..321f54ed 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -104,11 +104,6 @@ _G.packer_plugins = { path = "/home/tstarr/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, - ["dracula.nvim"] = { - loaded = true, - path = "/home/tstarr/.local/share/nvim/site/pack/packer/start/dracula.nvim", - url = "https://github.com/Mofiqul/dracula.nvim" - }, harpoon = { loaded = true, path = "/home/tstarr/.local/share/nvim/site/pack/packer/start/harpoon", @@ -153,6 +148,11 @@ _G.packer_plugins = { loaded = true, path = "/home/tstarr/.local/share/nvim/site/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" + }, + vim = { + loaded = true, + path = "/home/tstarr/.local/share/nvim/site/pack/packer/start/vim", + url = "https://github.com/dracula/vim" } } diff --git a/.config/swhkd/launch.sh b/.config/swhkd/launch.sh deleted file mode 100755 index 1d790987..00000000 --- a/.config/swhkd/launch.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -killall sxhkd -sxhkd -c /home/tstarr/.config/sxhkd/sxhkdrc diff --git a/.config/swhkd/sxhkdrc b/.config/swhkd/sxhkdrc deleted file mode 100644 index e69de29b..00000000 diff --git a/.tmux.conf b/.tmux.conf index 905c667d..b2cd12a2 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -12,11 +12,12 @@ bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." # vi is good setw -g mode-keys vi +set -g default-terminal "tmux-256color" +set-option -ga terminal-overrides ",tmux-256color:Tc" + # mouse behavior setw -g mouse on -set-option -g default-terminal screen-256color - bind-key : command-prompt bind-key r refresh-client bind-key L clear-history diff --git a/additional-setup.md b/additional-setup.md index bcaf7b61..077a043b 100644 --- a/additional-setup.md +++ b/additional-setup.md @@ -57,7 +57,7 @@ sudo mkdir -p /mnt/engi # Add following line to fstab ///engi /mnt/engi cifs uid=1000,credentials=/home/tstarr/.smb,iocharset=utf8,noauto,x-systemd.automount 0 0 ``` -## taskopen for taskwarrior +## Taskopen for taskwarrior taskopen needs is easier to install manually at this point since the fedora package is very old. @@ -68,3 +68,8 @@ cd taskopen make PREFIX=/usr sudo make PREFIX=/usr install ``` + +## PWA for Bitwarden + +The default Bitwarden application kind of sucks so I use a [PWA plugin](https://github.com/filips123/PWAsForFirefox). Follow instructions to install rpm and adjust ID in i3 config to launch correct PWA for Bitwarden. + diff --git a/provision/tasks/desktop/packages.yml b/provision/tasks/desktop/packages.yml index 91a3d7b5..6222eda7 100644 --- a/provision/tasks/desktop/packages.yml +++ b/provision/tasks/desktop/packages.yml @@ -7,12 +7,14 @@ - btrfs-assistant # GUI to manage btrfs - btrbk # Backup tool for btrfs subvolumes - mpv # Movie player playing most video formats and DVDs - - alacritty # Fast, cross-platform, OpenGL terminal emulator + - kitty - i3-gaps # i3 with more features - sxhkd # Simple X hotkey daemon - rofi # Window switcher, application launcher and dmenu replacement - python-i3ipc # IPC interface to control i3 from Python - polybar # Fast and easy-to-use status bar + - xprop + - mpv state: present become: true diff --git a/provision/tasks/system/packages.yml b/provision/tasks/system/packages.yml index 427866c6..73448e48 100644 --- a/provision/tasks/system/packages.yml +++ b/provision/tasks/system/packages.yml @@ -3,7 +3,6 @@ name: - git # Fast Version Control System - git-lfs # Git extension for versioning large files - - chezmoi - python-psutil # Cross-platform library for retrieving information on running processes - syncthing # Continuous File Synchronization - flatpak # Application deployment framework for desktop apps