diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..da152d7 --- /dev/null +++ b/alacritty/.config/alacritty/alacritty.yml @@ -0,0 +1,35 @@ +import: + - ~/.cache/wal/colors-alacritty.yml + +window: + opacity: 0.9 + padding: + x: 10 + y: 10 + decorations: none + startup_mode: Maximized + gtk_theme_variant: dark + +font: + normal: + family: Hack + size: 11 + +draw_bold_text_with_bright_colors: true + +selection: + save_to_clipboard: true + +cursor: + style: + shape: Beam + blinking: Always + +shell: + program: /usr/bin/fish + +mouse: + hide_when_typing: true + hints: + launcher: + program: /usr/bin/firefox diff --git a/alacritty/.config/wal/templates/colors--nodim-alacritty.yml b/alacritty/.config/wal/templates/colors--nodim-alacritty.yml new file mode 100644 index 0000000..a6990e1 --- /dev/null +++ b/alacritty/.config/wal/templates/colors--nodim-alacritty.yml @@ -0,0 +1,53 @@ +colors: + + primary: + background: "{background}" + foreground: "{foreground}" + + cursor: + text: CellBackground + cursor: CellForeground + + vi_mode_cursor: + text: CellBackground + cursor: CellForeground + + search: + matches: + foreground: '{color0}' + background: '{color15}' + focused_match: + foreground: CellBackground + background: CellForeground + + bar: + foreground: '{color8}' + background: '{color7}' + + line_indicator: + foreground: None + background: None + + selection: + text: CellBackground + background: CellForeground + + normal: + black: "{color0}" + red: "{color1}" + green: "{color2}" + yellow: "{color3}" + blue: "{color4}" + magenta: "{color5}" + cyan: "{color6}" + white: "{color7}" + + bright: + black: "{color8}" + red: "{color9}" + green: "{color10}" + yellow: "{color11}" + blue: "{color12}" + magenta: "{color13}" + cyan: "{color14}" + white: "{color15}" diff --git a/alacritty/.config/wal/templates/colors-alacritty.yml b/alacritty/.config/wal/templates/colors-alacritty.yml new file mode 100644 index 0000000..febe33d --- /dev/null +++ b/alacritty/.config/wal/templates/colors-alacritty.yml @@ -0,0 +1,63 @@ +colors: + + primary: + background: "{background}" + foreground: "{foreground}" + + cursor: + text: CellBackground + cursor: CellForeground + + vi_mode_cursor: + text: CellBackground + cursor: CellForeground + + search: + matches: + foreground: '{color0}' + background: '{color15}' + focused_match: + foreground: CellBackground + background: CellForeground + + bar: + foreground: '{color8}' + background: '{color7}' + + line_indicator: + foreground: None + background: None + + selection: + text: CellBackground + background: CellForeground + + normal: + black: "{color0}" + red: "{color1}" + green: "{color2}" + yellow: "{color3}" + blue: "{color4}" + magenta: "{color5}" + cyan: "{color6}" + white: "{color7}" + + bright: + black: "{color8}" + red: "{color9}" + green: "{color10}" + yellow: "{color11}" + blue: "{color12}" + magenta: "{color13}" + cyan: "{color14}" + white: "{color15}" + + dim: + black: "{color15}" + red: "{color9}" + green: "{color13}" + yellow: "{color11}" + blue: "{color12}" + magenta: "{color10}" + cyan: "{color14}" + white: "{color8}" diff --git a/alacritty/README.md b/alacritty/README.md new file mode 100644 index 0000000..ebe1b65 --- /dev/null +++ b/alacritty/README.md @@ -0,0 +1,20 @@ +# alacritty + +[alacritty][alacritty] is a new terminal emulator written in Rust. + +## Use Cases + +alacritty can be used to: + +- Have a terminal emulator that just works +- Have a terminal emulator with modern features like live reload, and without all the extras like window management +- Master [tmux](/tmux) since you won't be relying on window management of your terminal emulator + +You should not use alacritty if: + +- You have a desire to output images in your terminal (use [kitty](/kitty) instead since [libsixel][libsixel] support is WIP) +- You have a need to use Japanese input in your terminal ([an issue][ime-support] for over 3 years in alacritty, [kitty](/kitty) supports this) + +[alacritty]: https://github.com/alacritty/alacritty +[libsixel]: https://github.com/alacritty/alacritty/issues/910 +[ime-support]: https://github.com/alacritty/alacritty/issues/1101 diff --git a/code/.config/Code - OSS/User/settings.json b/code/.config/Code - OSS/User/settings.json new file mode 100644 index 0000000..45fcb8c --- /dev/null +++ b/code/.config/Code - OSS/User/settings.json @@ -0,0 +1,24 @@ +// New Start: A modern Arch workflow built with an emphasis on functionality. +// Copyright (C) 2018 Donovan Glover +{ + // Look and feel + "workbench.colorTheme": "vs-wal", + + // Always start with the previous workspace + "workbench.startupEditor": "newUntitledFile", + + // Confirmations + "explorer.confirmDelete": false, + "explorer.confirmDragAndDrop": false, + + // Toggle the menu bar with alt + "window.menuBarVisibility": "toggle", + + // Disable the enabled-by-default telemetry + "telemetry.enableTelemetry": false, + "telemetry.enableCrashReporter": false, + + // Prefer yarn over npm + "eslint.packageManager": "yarn" +} +// vim:syn=javascript diff --git a/code/README.md b/code/README.md new file mode 100644 index 0000000..caff045 --- /dev/null +++ b/code/README.md @@ -0,0 +1,27 @@ +# Code + +> NOTE: As of 2021, I have no interest in the (vs)code text editor. Although the out-of-the-box features are nice and all, trying to emulate vim-like functionality was more pain than it was worth (even after using [vscode-neovim][vscode-neovim]). Additionally, the battery drain is unreal compared to running an equivalent [neovim](/neovim) experience. + +![Screenshot of Code with pywal support.](/.archlinux/screenshots/code.jpg?raw=true) + +> If you want (vs)code to honor [pywal](/wal) color schemes, use [vscode-wal][vscode-wal]. + +[Code][code] is an open source build of [a popular][vscode] GUI text editor. + +## Use Cases + +Code can be used to: + +- Navigate graphical file trees entirely with the mouse +- Provide an editor for non-vim users as needed +- Perform a myriad of common command line operations through a point-click GUI + +You should not use Code if: + +- You want to learn how compilers, git, find, grep, and other software work +- You want to learn [vim](/vim), the standard text editor + +[code]: https://www.archlinux.org/packages/community/x86_64/code/ +[vscode]: https://github.com/Microsoft/vscode +[vscode-neovim]: https://github.com/asvetliakov/vscode-neovim +[vscode-wal]: https://github.com/bluedrack/vscode-wal diff --git a/lunarvim/.config/lvim/config.lua b/lunarvim/.config/lvim/config.lua new file mode 100644 index 0000000..1ade77f --- /dev/null +++ b/lunarvim/.config/lvim/config.lua @@ -0,0 +1,48 @@ +-- General +lvim.log.level = "warn" +lvim.format_on_save = true +lvim.colorscheme = "onedarker" +lvim.transparent_window = true + +-- Keymappings +lvim.leader = "space" +lvim.keys.normal_mode[""] = ":w" + +-- Plugins +lvim.plugins = { + { + "lukas-reineke/indent-blankline.nvim", + event = "BufRead", + setup = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} + vim.g.indent_blankline_buftype_exclude = {"terminal"} + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false + end + }, +} + +lvim.builtin.dashboard.active = true +lvim.builtin.terminal.active = true +lvim.builtin.nvimtree.setup.view.side = "left" +lvim.builtin.nvimtree.show_icons.git = 0 + +-- Parsers +lvim.builtin.treesitter.ensure_installed = { + "bash", + "c", + "javascript", + "json", + "lua", + "python", + "typescript", + "css", + "rust", + "java", + "yaml", +} + +lvim.builtin.treesitter.ignore_install = { "haskell" } +lvim.builtin.treesitter.highlight.enabled = true diff --git a/lunarvim/README.md b/lunarvim/README.md new file mode 100644 index 0000000..6d73e10 --- /dev/null +++ b/lunarvim/README.md @@ -0,0 +1,15 @@ +# LunarVim + +[LunarVim][LunarVim] is an IDE layer for neovim. + +## Use Cases + +LunarVim can be used to: + +- Have a sensible neovim config for working on real-world projects, with 0 configuration necessary + +You should not use LunarVim if: + +- You should use LunarVim. + +[LunarVim]: https://github.com/LunarVim/LunarVim diff --git a/mpd/.config/mpd/mpd.conf b/mpd/.config/mpd/mpd.conf new file mode 100644 index 0000000..6d88cec --- /dev/null +++ b/mpd/.config/mpd/mpd.conf @@ -0,0 +1,16 @@ +# New Start: A modern Arch workflow built with an emphasis on functionality. +# Copyright (C) 2017 Donovan Glover + +music_directory "~/Music" + +playlist_directory "~/.config/mpd/playlists" +pid_file "~/.config/mpd/pid" +state_file "~/.config/mpd/state" +sticker_file "~/.config/mpd/sticker.sql" + +audio_output { + type "pipewire" + name "PipeWire Sound Server" +} + +auto_update "yes" diff --git a/mpd/.config/mpd/playlists/.gitkeep b/mpd/.config/mpd/playlists/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/mpd/README.md b/mpd/README.md new file mode 100644 index 0000000..d3a17d5 --- /dev/null +++ b/mpd/README.md @@ -0,0 +1,15 @@ +# mpd + +[mpd][mpd] is a music player daemon. + +## Use Cases + +mpd can be used to: + +- Manage music independently of which client is being used + +You should not use mpd if: + +- The music player you use does not rely on mpd + +[mpd]: https://github.com/MusicPlayerDaemon/MPD diff --git a/ncmpcpp/.config/ncmpcpp/bindings b/ncmpcpp/.config/ncmpcpp/bindings new file mode 100644 index 0000000..73de35f --- /dev/null +++ b/ncmpcpp/.config/ncmpcpp/bindings @@ -0,0 +1,136 @@ +# New Start: A modern Arch workflow built with an emphasis on functionality. +# Copyright (C) 2017 Donovan Glover + +# Prevent the mouse from interfering with ncmpcpp +def_key "mouse" + dummy + +# Disable the arrow keys +def_key "left" + dummy +def_key "down" + dummy +def_key "up" + dummy +def_key "right" + dummy +def_key "shift-up" + dummy +def_key "shift-down" + dummy + +# Disable other functionality we don't want +def_key "P" + dummy +def_key "L" + dummy +def_key "+" + dummy +def_key "!" + dummy + +# Use the home row as an alternative to arrow keys +# This also lets you use the h/l keys like ranger to +# move through directories and other structures. It +# also lets you use l to play songs and add tracks +# to the current playlist. +def_key "h" + previous_column +def_key "h" + jump_to_parent_directory +def_key "j" + scroll_down +def_key "k" + scroll_up +def_key "l" + next_column +def_key "l" + enter_directory +def_key "l" + play_item + +# Use the home row for selecting and moving things +def_key "K" + move_sort_order_up +def_key "K" + move_selected_items_up +def_key "J" + move_sort_order_down +def_key "J" + move_selected_items_down +def_key "H" + select_item + scroll_down +def_key "L" + select_item + scroll_up + +# Easily clear the current selection +def_key "'" + remove_selection + +# Easily scroll up and down, vim style +# Using "d" and "u" directly is also supported, similar to VimFx +def_key "ctrl-u" + page_up +def_key "ctrl-d" + page_down +def_key "u" + page_up +def_key "d" + page_down + +# Use n for next and N for previous, just like vim +def_key "n" + next_found_item +def_key "N" + previous_found_item + +# Easily switch between the playlist and browser views +def_key "t" + next_screen + +# Sane movement defaults (g = top, G = bottom) +def_key "g" + move_home +def_key "G" + move_end + +# Use "w" and "b" to go to the next and previous tracks respectively +def_key "w" + next +def_key "b" + previous + +# Use ";" and "," to move through the track +def_key ";" + seek_forward +def_key "," + seek_backward + +# Use "f" to apply filters (used often) +def_key "f" + apply_filter + +# Use "i" instead of insert to select items +def_key "i" + select_item + +# Set x to delete since we don't use crossfade. This +# is similar to the functionality seen in VimFx. +def_key "x" + delete_playlist_items +def_key "x" + delete_browser_items +def_key "x" + delete_stored_playlist + +# Use "U" to update the music database +def_key "U" + update_database + +# Add random songs to the current playlist +def_key "m" + add_random_items + +# vim:ft=conf diff --git a/ncmpcpp/.config/ncmpcpp/config b/ncmpcpp/.config/ncmpcpp/config new file mode 100644 index 0000000..624bdc9 --- /dev/null +++ b/ncmpcpp/.config/ncmpcpp/config @@ -0,0 +1,23 @@ +# New Start: A modern Arch workflow built with an emphasis on functionality. +# Copyright (C) 2017-2018 Donovan Glover + +# Change the directory from ~/.ncmpcpp to ~/.config/ncmpcpp +ncmpcpp_directory = "~/.config/ncmpcpp" + +# Load music files from the ~/Music directory +mpd_music_dir = "~/Music" + +# Always use the "new" user interface +user_interface = "alternative" + +# Always center the new song when changing tracks +autocenter_mode = "yes" + +# Let files be physically deleted inside ncmpcpp +# Change to "yes" if you want to physically delete songs while listing to them +allow_for_physical_item_deletion = "no" + +# Disable mouse support +mouse_support = "no" + +execute_on_song_change = "~/.config/mpd/mpdnotify" diff --git a/ncmpcpp/README.md b/ncmpcpp/README.md new file mode 100644 index 0000000..426d7a9 --- /dev/null +++ b/ncmpcpp/README.md @@ -0,0 +1,18 @@ +# ncmpcpp + +[ncmpcpp][ncmpcpp] is a music player client for the terminal. + +## Use Cases + +ncmpcpp can be used to: + +- Manage your entire music library from a pretty terminal interface +- Let your music player have a color scheme consistent to your setup +- Add music functionality in your rice screenshot + +You should not use ncmpcpp if: + +- You use a desktop environment that already has a music player +- You do not want to use mpd + +[ncmpcpp]: https://github.com/arybczak/ncmpcpp diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config new file mode 100644 index 0000000..056503f --- /dev/null +++ b/polybar/.config/polybar/config @@ -0,0 +1,134 @@ +# New Start: A modern Arch workflow built with an emphasis on functionality. +# Copyright (C) 2017-2022 Donovan Glover + +[color] +background = ${xrdb:background} +red = ${xrdb:color1} +green = ${xrdb:color2} +yellow = ${xrdb:color3} +blue = ${xrdb:color4} +magenta = ${xrdb:color5} +cyan = ${xrdb:color6} +text = ${xrdb:color7} +background-alt = ${xrdb:color8} + +[bar/main] +modules-left = bspwm +modules-center = window +modules-right = volume wifi date time battery + +monitor = ${env:MONITOR:} +wm-restack = bspwm +include-file = $HOME/.cache/polybar/config + +foreground = ${color.background-alt} +background = ${color.background} +border-color = ${color.text} + +font-0 = "Hack:size=9" +font-1 = "Noto Sans CJK JP:size=9" +font-2 = "Font Awesome 6 Free:style=Solid:size=9" +font-3 = "Font Awesome 6 Free:style=Regular:size=9" +font-4 = "Font Awesome 6 Brands:style=Regular:size=9" + +padding-left = 1 +padding-right = 2 +module-margin = 1 + +[module/bspwm] +type = internal/bspwm +pin-workspaces = true +format = + +label-monocle =  monocle mode +label-locked =  Locked +label-private =  Private +label-sticky =  Sticky + +label-monocle-padding = 1 +label-locked-padding = 1 +label-private-padding = 1 +label-sticky-padding = 1 + +label-monocle-foreground = ${color.yellow} + +label-focused-padding = 1 +label-urgent-padding = 1 +label-occupied-padding = 1 +label-empty-padding = 1 + +label-focused-foreground = ${color.text} +label-urgent-foreground = ${color.yellow} + +# Replicate workspace functionality of sway +label-empty = + +[module/cpu] +type = internal/cpu +label =  %percentage%% + +[module/ram] +type = internal/memory +label =  %gb_used% + +[module/date] +type = internal/date +date =  %d.%m.%y +#date =  %B %d, %Y +#date =  %A + +[module/time] +type = internal/date +date =  %H:%M + +[module/battery] +type = internal/battery +battery = BAT0 +adapter = AC +full-at = 98 +time-format = %H:%M +format-charging = +format-discharging = +format-full =  +label-charging = %percentage%% +label-discharging = %percentage%% +label-full = %percentage%% +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  +animation-charging-0 =  +animation-charging-1 =  +animation-charging-2 =  +animation-charging-3 =  +animation-charging-4 =  +animation-charging-framerate = 1000 + +[module/mpd] +type = internal/mpd +format-offline = No song is currently playing. +label-song-maxlen = 100 +label-song-ellipsis = true +format-online =  + +[module/wifi] +type = internal/network +interface-type = wireless +format-connected = +format-disconnected = + +label-connected =  %upspeed%  %downspeed% +label-disconnected = not connected + +[module/volume] +type = internal/pulseaudio +label-volume =  %percentage%% +label-muted =  Off + +[module/window] +type = internal/xwindow +label-maxlen = 110 +label-empty = /usr/bin/bspwm + +; vim:ft=dosini diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh new file mode 100755 index 0000000..94ec2af --- /dev/null +++ b/polybar/.config/polybar/launch.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# New Start: A modern Arch workflow built with an emphasis on functionality. +# Copyright (C) 2017-2018 Donovan Glover + +POLYBAR_DPI=$(xrdb -query | grep Xft.dpi | cut -f 2) +POLYBAR_SCALE=$(($POLYBAR_DPI / 96)) + +# Terminate any previous instances of polybar +killall -q polybar + +bspc_config() { + bspc config top_padding $1 & + bspc config border_width $2 & + bspc config window_gap $3 & +} + +# Set defaults +POLYBAR_HEIGHT=$((30 * $POLYBAR_SCALE)) +HOST_WIDTH=$(bspc query -T -m | jq '.rectangle.width') + +# Make the bar float +if [ "$1" == "float" ]; then + POLYBAR_BORDER_SIZE=$((1 * $POLYBAR_SCALE)) # Later set to bspwm's border_width + POLYBAR_OFFSET_XY=$((30 * $POLYBAR_SCALE)) # Later set to bspwm's window_gap + POLYBAR_WIDTH=$(($HOST_WIDTH - $POLYBAR_OFFSET_XY * 2)) +else + POLYBAR_WIDTH=$HOST_WIDTH +fi + +# Set the bspwm variables +BSPWM_TOP_PADDING=$(($POLYBAR_HEIGHT + ${POLYBAR_OFFSET_XY:-0} + ${POLYBAR_BORDER_SIZE:-0} * 2)) +BSPWM_BORDER_WIDTH=${POLYBAR_BORDER_SIZE:-0} +BSPWM_WINDOW_GAP=${POLYBAR_OFFSET_XY:-0} + +bspc_config $BSPWM_TOP_PADDING $BSPWM_BORDER_WIDTH $BSPWM_WINDOW_GAP + +# Make the polybar config +mkdir -p $HOME/.cache/polybar + +cat >$HOME/.cache/polybar/config < $HOME/.cache/polybar/bspwm_top_padding + +# Wait until there are no more polybar instances running +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Start polybar programmatically on all monitors by default +for m in $(polybar --list-monitors | cut -d":" -f1); do + MONITOR=$m polybar main & +done diff --git a/polybar/README.md b/polybar/README.md new file mode 100644 index 0000000..0e1a13d --- /dev/null +++ b/polybar/README.md @@ -0,0 +1,17 @@ +# polybar + +[polybar][polybar] is an information panel for your desktop. + +## Use Cases + +polybar can be used to: + +- Show the current desktop, empty desktops, and occupied desktops +- Show the date, time, volume, CPU statistics, and other information +- Show the current playing song or anything else you want + +You should not use polybar if: + +- You already use a desktop environment that has an information panel + +[polybar]: https://github.com/jaagr/polybar diff --git a/sway/.config/sway/config b/sway/.config/sway/config new file mode 100644 index 0000000..af9a524 --- /dev/null +++ b/sway/.config/sway/config @@ -0,0 +1,187 @@ +# Default sway config with some edits, "man sway" for help + +set $mod Mod4 +set $alt Mod1 +set $term kitty --single-instance +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +set $menu rofi -show drun + +# Output configuration (swaymsg -t get_outputs) +output * bg /usr/share/backgrounds/archlinux/simple.png fill + +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. +input "2:7:SynPS/2_Synaptics_TouchPad" { + tap enabled + natural_scroll enabled + middle_emulation enabled +} + +input "1:1:AT_Translated_Set_2_keyboard" { + xkb_options caps:escape +} + +### Key bindings + # Start a terminal + bindsym $mod+Return exec $term + + # Kill focused window + bindsym $mod+q kill + + # Start your launcher + bindsym $mod+z exec $menu + + # Toggle waybar + bindsym $mod+o exec killall -SIGUSR1 waybar + + # Screenshot the entire screen + bindsym $mod+p exec grim ~/$(date +%F_%H%M%S).png + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Escape reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+$alt+Escape exec swaymsg exit +# +# Moving around: +# + # Move your focus around + bindsym $mod+h focus left + bindsym $mod+j focus down + bindsym $mod+k focus up + bindsym $mod+l focus right + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+h move left + bindsym $mod+Shift+j move down + bindsym $mod+Shift+k move up + bindsym $mod+Shift+l move right +# +# Workspaces: +# + # Switch to workspace + bindsym $mod+1 workspace number 1 + bindsym $mod+2 workspace number 2 + bindsym $mod+3 workspace number 3 + bindsym $mod+4 workspace number 4 + bindsym $mod+5 workspace number 5 + bindsym $mod+6 workspace number 6 + bindsym $mod+7 workspace number 7 + bindsym $mod+8 workspace number 8 + bindsym $mod+9 workspace number 9 + bindsym $mod+0 workspace number 10 + # Move focused container to workspace + bindsym $mod+Shift+1 move container to workspace number 1 + bindsym $mod+Shift+2 move container to workspace number 2 + bindsym $mod+Shift+3 move container to workspace number 3 + bindsym $mod+Shift+4 move container to workspace number 4 + bindsym $mod+Shift+5 move container to workspace number 5 + bindsym $mod+Shift+6 move container to workspace number 6 + bindsym $mod+Shift+7 move container to workspace number 7 + bindsym $mod+Shift+8 move container to workspace number 8 + bindsym $mod+Shift+9 move container to workspace number 9 + bindsym $mod+Shift+0 move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. + + # Jump to previous/next workspace + bindsym $mod+Tab workspace next + bindsym $mod+Shift+Tab workspace prev +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + bindsym $mod+b splith + bindsym $mod+v splitv + + # Switch the current container between different layout styles + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+Shift+space floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# Scratchpad: +# + # Sway has a "scratchpad", which is a bag of holding for windows. + # You can send windows there and get them back later. + + # Move the currently focused window to the scratchpad + bindsym $mod+Shift+minus move scratchpad + + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + bindsym $mod+minus scratchpad show +# +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym h resize shrink width 10px + bindsym j resize grow height 10px + bindsym k resize shrink height 10px + bindsym l resize grow width 10px + + # Return to default mode + bindsym $mod+r mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +bar { + swaybar_command waybar +} + +default_border none + +# Import gsettings so GTK applications look the same under sway/wayland as bspwm/xorg +exec_always ~/.config/sway/import-gsettings.sh + +# Start fcitx (input method of choice) +exec fcitx5 + +# Hide the cursor after 5 seconds +seat seat0 hide_cursor 5000 + +# Start dunst +exec dunst + +# Fn keys +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- +bindsym XF86MonBrightnessUp exec brightnessctl set +5% +# bindsym XF86Display exec +# bindsym XF86WLAN exec +# bindsym XF86Favorites exec + +# Lock the screen after a certain amount of time +exec swayidle -w + +include /etc/sway/config.d/* diff --git a/sway/.config/sway/import-gsettings.sh b/sway/.config/sway/import-gsettings.sh new file mode 100755 index 0000000..383d4ba --- /dev/null +++ b/sway/.config/sway/import-gsettings.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# Usage: ./import-gsettings +# Source: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland + +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" diff --git a/sway/README.md b/sway/README.md new file mode 100644 index 0000000..0bd8a1d --- /dev/null +++ b/sway/README.md @@ -0,0 +1,16 @@ +# sway + +[sway][sway] is an i3-compatible Wayland compositor. + +## Use Cases + +sway can be used to: + +- Have the benefits of a tiling window manager like i3 in Wayland + +You should not use sway if: + +- Your GPU driver doesn't support [Generic Buffer Management (GBM)][wayland-requirements] + +[sway]: https://github.com/swaywm/sway +[wayland-requirements]: https://wiki.archlinux.org/title/Wayland#Requirements diff --git a/swayidle/.config/swayidle/config b/swayidle/.config/swayidle/config new file mode 100644 index 0000000..81eade2 --- /dev/null +++ b/swayidle/.config/swayidle/config @@ -0,0 +1,2 @@ +timeout 300 swaylock +before-sleep swaylock diff --git a/swayidle/README.md b/swayidle/README.md new file mode 100644 index 0000000..9a27047 --- /dev/null +++ b/swayidle/README.md @@ -0,0 +1,16 @@ +# swayidle + +[swayidle][swayidle] is an idle management daemon for Wayland. + +## Use Cases + +swayidle can be used to: + +- Automatically lock the screen after a period of inactivity +- Automatically lock the screen on lid close (e.g. on a laptop) + +You should not use swayidle if: + +- You don't want to automatically lock the screen. + +[swayidle]: https://github.com/swaywm/swayidle diff --git a/swaylock/.config/swaylock/config b/swaylock/.config/swaylock/config new file mode 100644 index 0000000..c4f0fcf --- /dev/null +++ b/swaylock/.config/swaylock/config @@ -0,0 +1,16 @@ +# swaylock +show-keyboard-layout +daemonize +font="Noto Sans CJK JP" +font-size=20 +indicator-radius=75 +indicator-thickness=15 +image=$(fd . ~/Pictures | shuf -n 1) + +# swaylock-effects +effect-blur=5x2 +clock +indicator +font-size=25 +indicator-radius=85 +indicator-thickness=16 diff --git a/swaylock/README.md b/swaylock/README.md new file mode 100644 index 0000000..f82b692 --- /dev/null +++ b/swaylock/README.md @@ -0,0 +1,18 @@ +# swaylock + +[swaylock][swaylock] is a screen locker for Wayland. [swaylock-effects][swaylock-effects] adds additional features such as blur. + +## Use Cases + +swaylock can be used to: + +- Lock the screen in a reasonable way + +You should not use swaylock if: + +- You're running on Xorg (use [xsecurelock][xsecurelock] instead) +- You use a desktop environment that already has a screen locker + +[swaylock]: https://github.com/swaywm/swaylock +[swaylock-effects]: https://github.com/mortie/swaylock-effects +[xsecurelock]: https://github.com/google/xsecurelock diff --git a/tint2/.config/tint2/wal.sh b/tint2/.config/tint2/wal.sh new file mode 100755 index 0000000..9f896b8 --- /dev/null +++ b/tint2/.config/tint2/wal.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Symlink tint2 config +ln -sf ~/.cache/wal/tint2rc ~/.config/tint2/tint2rc + +# Restart tint2 with the new color scheme +killall -SIGUSR1 tint2 diff --git a/tint2/.config/wal/templates/tint2rc b/tint2/.config/wal/templates/tint2rc new file mode 100644 index 0000000..6fa650f --- /dev/null +++ b/tint2/.config/wal/templates/tint2rc @@ -0,0 +1,175 @@ +#------------------------------------- +# Gradients +#------------------------------------- +# Backgrounds +# Background 1: Panel +rounded = 0 +border_width = 0 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = {background} 90 +border_color = {background} 60 +background_color_hover = {background} 90 +border_color_hover = {background} 60 +background_color_pressed = {background} 90 +border_color_pressed = {background} 60 + +# Background 2: Default task, Iconified task +rounded = 4 +border_width = 1 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #777777 20 +border_color = #777777 30 +background_color_hover = #aaaaaa 22 +border_color_hover = #eaeaea 44 +background_color_pressed = #555555 4 +border_color_pressed = #eaeaea 44 + +# Background 3: Active task +rounded = 4 +border_width = 1 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #777777 20 +border_color = {foreground} 40 +background_color_hover = #aaaaaa 22 +border_color_hover = #eaeaea 44 +background_color_pressed = #555555 4 +border_color_pressed = #eaeaea 44 + +# Background 4: Urgent task +rounded = 4 +border_width = 1 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #aa4400 100 +border_color = #aa7733 100 +background_color_hover = #cc7700 100 +border_color_hover = #aa7733 100 +background_color_pressed = #555555 4 +border_color_pressed = #aa7733 100 + +# Background 5: Tooltip +rounded = 1 +border_width = 1 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #222222 100 +border_color = #333333 100 +background_color_hover = #ffffaa 100 +border_color_hover = {background} 100 +background_color_pressed = #ffffaa 100 +border_color_pressed = {background} 100 + +#------------------------------------- +# Panel +panel_items = TSC +panel_size = 100% 30 +panel_margin = 0 0 +panel_padding = 2 0 2 +font_shadow = 0 +panel_background_id = 1 +wm_menu = 1 +panel_dock = 1 +panel_pivot_struts = 0 +panel_position = bottom center horizontal +panel_layer = normal +panel_monitor = all +panel_shrink = 0 +autohide = 0 +autohide_show_timeout = 0 +autohide_hide_timeout = 0.5 +autohide_height = 2 +strut_policy = follow_size +panel_window_name = tint2 +disable_transparency = 1 +mouse_effects = 1 +font_shadow = 1 +mouse_hover_icon_asb = 100 0 10 +mouse_pressed_icon_asb = 100 0 0 +scale_relative_to_dpi = 0 +scale_relative_to_screen_height = 0 + +#------------------------------------- +# Taskbar +taskbar_mode = multi_desktop +taskbar_hide_if_empty = 1 +taskbar_padding = 0 0 2 +taskbar_background_id = 0 +taskbar_active_background_id = 0 +taskbar_name = 1 +taskbar_hide_inactive_tasks = 0 +taskbar_hide_different_monitor = 0 +taskbar_hide_different_desktop = 0 +taskbar_always_show_all_desktop_tasks = 0 +taskbar_name_padding = 4 2 +taskbar_name_background_id = 0 +taskbar_name_active_background_id = 0 +taskbar_name_font_color = #e3e3e3 100 +taskbar_name_active_font_color = {foreground} 100 +taskbar_distribute_size = 1 +taskbar_sort_order = none +task_align = left + +#------------------------------------- +# Task +task_text = 1 +task_icon = 1 +task_centered = 1 +urgent_nb_of_blink = 100000 +task_maximum_size = 200 35 +task_padding = 2 2 4 +task_tooltip = 1 +task_thumbnail = 0 +task_thumbnail_size = 210 +task_font_color = {foreground} 100 +task_background_id = 2 +task_active_background_id = 3 +task_urgent_background_id = 4 +task_iconified_background_id = 2 +mouse_left = toggle +mouse_middle = none +mouse_right = none +mouse_scroll_up = none +mouse_scroll_down = none + +#------------------------------------- +# System tray (notification area) +systray_padding = 0 4 2 +systray_background_id = 0 +systray_sort = ascending +systray_icon_size = 24 +systray_icon_asb = 100 0 0 +systray_monitor = 1 +systray_name_filter = + +#------------------------------------- +# Clock +time1_format = %H:%M +time2_format = %A %d %B +time1_timezone = +time2_timezone = +clock_font_color = {foreground} 100 +clock_padding = 2 0 +clock_background_id = 0 +clock_tooltip = +clock_tooltip_timezone = +clock_lclick_command = bspc desktop -f next.local.occupied +clock_rclick_command = bspc desktop -f next.local.!occupied +clock_mclick_command = ~/.config/sxhkd/kitty.sh +clock_uwheel_command = bspc desktop -f next.local.occupied +clock_dwheel_command = bspc desktop -f prev.local.occupied + +#------------------------------------- +# Tooltip +tooltip_show_timeout = 0.5 +tooltip_hide_timeout = 0.1 +tooltip_padding = 4 4 +tooltip_background_id = 5 +tooltip_font_color = #dddddd 100 diff --git a/tint2/README.md b/tint2/README.md new file mode 100644 index 0000000..06cac23 --- /dev/null +++ b/tint2/README.md @@ -0,0 +1,16 @@ +# tint2 + +[tint2][tint2] is a simple panel/taskbar made for modern X window managers. + +## Use Cases + +tint2 can be used to: + +- Have a taskbar that automatically shows individual programs on each desktop, without having to perform polybar shenanigans. + +You should not use tint2 if: + +- You require functionality that would be easier to implement with other bars. +- You are not using an X window manager. + +[tint2]: https://gitlab.com/o9000/tint2 diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config new file mode 100644 index 0000000..738ed14 --- /dev/null +++ b/waybar/.config/waybar/config @@ -0,0 +1,67 @@ +{ + "height": 30, + "modules-left": ["sway/workspaces", "sway/mode", "tray"], + "modules-center": ["sway/window"], + "modules-right": ["pulseaudio", "network", "backlight", "memory", "battery", "clock"], + "sway/workspaces": { + "format": "{icon}", + "on-click": "activate", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "五", + "6": "六", + "7": "七", + "8": "八", + "9": "九", + "10": "十" + } + }, + "sway/mode": { + "format": "{}" + }, + "tray": { + "spacing": 20 + }, + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["", ""] + }, + "memory": { + "interval": 30, + "format": " {}%" + }, + "battery": { + "states": { + "warning": 20, + "critical": 10 + }, + "format": "{icon} {capacity}%", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "", "", ""] + }, + "network": { + "format-wifi": " ({signalStrength}%)", + "format-ethernet": " {ifname}: {ipaddr}/{cidr}", + "format-linked": " {ifname} (No IP)", + "format-disconnected": "⚠ Disconnected", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "🔇 Muted", + "format-icons": { + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + } +} +// vim:syn=json diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..a2c71c7 --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,54 @@ +@import url("../../.cache/wal/colors-waybar.css"); + +* { + font-family: "Fira Mono, Noto Sans CJK JP, Font Awesome 6 Free Solid, Font Awesome 6 Free Brands"; +} + +window#waybar { + background: rgba(43, 48, 59, 0.9); + background: @background; + border-bottom: 1px solid rgba(100, 114, 125, 0.3); + color: @foreground; + font-weight: 500; +} + +#workspaces button { + padding: 0 20px; + background: transparent; + color: white; +} + +#workspaces button.focused { + padding: 0 20px; + background: #64727D; + background: @color8; +} + +#mode, #pulseaudio, #network, #backlight, #memory, #clock, #battery { + padding: 0 5px; + margin: 0 5px; +} + +#tray { + padding: 0 15px; +} + +#mode { + background: #64727D; + border-bottom: 3px solid white; +} + +#battery.charging { + color: #26A65B; + color: @color2; +} + +#battery.warning:not(.charging) { + background: #f53c3c; + background: @color8; +} + +#battery.critical:not(.charging) { + background: #f53c3c; + color: white; +} diff --git a/waybar/README.md b/waybar/README.md new file mode 100644 index 0000000..c24c2b1 --- /dev/null +++ b/waybar/README.md @@ -0,0 +1,16 @@ +# waybar + +[waybar][waybar] is a Wayland bar for [sway][sway]. + +## Use Cases + +waybar can be used to: + +- Have a nicer looking bar than the default + +You should not use waybar if: + +- You aren't using Wayland + +[waybar]: https://github.com/Alexays/Waybar +[sway]: https://github.com/swaywm/sway