├── .gitignore ├── Brewfile ├── LICENSE ├── README.md ├── aerospace └── .config │ └── aerospace │ └── aerospace.toml ├── alacritty └── .config │ └── alacritty │ └── alacritty.yml ├── awesomewm └── .config │ └── awesome │ ├── components │ ├── exit_screen.lua │ ├── floating_terminal.lua │ ├── init.lua │ ├── lock_screen.lua │ ├── topbar.lua │ └── window_switcher.lua │ ├── daemons │ ├── battery.lua │ ├── bluetooth.lua │ ├── brightness.lua │ ├── init.lua │ ├── language.lua │ ├── network.lua │ ├── player.lua │ └── volume.lua │ ├── helpers.lua │ ├── icons │ ├── battery │ │ ├── battery-10.svg │ │ ├── battery-20.svg │ │ ├── battery-30.svg │ │ ├── battery-40.svg │ │ ├── battery-50.svg │ │ ├── battery-60.svg │ │ ├── battery-70.svg │ │ ├── battery-80.svg │ │ ├── battery-90.svg │ │ ├── battery-charging-10.svg │ │ ├── battery-charging-100.svg │ │ ├── battery-charging-20.svg │ │ ├── battery-charging-30.svg │ │ ├── battery-charging-40.svg │ │ ├── battery-charging-50.svg │ │ ├── battery-charging-60.svg │ │ ├── battery-charging-70.svg │ │ ├── battery-charging-80.svg │ │ ├── battery-charging-90.svg │ │ ├── battery-charging-outline.svg │ │ ├── battery-charging.svg │ │ ├── battery-outline.svg │ │ ├── battery.svg │ │ ├── charger-plugged.svg │ │ └── charger-unplugged.svg │ ├── bluetooth │ │ ├── bluetooth-off.svg │ │ └── bluetooth.svg │ ├── brightness │ │ ├── brightness_high.svg │ │ ├── brightness_low.svg │ │ ├── brightness_medium.svg │ │ └── brightness_notification.svg │ ├── exit_screen │ │ ├── exit_screen_cancel.svg │ │ ├── exit_screen_lock.svg │ │ ├── exit_screen_logout.svg │ │ ├── exit_screen_poweroff.svg │ │ ├── exit_screen_reboot.svg │ │ └── exit_screen_suspend.svg │ ├── language │ │ ├── en.svg │ │ ├── ja.svg │ │ ├── unknown.svg │ │ └── zh.svg │ ├── layouts │ │ ├── floating.png │ │ ├── maximized.png │ │ └── tiled.png │ ├── lock_screen │ │ ├── lock_screen_dot.svg │ │ ├── lock_screen_padlock.svg │ │ └── lock_screen_warning.svg │ ├── network │ │ ├── connected_notification.svg │ │ ├── loading.svg │ │ ├── wifi-strength-1-alert.svg │ │ ├── wifi-strength-1.svg │ │ ├── wifi-strength-2-alert.svg │ │ ├── wifi-strength-2.svg │ │ ├── wifi-strength-3-alert.svg │ │ ├── wifi-strength-3.svg │ │ ├── wifi-strength-4-alert.svg │ │ ├── wifi-strength-4.svg │ │ ├── wifi-strength-off.svg │ │ ├── wired-alert.svg │ │ ├── wired-off.svg │ │ └── wired.svg │ ├── player │ │ ├── player_paused.svg │ │ ├── player_playing.svg │ │ └── player_stopped.svg │ ├── screenshot.svg │ ├── systray │ │ ├── systray_hide.svg │ │ └── systray_show.svg │ ├── taglist │ │ ├── taglist_focus_empty.svg │ │ ├── taglist_focus_occupied.svg │ │ ├── taglist_normal_empty.svg │ │ ├── taglist_normal_occupied.svg │ │ ├── taglist_urgent_empty.svg │ │ └── taglist_urgent_occupied.svg │ └── volume │ │ ├── volume_high.svg │ │ ├── volume_low.svg │ │ ├── volume_medium.svg │ │ ├── volume_muted.svg │ │ ├── volume_notification.svg │ │ └── volume_notification_muted.svg │ ├── keys.lua │ ├── notifications │ ├── battery.lua │ ├── brightness.lua │ ├── error.lua │ ├── init.lua │ ├── network.lua │ ├── player.lua │ └── volume.lua │ ├── rc.lua │ ├── rules.lua │ ├── theme.lua │ ├── wallpapers │ └── pe.jpg │ └── widgets │ ├── battery.lua │ ├── bluetooth.lua │ ├── brightness.lua │ ├── calendar.lua │ ├── clickable_container.lua │ ├── client_name.lua │ ├── language.lua │ ├── layout.lua │ ├── network.lua │ ├── systray.lua │ ├── taglist.lua │ ├── tasklist.lua │ ├── tooltip.lua │ └── volume.lua ├── btop └── .config │ └── btop │ ├── btop.conf │ └── themes │ └── nord.theme ├── chunkwm ├── .chunkwmrc └── .skhdrc ├── dunst └── .config │ └── dunst │ └── dunstrc ├── fontconfig └── .config │ └── fontconfig │ └── fonts.conf ├── ghostty └── .config │ └── ghostty │ └── config ├── git └── .gitconfig ├── gtk ├── .config │ ├── Kvantum │ │ └── kvantum.kvconfig │ └── gtk-3.0 │ │ └── settings.ini └── .gtkrc-2.0 ├── hammerspoon └── .hammerspoon │ ├── README.md │ ├── configs │ ├── custom.lua │ ├── default.lua │ └── init.lua │ ├── helpers.lua │ ├── icons │ ├── layouts │ │ ├── bsp.pdf │ │ ├── float.pdf │ │ ├── stack.pdf │ │ └── unknown.pdf │ └── spaces │ │ ├── 1.pdf │ │ ├── 2.pdf │ │ ├── 3.pdf │ │ ├── 4.pdf │ │ ├── 5.pdf │ │ ├── 6.pdf │ │ ├── 7.pdf │ │ ├── 8.pdf │ │ ├── 9.pdf │ │ └── unknown.pdf │ ├── init.lua │ ├── keybindings │ ├── apps.lua │ ├── hammerspoon.lua │ ├── init.lua │ ├── modifiers.lua │ ├── modules.lua │ └── wm.lua │ ├── libraries │ └── init.lua │ ├── modules │ ├── cheatsheet.lua │ ├── display.lua │ ├── expose.lua │ ├── floating_terminal.lua │ ├── hyper.lua │ ├── init.lua │ ├── ipc.lua │ ├── layouts.lua │ ├── spaces.lua │ └── wm.lua │ └── preferences.lua ├── hyprland └── .config │ └── hypr │ ├── hyprland.conf │ └── hyprpaper.conf ├── i3 └── .config │ └── i3 │ └── config ├── iterm2 └── Library │ └── Preferences │ ├── NordDark.itermcolors │ └── com.googlecode.iterm2.plist ├── karabiner └── .config │ └── karabiner │ └── karabiner.json ├── kde ├── .config │ ├── kcminputrc │ ├── kdeglobals │ ├── kglobalshortcutsrc │ ├── konsolerc │ ├── kscreenlockerrc │ ├── ksplashrc │ ├── ktimezonedrc │ ├── kwalletrc │ ├── kwinrc │ ├── kwinrulesrc │ ├── latte │ │ ├── .multiple-layouts_hidden.layout.latte │ │ ├── Default.layout.latte │ │ └── My Layout.layout.latte │ ├── lattedockrc │ ├── plasma-localerc │ ├── plasma-org.kde.plasma.desktop-appletsrc │ ├── plasmarc │ └── plasmashellrc └── .local │ └── share │ └── konsole │ └── Nordic.profile ├── kitty └── .config │ └── kitty │ └── kitty.conf ├── lazygit ├── .config │ └── lazygit │ │ └── config.yml └── Library │ └── Application Support │ └── lazygit │ └── config.yml ├── macos-settings.sh ├── macos.sh ├── neovim └── .config │ └── nvim │ ├── basic.vim │ ├── colors │ ├── init.lua │ └── lazy-lock.json ├── nix-config ├── README.md ├── flake.lock ├── flake.nix ├── machines │ ├── bootes │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ ├── live │ │ └── configuration.nix │ ├── mayodev │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ ├── mayonaca │ │ └── configuration.nix │ ├── nas │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ ├── outpost │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ ├── router │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ ├── thkpad │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ ├── tunnel │ │ ├── configuration.nix │ │ └── hardware-configuration.nix │ └── workdev │ │ ├── configuration.nix │ │ └── hardware-configuration.nix ├── modules │ ├── base.nix │ ├── darwin.nix │ ├── docker.nix │ ├── homebrew.nix │ ├── linux.nix │ ├── tailscale.nix │ ├── wayland.nix │ ├── wireless.nix │ └── xserver.nix └── profiles │ ├── backup.nix │ ├── base.nix │ ├── cli.nix │ ├── container.nix │ ├── darwin.nix │ ├── dev.nix │ ├── docker_update.nix │ ├── gui.nix │ ├── i18n.nix │ └── wayland.nix ├── packages ├── README.md ├── apps.txt ├── cli.txt ├── essentials.txt ├── firmware.txt ├── fonts.txt ├── gui.txt ├── i18n.txt └── networking.txt ├── paru └── .config │ └── paru │ └── paru.conf ├── picom └── .config │ └── picom │ └── picom.conf ├── polybar └── .config │ └── polybar │ ├── config │ └── launch.sh ├── process-compose └── .config │ └── process-compose │ └── shortcuts.yaml ├── ranger └── .config │ └── ranger │ └── rc.conf ├── rectangle └── Library │ └── Preferences │ └── com.knollsoft.Rectangle.plist ├── redshift └── .config │ └── redshift.conf ├── rofi └── .config │ └── rofi │ └── config.rasi ├── scripts ├── bootstrap_secrets.sh ├── input_change.sh ├── input_status.sh ├── powermenu.sh ├── scratchpad.sh ├── update_layout.sh └── update_space.sh ├── secrets ├── bootes │ ├── id_ed25519 │ ├── id_ed25519.pub │ └── tailscale_auth_key ├── mayodev │ ├── id_ed25519 │ ├── id_ed25519.pub │ └── tailscale_auth_key ├── mayonaca │ ├── id_ed25519 │ └── id_ed25519.pub ├── nas │ ├── acme.env │ ├── cloudflare_tunnel.json │ ├── healthcheck_backup_endpoint │ ├── healthcheck_docker_endpoint │ ├── healthcheck_server_endpoint │ ├── id_ed25519 │ ├── id_ed25519.pub │ ├── kopia │ │ ├── repository.config │ │ └── repository.config.kopia-password │ ├── smtp_password.txt │ └── tailscale_auth_key ├── outpost │ ├── id_ed25519 │ ├── id_ed25519.pub │ └── tailscale_auth_key ├── router │ ├── id_ed25519 │ ├── id_ed25519.pub │ ├── wifi_iot_psk │ └── wifi_psk ├── tunnel │ ├── acme.env │ ├── id_ed25519 │ ├── id_ed25519.pub │ └── tailscale_auth_key └── workdev │ ├── id_ed25519 │ ├── id_ed25519.pub │ └── tailscale_auth_key ├── sublime ├── .gitignore └── Library │ └── Application Support │ └── Sublime Text 3 │ └── Packages │ ├── ActualVim.sublime-settings │ └── User │ ├── Base File.sublime-settings │ ├── Default (OSX).sublime-keymap │ ├── ESLint-Formatter.sublime-settings │ ├── Emmet.sublime-settings │ ├── GitGutter.sublime-settings │ ├── PHP Companion.sublime-settings │ ├── PHP.sublime-settings │ ├── Package Control.sublime-settings │ ├── Package Control.user-ca-bundle │ ├── Preferences.sublime-settings │ ├── SublimeLinter.sublime-settings │ └── phpfmt.sublime-settings ├── swaync └── .config │ └── swaync │ ├── config.json │ ├── configSchema.json │ └── style.css ├── tig └── .tigrc ├── tmux ├── .tmux.conf └── .tmux │ ├── general.conf │ ├── keybindings.conf │ ├── plugins.conf │ ├── settings.conf │ └── statusbar.conf ├── vim └── .vim │ ├── basic.vim │ ├── colors │ └── nord.vim │ ├── plugin-settings.vim │ ├── plugins.vim │ ├── undodir │ └── .gitignore │ └── vimrc ├── vscode └── Library │ └── Application Support │ └── Code │ └── User │ └── settings.json ├── waybar └── .config │ └── waybar │ ├── config │ └── style.css ├── wezterm └── .config │ └── wezterm │ └── wezterm.lua ├── xinit ├── .Xresources └── .xinitrc ├── xmodmap └── .Xmodmap ├── yabai └── .config │ └── yabai │ └── yabairc └── zsh ├── .zsh ├── aliases.zsh ├── autocompletion.zsh ├── history.zsh ├── keybindings.zsh ├── plugins.zsh ├── prompt.zsh └── source.zsh ├── .zshenv └── .zshrc /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | vim/.vim/autoload 4 | vim/.vim/plugged 5 | vim/.vim/.netrwhist 6 | 7 | neovim/.config/nvim/plugin 8 | 9 | tmux/.tmux/plugins 10 | tmux/.tmux/resurrect 11 | 12 | btop/.config/btop/btop.log 13 | 14 | lazygit/.config/lazygit/state.yml 15 | lazygit/Library/Application Support/lazygit/state.yml 16 | 17 | hammerspoon/.hammerspoon/hs 18 | hammerspoon/.hammerspoon/Spoons/* 19 | hammerspoon/.hammerspoon/configs/custom.lua 20 | hammerspoon/.hammerspoon/libraries/* 21 | !hammerspoon/.hammerspoon/libraries/hhtwm 22 | !hammerspoon/.hammerspoon/libraries/init.lua 23 | 24 | ranger/.config/ranger/plugins/* 25 | !ranger/.config/ranger/plugins/z_jumper.py 26 | 27 | sublime/Library/Application Support/Sublime Text 3/Installed Packages/* 28 | sublime/Library/Application Support/Sublime Text 3/Local/* 29 | sublime/Library/Application Support/Sublime Text 3/Packages/* 30 | !sublime/Library/Application Support/Sublime Text 3/Packages/User 31 | 32 | Brewfile.lock.json 33 | 34 | nix-config/result 35 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | tap "homebrew/cask-fonts" 2 | tap "koekeishiya/formulae" 3 | 4 | brew "zsh" 5 | brew "fzf" 6 | brew "jq" 7 | brew "stow" 8 | brew "tmux" 9 | brew "mosh", args: ['HEAD'] 10 | brew "macvim" 11 | brew "neovim" 12 | brew "lazygit" 13 | brew "lazydocker" 14 | brew "node" 15 | brew "yazi" 16 | brew "httpie" 17 | brew "ripgrep" 18 | brew "yarn" 19 | brew "koekeishiya/formulae/yabai" 20 | 21 | cask "hammerspoon" 22 | cask "raycast" 23 | cask "flux" 24 | cask "font-hackgen" 25 | cask "font-hackgen-nerd" 26 | cask "firefox" 27 | cask "ghostty" 28 | cask "sublime-text" 29 | cask "the-unarchiver" 30 | cask "google-drive" 31 | cask "iina" 32 | cask "discord" 33 | cask "messenger" 34 | 35 | mas "LINE", id: 539883307 36 | mas "Home Assistant", id: 1099568401 37 | mas "WireGuard", id: 1451685025 38 | mas "Reeder", id: 880001334 39 | mas "Bitwarden", id: 1352778147 40 | mas "AdGuard for Safari", id: 1440147259 41 | mas "RunCat", id: 1429033973 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # .files 2 | Automagically configure dotfiles for terminal environment. 3 | 4 | ## Prerequisites 5 | - [GNU Stow](http://www.gnu.org/software/stow/) 6 | 7 | ## Instructions 8 | 1. Clone the repository: 9 | ```bash 10 | $ git clone https://github.com/adwinying/dotfiles .dotfiles 11 | ``` 12 | 13 | 2. Use GNU Stow to symlink the dotfiles of the modules: 14 | ```bash 15 | $ cd .dotfiles 16 | $ stow -v git 17 | $ stow -v tmux 18 | $ stow -v vim 19 | $ stow -v zsh 20 | ``` 21 | 22 | 3. For macOS, there is also an optional install script: 23 | ```bash 24 | $ ./macos.sh 25 | $ brew bundle 26 | ``` 27 | 28 | ## Uninstall 29 | ```bash 30 | $ stow -vD git 31 | ``` 32 | 33 | ## See Also 34 | - [nix-config](https://github.com/adwinying/dotfiles/tree/master/nix-config) 35 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/components/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- Initialize components 4 | -- 5 | 6 | require("components.topbar") 7 | require("components.exit_screen") 8 | require("components.lock_screen") 9 | require("components.window_switcher") 10 | require("components.floating_terminal") 11 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/components/topbar.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- topbar.lua 3 | -- topbar config 4 | -- 5 | 6 | local awful = require("awful") 7 | local wibox = require("wibox") 8 | local beautiful = require("beautiful") 9 | local helpers = require("helpers") 10 | 11 | awful.screen.connect_for_each_screen(function (s) 12 | s.topbar = wibox({ 13 | screen = s, 14 | visible = true, 15 | x = s.geometry.x + beautiful.topbar_margin * 2, 16 | y = s.geometry.y + beautiful.topbar_margin * 2, 17 | width = s.geometry.width - beautiful.topbar_margin * 4, 18 | height = beautiful.topbar_height, 19 | shape = helpers.rrect, 20 | }) 21 | s.topbar:struts { 22 | top = beautiful.topbar_height + beautiful.topbar_margin * 2, 23 | } 24 | s.topbar:setup { 25 | widget = wibox.container.margin, 26 | left = beautiful.topbar_padding_x, 27 | right = beautiful.topbar_padding_x, 28 | { 29 | layout = wibox.layout.align.horizontal, 30 | expand = "none", 31 | 32 | -- Left widgets 33 | { 34 | layout = wibox.layout.fixed.horizontal, 35 | require("widgets.taglist")(s), 36 | require("widgets.client_name")(s), 37 | }, 38 | 39 | -- Middle widgets 40 | { 41 | layout = wibox.layout.fixed.horizontal, 42 | require("widgets.calendar")(s), 43 | }, 44 | 45 | -- Right widgets 46 | { 47 | layout = wibox.layout.fixed.horizontal, 48 | require("widgets.systray")(s), 49 | require("widgets.language")(s), 50 | require("widgets.bluetooth")(s), 51 | require("widgets.network")(s), 52 | require("widgets.brightness")(s), 53 | require("widgets.volume")(s), 54 | require("widgets.battery")(s), 55 | require("widgets.layout")(s), 56 | }, 57 | }, 58 | } 59 | end) 60 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/daemons/bluetooth.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- bluetooth.lua 3 | -- bluetooth daemon 4 | -- 5 | -- Dependencies: 6 | -- bluez 7 | -- bluez-utils 8 | -- 9 | -- Signals: 10 | -- daemon::bluetooth::status 11 | -- active (boolean) 12 | -- 13 | 14 | local awful = require("awful") 15 | local helpers = require("helpers") 16 | 17 | -- ======================================== 18 | -- Config 19 | -- ======================================== 20 | 21 | -- script to check bluetooth status 22 | local check_script = "bluetoothctl list" 23 | 24 | -- script to monitor bluetooth status 25 | local monitor_script = "bluetoothctl --monitor list" 26 | 27 | 28 | -- ======================================== 29 | -- Logic 30 | -- ======================================== 31 | 32 | -- Main script 33 | local check_bluetooth = function (stdout) 34 | local active = stdout:match("Controller") ~= nil 35 | 36 | awesome.emit_signal("daemon::bluetooth::status", active) 37 | end 38 | 39 | 40 | -- ======================================== 41 | -- Initialization 42 | -- ======================================== 43 | 44 | -- Run once to initialize widgets 45 | awful.spawn.easy_async_with_shell(check_script, function (stdout) 46 | check_bluetooth(stdout) 47 | end) 48 | 49 | -- Start monitoring process 50 | helpers.start_monitor(monitor_script, { stdout = check_bluetooth }) 51 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/daemons/brightness.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- brightness.lua 3 | -- brightness daemon 4 | -- Dependencies: 5 | -- light 6 | -- inotify-tools 7 | -- 8 | -- Signals: 9 | -- daemon::brightness::percentage 10 | -- percentage (integer) 11 | -- 12 | 13 | local awful = require("awful") 14 | local helpers = require("helpers") 15 | 16 | 17 | -- ======================================== 18 | -- Config 19 | -- ======================================== 20 | 21 | -- script to monitor volume events 22 | -- Subscribe to backlight changes 23 | local monitor_script = "inotifywait -mq -e modify /sys/class/backlight/*/brightness" 24 | 25 | local brightness_script = "light -G" 26 | 27 | 28 | -- ======================================== 29 | -- Logic 30 | -- ======================================== 31 | 32 | -- Main script 33 | local emit_brightness_percentage = function () 34 | awful.spawn.easy_async_with_shell(brightness_script, function (stdout) 35 | local percentage = math.floor(tonumber(stdout)) 36 | 37 | awesome.emit_signal("daemon::brightness::percentage", percentage) 38 | end) 39 | end 40 | 41 | 42 | -- ======================================== 43 | -- Initialization 44 | -- ======================================== 45 | 46 | -- Run once to initialize widgets 47 | emit_brightness_percentage() 48 | 49 | 50 | -- Start monitoring process 51 | helpers.start_monitor(monitor_script, { stdout = emit_brightness_percentage }) 52 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/daemons/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- Initialize daemons 4 | -- 5 | 6 | require("daemons.language") 7 | require("daemons.bluetooth") 8 | require("daemons.network") 9 | require("daemons.brightness") 10 | require("daemons.volume") 11 | require("daemons.battery") 12 | require("daemons.player") 13 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/daemons/language.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- language.lua 3 | -- language daemon 4 | -- Dependencies: 5 | -- ibus 6 | -- 7 | -- Signals: 8 | -- daemon::language 9 | -- language (string) 10 | -- 11 | 12 | local awful = require("awful") 13 | local gears = require("gears") 14 | local helpers = require("helpers") 15 | 16 | -- ======================================== 17 | -- Config 18 | -- ======================================== 19 | 20 | -- update interval 21 | local update_interval = 30 22 | 23 | -- script to get current ibus engine 24 | local current_engine_script = "ibus engine" 25 | 26 | 27 | -- ======================================== 28 | -- Logic 29 | -- ======================================== 30 | 31 | -- Main script 32 | local emit_current_engine = function () 33 | awful.spawn.easy_async_with_shell(current_engine_script, function (stdout) 34 | local language = helpers.get_language(stdout:gsub("%s+", "")) 35 | 36 | awesome.emit_signal("daemon::language", language) 37 | end) 38 | end 39 | 40 | 41 | -- ======================================== 42 | -- Initialization 43 | -- ======================================== 44 | 45 | -- Check engine periodically 46 | gears.timer { 47 | timeout = update_interval, 48 | autostart = true, 49 | call_now = true, 50 | callback = emit_current_engine, 51 | } 52 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/daemons/player.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- player.lua 3 | -- player daemon 4 | -- Dependencies: 5 | -- playerctl 6 | -- 7 | -- Signals: 8 | -- daemon::player::status 9 | -- player (string) 10 | -- artist (string) 11 | -- title (string) 12 | -- status (string) [Playing | Paused | Stopped] 13 | -- 14 | 15 | local helpers = require("helpers") 16 | 17 | -- ======================================== 18 | -- Config 19 | -- ======================================== 20 | 21 | -- script to monitor player events 22 | -- Sleeps until player changes state 23 | local monitor_script = [[ playerctl metadata --follow --format ]] 24 | .. '"{{playerName}}{{artist}}{{title}}{{status}}"' 25 | 26 | 27 | -- ======================================== 28 | -- Logic 29 | -- ======================================== 30 | 31 | -- Main script 32 | local emit_player_info = function (stdout) 33 | local player, artist, title, status = string.match( 34 | stdout, 35 | "^(.*)(.*)(.*)(.*)$" 36 | ) 37 | 38 | if player == nil 39 | and artist == nil 40 | and title == nil 41 | and status == nil then 42 | return 43 | end 44 | 45 | awesome.emit_signal("daemon::player::status", player, artist, title, status) 46 | end 47 | 48 | 49 | -- ======================================== 50 | -- Initialization 51 | -- ======================================== 52 | 53 | -- -- Run once to initialize widgets 54 | -- awful.spawn.easy_async_with_shell(check_script, function (stdout) 55 | -- check_bluetooth(stdout) 56 | -- end) 57 | 58 | -- Start monitoring process 59 | helpers.start_monitor(monitor_script, { stdout = emit_player_info }) 60 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-10.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-20.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-30.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-40.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-50.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-60.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-70.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-80.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-90.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-10.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-100.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-20.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-30.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-40.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-50.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-60.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-70.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-80.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-90.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging-outline.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-charging.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery-outline.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/battery.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/charger-plugged.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/battery/charger-unplugged.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/bluetooth/bluetooth-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/bluetooth/bluetooth.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/brightness/brightness_high.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/brightness/brightness_low.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/brightness/brightness_medium.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/brightness/brightness_notification.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/exit_screen/exit_screen_cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/exit_screen/exit_screen_lock.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/exit_screen/exit_screen_logout.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/exit_screen/exit_screen_poweroff.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/exit_screen/exit_screen_reboot.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/exit_screen/exit_screen_suspend.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/language/en.svg: -------------------------------------------------------------------------------- 1 | english-svg 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/language/ja.svg: -------------------------------------------------------------------------------- 1 | english-svg 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/language/unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/language/zh.svg: -------------------------------------------------------------------------------- 1 | english-svg 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/layouts/floating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/awesomewm/.config/awesome/icons/layouts/floating.png -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/layouts/maximized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/awesomewm/.config/awesome/icons/layouts/maximized.png -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/layouts/tiled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/awesomewm/.config/awesome/icons/layouts/tiled.png -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/lock_screen/lock_screen_dot.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/lock_screen/lock_screen_padlock.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/lock_screen/lock_screen_warning.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/connected_notification.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/loading.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/wifi-strength-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 57 | 61 | 62 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/wifi-strength-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 57 | 61 | 62 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/wifi-strength-3.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 57 | 61 | 62 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/wifi-strength-4-alert.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 57 | 58 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/wifi-strength-4.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 56 | 57 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/network/wifi-strength-off.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 56 | 57 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/player/player_paused.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/player/player_playing.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/player/player_stopped.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/screenshot.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/systray/systray_hide.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/systray/systray_show.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/taglist/taglist_focus_empty.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/taglist/taglist_focus_occupied.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/taglist/taglist_normal_empty.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/taglist/taglist_normal_occupied.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/taglist/taglist_urgent_empty.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/taglist/taglist_urgent_occupied.svg: -------------------------------------------------------------------------------- 1 | New Project -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/volume/volume_high.svg: -------------------------------------------------------------------------------- 1 | volume_high-svg 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/volume/volume_low.svg: -------------------------------------------------------------------------------- 1 | volume_low-svg -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/volume/volume_medium.svg: -------------------------------------------------------------------------------- 1 | volume_medium-svg -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/volume/volume_muted.svg: -------------------------------------------------------------------------------- 1 | volume_muted-svg -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/volume/volume_notification.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/icons/volume/volume_notification_muted.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/notifications/brightness.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- brightness.lua 3 | -- brightness status notification 4 | -- 5 | 6 | local naughty = require("naughty") 7 | local beautiful = require("beautiful") 8 | 9 | -- ======================================== 10 | -- Config 11 | -- ======================================== 12 | 13 | local icons_path = beautiful.icons_path .. "brightness/" 14 | 15 | 16 | -- ======================================== 17 | -- Logic 18 | -- ======================================== 19 | 20 | -- Notify brightness change 21 | local notify_brightness_change = function (percentage) 22 | return naughty.notify { 23 | icon = icons_path .. "brightness_notification.svg", 24 | title = "Brightness", 25 | text = string.format("Brightness is now at %s%%", percentage), 26 | } 27 | end 28 | 29 | 30 | -- ======================================== 31 | -- Initialization 32 | -- ======================================== 33 | 34 | local notification 35 | 36 | awesome.connect_signal("daemon::brightness::percentage", function (percentage) 37 | -- Remove existing notification 38 | if notification then naughty.destroy(notification) end 39 | 40 | notification = notify_brightness_change(percentage) 41 | end) 42 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/notifications/error.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- error.lua 3 | -- error handling 4 | -- 5 | 6 | local naughty = require("naughty") 7 | 8 | -- Check if awesome encountered an error during startup and fell back to 9 | -- another config (This code will only ever execute for the fallback config) 10 | if awesome.startup_errors then 11 | naughty.notify({ 12 | preset = naughty.config.presets.critical, 13 | title = "Oops, there were errors during startup!", 14 | text = awesome.startup_errors, 15 | }) 16 | end 17 | 18 | -- Handle runtime errors after startup 19 | do 20 | local in_error = false 21 | awesome.connect_signal("debug::error", function (err) 22 | -- Make sure we don't go into an endless error loop 23 | if in_error then return end 24 | 25 | in_error = true 26 | naughty.notify({ 27 | preset = naughty.config.presets.critical, 28 | title = "Oops, an error happened!", 29 | text = tostring(err), 30 | }) 31 | in_error = false 32 | end) 33 | end 34 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/notifications/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- Initialize notifications 4 | -- 5 | 6 | local awful = require("awful") 7 | local naughty = require("naughty") 8 | local beautiful = require("beautiful") 9 | local helpers = require("helpers") 10 | 11 | 12 | -- ======================================== 13 | -- Config 14 | -- ======================================== 15 | 16 | naughty.config.padding = beautiful.screen_margin * 2 17 | naughty.config.spacing = beautiful.screen_margin 18 | 19 | naughty.config.defaults = { 20 | timeout = 5, 21 | title = "System Notification", 22 | text = "", 23 | screen = awful.screen.focused(), 24 | ontop = true, 25 | margin = beautiful.notification_margin, 26 | border_width = beautiful.notification_border_width, 27 | position = "top_right", 28 | shape = helpers.rrect, 29 | } 30 | 31 | naughty.config.presets.critical = { 32 | fg = beautiful.notification_fg, 33 | bg = beautiful.notification_bg_critical, 34 | timeout = 0, 35 | } 36 | 37 | 38 | -- ======================================== 39 | -- Initialization 40 | -- ======================================== 41 | 42 | require("notifications.error") 43 | require("notifications.network") 44 | require("notifications.brightness") 45 | require("notifications.volume") 46 | require("notifications.battery") 47 | require("notifications.player") 48 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/notifications/player.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- player.lua 3 | -- player status notification 4 | -- 5 | 6 | local naughty = require("naughty") 7 | local beautiful = require("beautiful") 8 | 9 | -- ======================================== 10 | -- Config 11 | -- ======================================== 12 | 13 | local icons_path = beautiful.icons_path .. "player/" 14 | 15 | 16 | -- ======================================== 17 | -- Logic 18 | -- ======================================== 19 | 20 | -- Determine player icon 21 | local get_player_icon = function (status) 22 | local icon_map = { 23 | Playing = icons_path .. "player_playing.svg", 24 | Paused = icons_path .. "player_paused.svg", 25 | Stopped = icons_path .. "player_stopped.svg", 26 | } 27 | 28 | return icon_map[status] 29 | end 30 | 31 | 32 | -- Notify player status 33 | local notify_player_status = function (player, artist, title, status) 34 | return naughty.notify { 35 | icon = get_player_icon(status), 36 | title = string.format("%s - %s", player, status), 37 | text = string.format("%s\n%s", artist, title), 38 | } 39 | end 40 | 41 | 42 | -- ======================================== 43 | -- Initialization 44 | -- ======================================== 45 | 46 | local notification 47 | 48 | awesome.connect_signal("daemon::player::status", function (...) 49 | -- Remove existing notification 50 | if notification then naughty.destroy(notification) end 51 | 52 | notification = notify_player_status(...) 53 | end) 54 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/notifications/volume.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- volume.lua 3 | -- volume status notification 4 | -- 5 | 6 | local naughty = require("naughty") 7 | local beautiful = require("beautiful") 8 | 9 | -- ======================================== 10 | -- Config 11 | -- ======================================== 12 | 13 | local icons_path = beautiful.icons_path .. "volume/" 14 | 15 | 16 | -- ======================================== 17 | -- Logic 18 | -- ======================================== 19 | 20 | -- Notify volume change 21 | local notify_volume_change = function (percentage) 22 | return naughty.notify { 23 | icon = icons_path .. "volume_notification.svg", 24 | title = "Volume", 25 | text = string.format("Volume is now at %s%%", percentage), 26 | } 27 | end 28 | 29 | 30 | -- Notify volume muted 31 | local notify_volume_muted = function () 32 | return naughty.notify { 33 | icon = icons_path .. "volume_notification_muted.svg", 34 | title = "Volume", 35 | text = "Volume is now muted", 36 | } 37 | end 38 | 39 | 40 | -- ======================================== 41 | -- Initialization 42 | -- ======================================== 43 | 44 | local notification 45 | 46 | awesome.connect_signal("daemon::volume::percentage", function (percentage) 47 | -- Pavucontrol already show volume, so do nothing 48 | if client.focus and client.focus.class == "Pavucontrol" then return end 49 | 50 | -- Remove existing notification 51 | if notification then naughty.destroy(notification) end 52 | 53 | notification = notify_volume_change(percentage) 54 | end) 55 | awesome.connect_signal("daemon::volume::muted", function () 56 | -- Pavucontrol already show volume, so do nothing 57 | if client.focus and client.focus.class == "Pavucontrol" then return end 58 | 59 | -- Remove existing notification 60 | if notification then naughty.destroy(notification) end 61 | 62 | notification = notify_volume_muted() 63 | end) 64 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/wallpapers/pe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/awesomewm/.config/awesome/wallpapers/pe.jpg -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/bluetooth.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- bluetooth.lua 3 | -- bluetooth widget 4 | -- 5 | 6 | local awful = require("awful") 7 | local wibox = require("wibox") 8 | local gears = require("gears") 9 | local beautiful = require("beautiful") 10 | 11 | local keys = require("keys") 12 | 13 | -- ======================================== 14 | -- Config 15 | -- ======================================== 16 | 17 | -- icons path 18 | local icons_path = beautiful.icons_path .. "bluetooth/" 19 | 20 | 21 | -- ======================================== 22 | -- Definition 23 | -- ======================================== 24 | 25 | -- define buttons 26 | local buttons = function (screen) 27 | return gears.table.join( 28 | awful.button( 29 | {}, keys.leftclick, 30 | function() awful.spawn(Apps.bluetooth_manager) end 31 | ) 32 | ) 33 | end 34 | 35 | 36 | -- update widget 37 | local update_widget = function (widget, active) 38 | local icon_name 39 | local status 40 | 41 | if active then 42 | icon_name = "bluetooth.svg" 43 | status = "on" 44 | else 45 | icon_name = "bluetooth-off.svg" 46 | status = "off" 47 | end 48 | 49 | widget.image = icons_path .. icon_name 50 | widget.tooltip.text = "Bluetooth is " .. status 51 | end 52 | 53 | 54 | -- create widget instance 55 | local create_widget = function (screen) 56 | local widget = wibox.widget { 57 | image = icons_path .. "bluetooth.svg", 58 | widget = wibox.widget.imagebox, 59 | } 60 | awesome.connect_signal("daemon::bluetooth::status", function (...) 61 | update_widget(widget, ...) 62 | end) 63 | 64 | local container = require("widgets.clickable_container")(widget) 65 | container:buttons(buttons(screen)) 66 | 67 | widget.tooltip = require("widgets.tooltip")({ container }) 68 | widget.tooltip.text = "Bluetooth status unknown" 69 | 70 | return container 71 | end 72 | 73 | return create_widget 74 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/calendar.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- calendar.lua 3 | -- clock/calendar widget 4 | -- 5 | 6 | local awful = require("awful") 7 | local wibox = require("wibox") 8 | local beautiful = require("beautiful") 9 | 10 | -- create widget instance 11 | local create_widget = function (screen) 12 | -- Clock Widget 13 | local clock_widget = wibox.widget { 14 | widget = wibox.widget.textclock, 15 | format = "%a %b %d %R", 16 | refresh = 30, 17 | } 18 | 19 | -- Calendar Widget 20 | local month_calendar = awful.widget.calendar_popup.month { 21 | screen = screen, 22 | start_sunday = true, 23 | long_weekdays = true, 24 | spacing = beautiful.calendar_spacing, 25 | style_month = { 26 | padding = beautiful.calendar_padding, 27 | }, 28 | } 29 | 30 | -- Attach calendar to clock_widget 31 | month_calendar:attach(clock_widget, "tc") 32 | 33 | return clock_widget 34 | end 35 | 36 | return create_widget 37 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/clickable_container.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- clickable_container.lua 3 | -- eyecandy effect when hovering over widgets 4 | -- 5 | 6 | local wibox = require('wibox') 7 | local beautiful = require("beautiful") 8 | 9 | -- create widget instance 10 | local create_widget = function (widget) 11 | local old_cursor, old_wibox 12 | 13 | local container = wibox.widget { 14 | widget = wibox.container.background, 15 | { 16 | widget = wibox.container.margin, 17 | top = beautiful.clickable_container_padding_y, 18 | bottom = beautiful.clickable_container_padding_y, 19 | left = beautiful.clickable_container_padding_x, 20 | right = beautiful.clickable_container_padding_x, 21 | widget, 22 | }, 23 | } 24 | 25 | container:connect_signal('mouse::enter', function() 26 | container.bg = '#ffffff11' 27 | local w = _G.mouse.current_wibox 28 | if w then 29 | old_cursor, old_wibox = w.cursor, w 30 | w.cursor = 'hand1' 31 | end 32 | end) 33 | container:connect_signal('mouse::leave', function() 34 | container.bg = '#ffffff00' 35 | if old_wibox then 36 | old_wibox.cursor = old_cursor 37 | old_wibox = nil 38 | end 39 | end) 40 | container:connect_signal('button::press', function() 41 | container.bg = '#ffffff22' 42 | end) 43 | container:connect_signal('button::release', function() 44 | container.bg = '#ffffff11' 45 | end) 46 | 47 | return container 48 | end 49 | 50 | return create_widget 51 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/client_name.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- client_name.lua 3 | -- focused client name component 4 | -- 5 | 6 | local wibox = require("wibox") 7 | 8 | -- update currently focused client name 9 | local update_widget = function (widget) 10 | local c = client.focus 11 | if c ~= nil then 12 | widget.text = c.name or c.class or "" 13 | else 14 | widget.text = "" 15 | end 16 | end 17 | 18 | -- create client_name widget instance 19 | local create_widget = function (screen) 20 | local widget = wibox.widget { 21 | widget = wibox.widget.textbox, 22 | text = "", 23 | valign = "center", 24 | align = "center", 25 | } 26 | 27 | client.connect_signal("focus", function (c) 28 | update_widget(widget) 29 | end) 30 | client.connect_signal("unfocus", function (c) 31 | update_widget(widget) 32 | end) 33 | client.connect_signal("property::name", function (c) 34 | update_widget(widget) 35 | end) 36 | 37 | return widget 38 | end 39 | 40 | return create_widget 41 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/language.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- language.lua 3 | -- language widget 4 | -- 5 | 6 | local awful = require("awful") 7 | local wibox = require("wibox") 8 | local gears = require("gears") 9 | local beautiful = require("beautiful") 10 | 11 | local helpers = require("helpers") 12 | local keys = require("keys") 13 | 14 | -- ======================================== 15 | -- Config 16 | -- ======================================== 17 | 18 | -- icons path 19 | local icons_path = beautiful.icons_path .. "language/" 20 | 21 | 22 | -- ======================================== 23 | -- Definition 24 | -- ======================================== 25 | 26 | -- define buttons 27 | local buttons = function (screen) 28 | return gears.table.join( 29 | awful.button( 30 | {}, keys.leftclick, 31 | helpers.switch_language 32 | ), 33 | awful.button( 34 | {}, keys.rightclick, 35 | function() awful.spawn("ibus-setup") end 36 | ) 37 | ) 38 | end 39 | 40 | 41 | -- update language icon 42 | local update_language_icon = function (widget, language) 43 | widget.image = icons_path .. language .. ".svg" 44 | 45 | widget.tooltip.text = language == "unknown" 46 | and "Keyboard layout unknown" 47 | or "Keyboard layout is set to " .. language 48 | end 49 | 50 | 51 | -- create widget instance 52 | local create_widget = function (screen) 53 | local widget = wibox.widget { 54 | image = icons_path .. "unknown.svg", 55 | widget = wibox.widget.imagebox, 56 | } 57 | awesome.connect_signal("daemon::language", function (...) 58 | update_language_icon(widget, ...) 59 | end) 60 | 61 | local container = require("widgets.clickable_container")(widget) 62 | container:buttons(buttons(screen)) 63 | 64 | widget.tooltip = require("widgets.tooltip")({ container }) 65 | widget.tooltip.text = "Keyboard layout unknown" 66 | 67 | return container 68 | end 69 | 70 | return create_widget 71 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/layout.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- layout.lua 3 | -- display currently active layout 4 | -- 5 | 6 | local wibox = require("wibox") 7 | local awful = require("awful") 8 | local gears = require("gears") 9 | local keys = require("keys") 10 | local beautiful = require("beautiful") 11 | 12 | -- define buttons 13 | local buttons = function (screen) 14 | return gears.table.join( 15 | awful.button( 16 | {}, keys.leftclick, 17 | function() awful.layout.inc(1) end 18 | ), 19 | awful.button( 20 | {}, keys.rightclick, 21 | function() awful.layout.inc(-1) end 22 | ), 23 | awful.button( 24 | {}, keys.scrolldown, 25 | function() awful.layout.inc(1) end 26 | ), 27 | awful.button( 28 | {}, keys.scrollup, 29 | function() awful.layout.inc(-1) end 30 | ) 31 | ) 32 | end 33 | 34 | 35 | -- update widget 36 | local update_widget = function (widget, tag) 37 | local layout = tag.layout 38 | local icon_name = "layout_" .. layout.name 39 | 40 | widget.image = beautiful[icon_name] 41 | widget.tooltip.text = layout.name 42 | end 43 | 44 | 45 | -- create widget instance 46 | local create_widget = function (screen) 47 | local widget = wibox.widget { 48 | widget = wibox.widget.imagebox, 49 | resize = true, 50 | } 51 | 52 | tag.connect_signal("property::layout", function(t) 53 | update_widget(widget, t) 54 | end) 55 | tag.connect_signal("property::selected", function(t) 56 | update_widget(widget, t) 57 | end) 58 | 59 | local container = require("widgets.clickable_container")(widget) 60 | container:buttons(buttons(screen)) 61 | 62 | widget.tooltip = require("widgets.tooltip")({ container }) 63 | widget.tooltip.text = "Layout unknown" 64 | 65 | return container 66 | end 67 | 68 | return create_widget 69 | -------------------------------------------------------------------------------- /awesomewm/.config/awesome/widgets/tooltip.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- tooltip.lua 3 | -- attach tooltip to objects 4 | -- 5 | 6 | local awful = require("awful") 7 | local beautiful = require("beautiful") 8 | 9 | local create_widget = function (objects) 10 | return awful.tooltip({ 11 | objects = objects, 12 | text = "Tooltip", 13 | mode = "outside", 14 | margins_topbottom = beautiful.tooltip_padding_y, 15 | margins_leftright = beautiful.tooltip_padding_x, 16 | }) 17 | end 18 | 19 | return create_widget 20 | -------------------------------------------------------------------------------- /ghostty/.config/ghostty/config: -------------------------------------------------------------------------------- 1 | theme = nord 2 | background = #171a20 3 | background-opacity = 0.9 4 | 5 | font-family = HackGen Console NF 6 | font-size = 14 7 | font-thicken 8 | 9 | cursor-style = block 10 | cursor-style-blink = false 11 | shell-integration-features = no-cursor 12 | 13 | window-padding-balance = true 14 | window-padding-x = 15 15 | window-padding-y = 15 16 | 17 | macos-titlebar-style = hidden 18 | quit-after-last-window-closed = true 19 | 20 | keybind = alt+a=esc:a 21 | keybind = alt+b=esc:b 22 | keybind = alt+c=esc:c 23 | keybind = alt+d=esc:d 24 | keybind = alt+e=esc:e 25 | keybind = alt+f=esc:f 26 | keybind = alt+g=esc:g 27 | keybind = alt+h=esc:h 28 | keybind = alt+i=esc:i 29 | keybind = alt+j=esc:j 30 | keybind = alt+k=esc:k 31 | keybind = alt+l=esc:l 32 | keybind = alt+m=esc:m 33 | keybind = alt+n=esc:n 34 | keybind = alt+o=esc:o 35 | keybind = alt+p=esc:p 36 | keybind = alt+q=esc:q 37 | keybind = alt+r=esc:r 38 | keybind = alt+s=esc:s 39 | keybind = alt+t=esc:t 40 | keybind = alt+u=esc:u 41 | keybind = alt+v=esc:v 42 | keybind = alt+w=esc:w 43 | keybind = alt+x=esc:x 44 | keybind = alt+y=esc:y 45 | keybind = alt+z=esc:z 46 | -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Adwin Ying 3 | email = adwinying@gmail.com 4 | 5 | [github] 6 | user = adwinying 7 | 8 | [core] 9 | editor = vim 10 | 11 | [init] 12 | defaultBranch = master 13 | 14 | [push] 15 | autoSetupRemote = true 16 | -------------------------------------------------------------------------------- /gtk/.config/Kvantum/kvantum.kvconfig: -------------------------------------------------------------------------------- 1 | [General] 2 | theme=Nordic 3 | -------------------------------------------------------------------------------- /gtk/.config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-icon-theme-name = Zafiro-icons-Dark 3 | gtk-theme-name = Nordic-darker 4 | gtk-font-name = Sans 10 5 | gtk-application-prefer-dark-theme = true 6 | -------------------------------------------------------------------------------- /gtk/.gtkrc-2.0: -------------------------------------------------------------------------------- 1 | gtk-icon-theme-name = "Zafiro-icons-Dark" 2 | gtk-theme-name = "Nordic-darker" 3 | gtk-font-name = "Sans 10" 4 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/README.md: -------------------------------------------------------------------------------- 1 | # Hammerspoon config 2 | 3 | ## Directories 4 | 5 | - `Spoons/`: Official hammerspoon libraries 6 | - `libraries/`: Non-spoon external libraries goes here 7 | - `configs/`: Configs go here 8 | - `keybindings/`: Keybindings 9 | - `modules/`: In-house logic 10 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/configs/custom.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- custom.lua 3 | -- Custom (Device-specific) Configs 4 | -- 5 | 6 | local custom_config = { 7 | keybindings = { 8 | enable_modifier_overrides = true, 9 | 10 | hyper_override = "rctrl", 11 | 12 | hyper_override_docked = "lctrl", 13 | }, 14 | } 15 | 16 | return custom_config 17 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/configs/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- Configs 4 | -- 5 | 6 | -- ============================================================================= 7 | -- Initialization 8 | -- ============================================================================= 9 | 10 | local config = require("configs.default") 11 | local custom = require("configs.custom") 12 | 13 | -- merge configs 14 | local function extend_table (...) 15 | local ret = {} 16 | 17 | for i = 1, select('#', ...) do 18 | local tbl = select(i, ...) 19 | 20 | for k, v in pairs(tbl) do 21 | if type(v) == "table" then 22 | if type(ret[k] or false) == "table" then 23 | ret[k] = extend_table(ret[k] or {}, tbl[k] or {}) 24 | else 25 | ret[k] = v 26 | end 27 | else 28 | ret[k] = v 29 | end 30 | end 31 | end 32 | 33 | return ret 34 | end 35 | 36 | return extend_table(config, custom) 37 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/layouts/bsp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/layouts/bsp.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/layouts/float.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/layouts/float.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/layouts/stack.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/layouts/stack.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/layouts/unknown.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/layouts/unknown.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/1.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/2.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/3.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/4.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/5.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/6.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/7.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/8.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/9.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/icons/spaces/unknown.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/hammerspoon/.hammerspoon/icons/spaces/unknown.pdf -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- _ _ _ __ __ __ __ ___ ___ ___ ___ ___ ___ _ _ 3 | -- | || | /_\ | \/ | \/ | __| _ \/ __| _ \/ _ \ / _ \| \| | 4 | -- | __ |/ _ \| |\/| | |\/| | _|| /\__ \ _/ (_) | (_) | .` | 5 | -- |_||_/_/ \_\_| |_|_| |_|___|_|_\|___/_| \___/ \___/|_|\_| 6 | -- 7 | -- 8 | 9 | -- ============================================================================= 10 | -- Initialization 11 | -- ============================================================================= 12 | 13 | -- Load preferences 14 | require("preferences") 15 | 16 | -- Load libraries 17 | require("libraries") 18 | 19 | -- Load modules 20 | require("modules") 21 | 22 | -- Load keybindings 23 | require("keybindings") 24 | 25 | -- Show config load success message 26 | hs.notify.show("Config Initialization Complete", "All ready to go!", "") 27 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/keybindings/apps.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- spawn.lua 3 | -- App spawning related keybindings 4 | -- 5 | 6 | local configs = require("configs") 7 | local hyper = require("modules.hyper") 8 | 9 | -- ============================================================================= 10 | -- Definitions 11 | -- ============================================================================= 12 | 13 | -- terminal 14 | hyper:bind({}, "return", function () 15 | hs.execute('open -na ' .. configs.apps.terminal) 16 | end) 17 | 18 | -- browser 19 | hyper:bind({}, "b", function () 20 | hs.application.launchOrFocus(configs.apps.browser) 21 | end) 22 | 23 | -- scratchpad 24 | hyper:bind({}, "v", function () 25 | os.execute(configs.apps.scratchpad_path .. " -e bash -c \"~/.dotfiles/scripts/scratchpad.sh\" &") 26 | end) 27 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/keybindings/hammerspoon.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- hammerspoon.lua 3 | -- hammerspoon basic keybindings 4 | -- 5 | 6 | local helpers = require("helpers") 7 | local hyper = require("modules.hyper") 8 | local config = require("configs") 9 | 10 | -- ============================================================================= 11 | -- Definitions 12 | -- ============================================================================= 13 | 14 | -- reload configs 15 | hyper:bind({ "shift" }, "r", function () 16 | if config.wm.mode == "aerospace" then 17 | hs.execute("aerospace reload-config") 18 | end 19 | 20 | if config.wm.mode == "yabai" then 21 | hs.execute("pkill yabai") 22 | end 23 | 24 | hs.reload() 25 | end) 26 | 27 | -- toggle console 28 | hyper:bind({ "shift" }, "t", function () 29 | hs.console.clearConsole() 30 | hs.toggleConsole() 31 | 32 | -- focus next available window 33 | helpers.get_active_window(function (win) win:focus() end) 34 | end) 35 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/keybindings/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- Keybindings 4 | -- 5 | 6 | -- ============================================================================= 7 | -- Initialization 8 | -- ============================================================================= 9 | 10 | require("keybindings.modifiers") 11 | require("keybindings.hammerspoon") 12 | require("keybindings.modules") 13 | require("keybindings.apps") 14 | require("keybindings.wm") 15 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/keybindings/modifiers.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- modifiers.lua 3 | -- modifier keys-related settings 4 | -- 5 | 6 | local FRemap = require("libraries.foundation_remapping") 7 | local remapper = FRemap.new() 8 | 9 | local hyperex = require("libraries.hyperex") 10 | 11 | local configs = require("configs") 12 | local keybindings = configs.keybindings 13 | 14 | if (not keybindings.enable_modifier_overrides) then return end 15 | 16 | -- ============================================================================= 17 | -- Definitions 18 | -- ============================================================================= 19 | 20 | -- Remap hyper_override to hyper key 21 | local function get_hyper_override () 22 | local hyper_override = keybindings.hyper_override 23 | if Display.is_docked and keybindings.hyper_override_docked ~= nil then 24 | hyper_override = keybindings.hyper_override_docked 25 | end 26 | 27 | return hyper_override 28 | end 29 | remapper:remap(get_hyper_override(), keybindings.hyper):register() 30 | 31 | -- Remap capslock to ctrl key 32 | remapper:remap("capslock", "ctrl"):register() 33 | 34 | -- Trigger escape when control key is pressed alone 35 | hyperex.new("ctrl"):setEmptyHitKey("escape") 36 | 37 | -- Trigger 英数 key when left command key is pressed alone 38 | hyperex.new("cmd"):setEmptyHitKey(0x66) 39 | 40 | -- Trigger かな key when right command key is pressed alone 41 | hyperex.new("rightcmd"):setEmptyHitKey(0x68) 42 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/keybindings/modules.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- modules.lua 3 | -- modules-related keybindings 4 | -- 5 | 6 | local hyper = require("modules.hyper") 7 | 8 | -- ============================================================================= 9 | -- Definitions 10 | -- ============================================================================= 11 | 12 | -- activate expose 13 | hyper:bind({}, "tab", function () 14 | hs.expose.new(hs.window.filter.defaultCurrentSpace):toggleShow() 15 | end) 16 | 17 | -- activate cheatsheet 18 | hyper:bind({ "shift" }, "/", function () 19 | Cheatsheet:toggle() 20 | end) 21 | 22 | -- floating terminal 23 | hyper:bind({}, "`", function () 24 | FloatingTerm:toggle() 25 | end) 26 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/libraries/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- download libraries 4 | -- 5 | 6 | local helpers = require("helpers") 7 | 8 | -- foundation_remapping 9 | -- https://github.com/hetima/hammerspoon-foundation_remapping 10 | if not pcall(require, "libraries.foundation_remapping") then 11 | helpers.download_library( 12 | "foundation_remapping.lua", 13 | "https://raw.githubusercontent.com/hetima/hammerspoon-foundation_remapping/master/foundation_remapping.lua" 14 | ) 15 | end 16 | 17 | -- hyperex 18 | -- https://github.com/hetima/hammerspoon-hyperex 19 | if not pcall(require, "libraries.hyperex") then 20 | helpers.download_library( 21 | "hyperex.lua", 22 | "https://raw.githubusercontent.com/hetima/hammerspoon-hyperex/master/hyperex.lua" 23 | ) 24 | end 25 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/display.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- display.lua 3 | -- display related functions 4 | -- 5 | 6 | local config = require("configs").display 7 | 8 | Display = {} 9 | 10 | Display.is_docked = nil 11 | function Display:update_is_docked () 12 | self.is_docked = false 13 | 14 | for _, screen in ipairs(hs.screen.allScreens()) do 15 | if screen:name() == config.dock_display then 16 | self.is_docked = true 17 | end 18 | end 19 | end 20 | 21 | Display.on_docked_callbacks = {} 22 | function Display:on_docked (callback) 23 | table.insert(self.on_docked_callbacks, callback) 24 | end 25 | 26 | Display.on_undocked_callbacks = {} 27 | function Display:on_undocked (callback) 28 | table.insert(self.on_undocked_callbacks, callback) 29 | end 30 | 31 | function Display:on_screen_changed () 32 | local old_state = self.is_docked 33 | self:update_is_docked() 34 | local new_state = self.is_docked 35 | 36 | if old_state == new_state then return end 37 | 38 | if self.is_docked then 39 | for _, callback in ipairs(self.on_docked_callbacks) do callback() end 40 | else 41 | for _, callback in ipairs(self.on_undocked_callbacks) do callback() end 42 | end 43 | end 44 | 45 | function Display:init () 46 | self:update_is_docked() 47 | 48 | hs.screen.watcher.newWithActiveScreen( 49 | function () self:on_screen_changed() end 50 | ):start() 51 | end 52 | 53 | Display:init() 54 | Display:on_docked(function () hs.reload() end) 55 | Display:on_undocked(function () hs.reload() end) 56 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/expose.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- expose.lua 3 | -- keyboard-driven expose config 4 | -- 5 | 6 | hs.expose.ui.textColor = { 0.9, 0.9, 0.9 } 7 | 8 | hs.expose.ui.fontName = "HackGen Console" 9 | hs.expose.ui.textSize = 30 10 | 11 | hs.expose.ui.highlightColor = { 0.56, 0.74, 0.73, 0.8 } 12 | hs.expose.ui.backgroundColor = { 0, 0, 0, 0.8 } 13 | 14 | -- "close mode" engaged while pressed (or 'cmd','ctrl','alt') 15 | hs.expose.ui.closeModeModifier = "cmd" 16 | hs.expose.ui.closeModeBackgroundColor = { 0.75, 0.38, 0.42, 0.8 } 17 | 18 | -- "minimize mode" engaged while pressed 19 | hs.expose.ui.minimizeModeModifier = "shift" 20 | hs.expose.ui.minimizeModeBackgroundColor = { 0.92, 0.80, 0.55, 0.8 } 21 | 22 | -- only show windows of the active application 23 | hs.expose.ui.onlyActiveApplication = false 24 | -- include minimized and hidden windows 25 | hs.expose.ui.includeNonVisible = true 26 | -- contains hints for non-visible windows 27 | hs.expose.ui.nonVisibleStripBackgroundColor = { 0, 0, 0, 0.8 } 28 | -- set it to your Dock position ('bottom', 'left' or 'right') 29 | hs.expose.ui.nonVisibleStripPosition = "bottom" 30 | -- 0..0.5, width of the strip relative to the screen 31 | hs.expose.ui.nonVisibleStripWidth = 0.1 32 | 33 | -- include windows in other Mission Control Spaces 34 | hs.expose.ui.includeOtherSpaces = false 35 | hs.expose.ui.otherSpacesStripBackgroundColor = { 0.1, 0.1, 0.1, 1 } 36 | hs.expose.ui.otherSpacesStripPosition = "top" 37 | hs.expose.ui.otherSpacesStripWidth = 0.2 38 | 39 | -- show window titles 40 | hs.expose.ui.showTitles = true 41 | -- show window thumbnails 42 | hs.expose.ui.showThumbnails = true 43 | -- 0..1, opacity for thumbnails 44 | hs.expose.ui.thumbnailAlpha = 0 45 | -- 0..1, opacity for thumbnails of candidate windows 46 | hs.expose.ui.highlightThumbnailAlpha = 1 47 | -- thumbnail frame thickness for candidate windows 48 | hs.expose.ui.highlightThumbnailStrokeWidth = 8 49 | -- if necessary, hints longer than this will be disambiguated with digits 50 | hs.expose.ui.maxHintLetters = 2 51 | -- lower is faster, but higher chance of overlapping thumbnails 52 | hs.expose.ui.fitWindowsMaxIterations = 30 53 | -- improves responsivenss, but can affect the rest of the config 54 | hs.expose.ui.fitWindowsInBackground = false 55 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/floating_terminal.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- floating_terminal.lua 3 | -- floating terminal 4 | -- 5 | 6 | local config = require("configs").floating_terminal 7 | local wm = require("modules.wm") 8 | 9 | FloatingTerm = {} 10 | 11 | function FloatingTerm:get_instance () 12 | return hs.appfinder.windowFromWindowTitle(config.title) 13 | end 14 | 15 | function FloatingTerm:spawn_instance () 16 | os.execute(config.command) 17 | end 18 | 19 | function FloatingTerm:position_window () 20 | local window = self:get_instance() 21 | 22 | if window == nil then return end 23 | 24 | -- move window to active space 25 | wm.api.window.space(window:id(), "mouse &") 26 | 27 | -- reposition window 28 | local display = hs.screen.mainScreen() 29 | local display_frame = display:fullFrame() 30 | local x = display_frame.x + display_frame.w * (1 - 0.35) 31 | local y = display_frame.y 32 | 33 | wm.api.window.move(window:id(), string.format("abs:%s:%s &", x, y)) 34 | 35 | -- resize window 36 | local width = display_frame.w * 0.35 37 | local height = display_frame.h 38 | 39 | wm.api.window.resize(window:id(), string.format("abs:%s:%s &", width, height)) 40 | end 41 | 42 | function FloatingTerm:show () 43 | local instance = self:get_instance() 44 | 45 | if instance == nil then self:spawn_instance() end 46 | 47 | instance:unminimize() 48 | end 49 | 50 | function FloatingTerm:hide () 51 | local instance = self:get_instance() 52 | 53 | if instance == nil then return end 54 | 55 | instance:focus() 56 | hs.eventtap.keyStroke({ "cmd" }, "h") 57 | end 58 | 59 | function FloatingTerm:toggle () 60 | local instance = self:get_instance() 61 | 62 | if instance == nil then 63 | self:show() 64 | elseif hs.window.focusedWindow() ~= instance then 65 | instance:focus() 66 | else 67 | self:hide() 68 | end 69 | end 70 | 71 | hs.application.watcher.new(function (name, event) 72 | if name ~= config.name then return end 73 | 74 | if event ~= hs.application.watcher.launched then return end 75 | 76 | FloatingTerm:position_window() 77 | end):start() 78 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/hyper.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- hyper.lua 3 | -- Hyper key config 4 | -- 5 | 6 | local configs = require("configs") 7 | local keybindings = configs.keybindings 8 | 9 | local hyper = hs.hotkey.modal.new({}, nil) 10 | 11 | hyper.pressed = function () 12 | hyper:enter() 13 | end 14 | 15 | hyper.released = function () 16 | hyper:exit() 17 | end 18 | 19 | hs.hotkey.bind({}, keybindings.hyper, hyper.pressed, hyper.released) 20 | 21 | return hyper 22 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/init.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- init.lua 3 | -- init modules 4 | -- 5 | 6 | local config = require("configs") 7 | 8 | require("modules.ipc") 9 | require("modules.expose") 10 | 11 | if config.wm.mode == "yabai" then 12 | require("modules.layouts") 13 | require("modules.spaces") 14 | end 15 | 16 | require("modules.display") 17 | require("modules.cheatsheet") 18 | require("modules.floating_terminal") 19 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/ipc.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- ipc.lua 3 | -- ipc config 4 | -- 5 | 6 | if not hs.ipc.cliStatus() then 7 | hs.ipc.cliInstall() 8 | end 9 | 10 | require("hs.ipc") 11 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/layouts.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- layouts.lua 3 | -- current layout indicator menu bar widget 4 | -- 5 | 6 | local configs = require("configs") 7 | local wm = require("modules.wm") 8 | 9 | Layouts = {} 10 | 11 | -- init params 12 | Layouts.available_layouts = { "bsp", "stack", "float" } 13 | Layouts.active_layout = nil 14 | 15 | -- init menubar 16 | Layouts.menubar = hs.menubar.new() 17 | 18 | function Layouts:set_icon () 19 | local active_layout = self.active_layout or 'unknown' 20 | 21 | local icon = hs.image.imageFromPath(string.format( 22 | "%s/layouts/%s.pdf", 23 | configs.paths.icons, 24 | active_layout 25 | )):setSize({ 26 | w = configs.layouts.icon_size, 27 | h = configs.layouts.icon_size, 28 | }, true) 29 | 30 | self.menubar:setIcon(icon) 31 | end 32 | 33 | function Layouts:set_menu () 34 | local active_layout = self.active_layout or 'unknown' 35 | 36 | local menu = { 37 | { title = "Current Layout: " .. active_layout, disabled = true }, 38 | } 39 | 40 | for _, layout in ipairs(self.available_layouts) do 41 | table.insert(menu, { 42 | title = string.format("Switch to %s layout", layout), 43 | fn = function () 44 | wm.api.config("--space mouse layout " .. layout) 45 | self:update() 46 | end, 47 | }) 48 | end 49 | 50 | self.menubar:setMenu(menu) 51 | end 52 | 53 | function Layouts:update (layout) 54 | self.active_layout = layout 55 | 56 | if self.active_layout == nil then 57 | local window = wm.get_current_window() 58 | 59 | if window == nil then 60 | self.active_layout = "unknown" 61 | elseif window.floating == 1 then 62 | self.active_layout = "float" 63 | else 64 | self.active_layout = wm.get_current_space().type 65 | end 66 | end 67 | 68 | self:set_icon() 69 | self:set_menu() 70 | end 71 | 72 | Layouts:update() 73 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/modules/spaces.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- spaces.lua 3 | -- current space indicator menu bar widget 4 | -- 5 | 6 | local configs = require("configs") 7 | local wm = require("modules.wm") 8 | 9 | Spaces = {} 10 | 11 | -- init params 12 | Spaces.active_display_index = nil 13 | Spaces.active_space_index = nil 14 | Spaces.available_spaces = {} 15 | 16 | -- init menubar 17 | Spaces.menubar = hs.menubar.new() 18 | 19 | function Spaces:set_icon () 20 | local space_index = self.active_space_index or 'unknown' 21 | 22 | local icon = hs.image.imageFromPath(string.format( 23 | "%s/spaces/%s.pdf", 24 | configs.paths.icons, 25 | space_index 26 | )):setSize({ 27 | w = configs.spaces.icon_size, 28 | h = configs.spaces.icon_size, 29 | }, true) 30 | 31 | self.menubar:setIcon(icon) 32 | end 33 | 34 | function Spaces:set_menu () 35 | local display_index = self.active_display_index or 'unknown' 36 | local space_index = self.active_space_index or 'unknown' 37 | 38 | local menu = { 39 | { title = "Current Display: " .. display_index, disabled = true }, 40 | { title = "Current Space: " .. space_index, disabled = true }, 41 | } 42 | 43 | for _, space in ipairs(self.available_spaces) do 44 | table.insert(menu, { 45 | title = "Switch to Space " .. space, 46 | fn = function () wm.api.space.focus(nil, space) end, 47 | }) 48 | end 49 | 50 | self.menubar:setMenu(menu) 51 | end 52 | 53 | function Spaces:update(space) 54 | self.active_space_index = space 55 | 56 | if self.active_space_index == nil then 57 | local display_info = wm.get_current_display() or nil 58 | 59 | self.active_display_index = display_info and display_info.index or nil 60 | self.available_spaces = display_info and display_info.spaces or {} 61 | 62 | local current_space = wm.get_current_space() 63 | self.active_space_index = current_space and current_space.index or nil 64 | end 65 | 66 | self:set_icon() 67 | self:set_menu() 68 | end 69 | 70 | Spaces:update() 71 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/preferences.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- preferences.lua 3 | -- Hammerspoon preferences 4 | -- 5 | 6 | -- Check accessibility settings granted to hammerspoon 7 | hs.accessibilityState(true) 8 | 9 | -- Launch on login 10 | hs.autoLaunch(true) 11 | 12 | -- Check for updates 13 | hs.automaticallyCheckForUpdates(true) 14 | 15 | -- Always show console on top 16 | hs.consoleOnTop(true) 17 | 18 | -- Show menu icon 19 | hs.menuIcon(true) 20 | 21 | -- Hide dock icon 22 | hs.dockIcon(false) 23 | 24 | -- Enable dark mode 25 | hs.preferencesDarkMode(true) 26 | 27 | -- Don't report crashes 28 | hs.uploadCrashData(false) 29 | -------------------------------------------------------------------------------- /hyprland/.config/hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | ipc = off 2 | preload = ~/.dotfiles/awesomewm/.config/awesome/wallpapers/pe.jpg 3 | wallpaper = ,~/.dotfiles/awesomewm/.config/awesome/wallpapers/pe.jpg 4 | -------------------------------------------------------------------------------- /iterm2/Library/Preferences/com.googlecode.iterm2.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/iterm2/Library/Preferences/com.googlecode.iterm2.plist -------------------------------------------------------------------------------- /kde/.config/kcminputrc: -------------------------------------------------------------------------------- 1 | [$Version] 2 | update_info=delete_cursor_old_default_size.upd:DeleteCursorOldDefaultSize,kcminputrc_fix_botched_5_21_0.upd:kcminputrc_fix_botched_5_21_0_pre,kcminputrc_fix_botched_5_21_0.upd:kcminputrc_fix_botched_5_21_0,kcminputrc_repeat.upd:kcminputrc_migrate_key_repeat 3 | 4 | [Mouse] 5 | cursorTheme=Adwaita 6 | -------------------------------------------------------------------------------- /kde/.config/konsolerc: -------------------------------------------------------------------------------- 1 | MenuBar=Disabled 2 | State=AAAA/wAAAAD9AAAAAAAAA0UAAAOuAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgAAAAAA/////wAAAAAAAAAAAAAAHABzAGUAcwBzAGkAbwBuAFQAbwBvAGwAYgBhAHIAAAAAAP////8AAAAAAAAAAA== 3 | StatusBar=Disabled 4 | Virtual1 Height 1920x1080=942 5 | Virtual1 Width 1920x1080=837 6 | Virtual1 XPosition 1920x1080=1063 7 | Virtual1 YPosition 1920x1080=80 8 | 9 | [Desktop Entry] 10 | DefaultProfile=Nordic.profile 11 | 12 | [KonsoleWindow] 13 | RemoveWindowTitleBarAndFrame=true 14 | ShowMenuBarByDefault=false 15 | 16 | [MainWindow] 17 | MenuBar=Disabled 18 | State=AAAA/wAAAAD9AAAAAAAAB1oAAAOuAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgAAAAAA/////wAAAAAAAAAAAAAAHABzAGUAcwBzAGkAbwBuAFQAbwBvAGwAYgBhAHIAAAAAAP////8AAAAAAAAAAA== 19 | StatusBar=Disabled 20 | VGA-1 Height 1920x1080=942 21 | VGA-1 Width 1920x1080=1882 22 | VGA-1 XPosition 1920x1080=19 23 | VGA-1 YPosition 1920x1080=80 24 | Virtual1 Height 1920x1080=974 25 | Virtual1 Width 1920x1080=1890 26 | Virtual1 XPosition 1920x1080=15 27 | Virtual1 YPosition 1920x1080=52 28 | -------------------------------------------------------------------------------- /kde/.config/kscreenlockerrc: -------------------------------------------------------------------------------- 1 | [$Version] 2 | update_info=kscreenlocker.upd:0.1-autolock 3 | 4 | [Greeter][Wallpaper][org.kde.image][General] 5 | Image=/home/adwin/Downloads/bg.jpg 6 | -------------------------------------------------------------------------------- /kde/.config/ksplashrc: -------------------------------------------------------------------------------- 1 | [KSplash] 2 | Engine=none 3 | Theme=None 4 | -------------------------------------------------------------------------------- /kde/.config/ktimezonedrc: -------------------------------------------------------------------------------- 1 | [TimeZones] 2 | LocalZone=Asia/Tokyo 3 | ZoneinfoDir=/usr/share/zoneinfo 4 | Zonetab=/usr/share/zoneinfo/zone.tab 5 | -------------------------------------------------------------------------------- /kde/.config/kwalletrc: -------------------------------------------------------------------------------- 1 | [Wallet] 2 | First Use=false 3 | -------------------------------------------------------------------------------- /kde/.config/kwinrc: -------------------------------------------------------------------------------- 1 | [$Version] 2 | update_info=kwin.upd:replace-scalein-with-scale,kwin.upd:port-minimizeanimation-effect-to-js,kwin.upd:port-scale-effect-to-js,kwin.upd:port-dimscreen-effect-to-js,kwin.upd:auto-bordersize,kwin.upd:animation-speed,kwin.upd:desktop-grid-click-behavior,kwin.upd:no-swap-encourage 3 | 4 | [Compositing] 5 | OpenGLIsUnsafe=false 6 | 7 | [Desktops] 8 | Id_1=ce120653-99a9-44cd-9f12-31d45a8a27cb 9 | Id_2=fbdc89a4-a5f5-4380-a9d5-f783a2da1271 10 | Id_3=8bf3e8fd-31a5-4642-b455-9b49bb72d3cd 11 | Id_4=a7e8aba2-46b4-4ad3-8948-72a8d9b2bde1 12 | Id_5=75e99257-15cd-4620-85d4-796e7aa38c65 13 | Id_6=583d0f75-78e0-4d71-b1e4-e0302f1d1768 14 | Name_1=1. Main 15 | Name_2=2. Browser 16 | Name_3=3. Code 17 | Name_4=4. Chat 18 | Name_5=5. Multimedia 19 | Name_6=6. Misc 20 | Number=6 21 | Rows=3 22 | 23 | [Effect-PresentWindows] 24 | BorderActivateAll=9 25 | 26 | [ElectricBorders] 27 | BottomRight=ShowDesktop 28 | 29 | [Plugins] 30 | desktopchangeosdEnabled=true 31 | krohnkiteEnabled=true 32 | minimizeallEnabled=false 33 | slideEnabled=false 34 | synchronizeskipswitcherEnabled=false 35 | videowallEnabled=false 36 | 37 | [Script-desktopchangeosd] 38 | PopupHideDelay=500 39 | TextOnly=true 40 | 41 | [Script-krohnkite] 42 | directionalKeyDwm=false 43 | directionalKeyFocus=true 44 | enableFloatingLayout=true 45 | enableSpreadLayout=false 46 | enableStairLayout=false 47 | enableThreeColumnLayout=false 48 | monocleMaximize=false 49 | screenGapBottom=10 50 | screenGapLeft=15 51 | screenGapRight=15 52 | screenGapTop=10 53 | tileLayoutGap=10 54 | 55 | [TabBox] 56 | BorderActivate=9 57 | 58 | [Windows] 59 | BorderlessMaximizedWindows=true 60 | -------------------------------------------------------------------------------- /kde/.config/kwinrulesrc: -------------------------------------------------------------------------------- 1 | [$Version] 2 | update_info=kwinrules.upd:replace-placement-string-to-enum 3 | 4 | [1] 5 | Description=Settings for Brave 6 | desktop=2 7 | desktoprule=3 8 | wmclass=brave-browser 9 | wmclassmatch=1 10 | 11 | [2] 12 | Description=Settings for st-256color 13 | desktop=3 14 | desktoprule=3 15 | wmclass=st-256color 16 | wmclassmatch=1 17 | 18 | [General] 19 | count=2 20 | -------------------------------------------------------------------------------- /kde/.config/latte/.multiple-layouts_hidden.layout.latte: -------------------------------------------------------------------------------- 1 | [LayoutSettings] 2 | color=red 3 | showInMenu=true 4 | version=2 5 | -------------------------------------------------------------------------------- /kde/.config/latte/Default.layout.latte: -------------------------------------------------------------------------------- 1 | [ActionPlugins][1] 2 | RightButton;NoModifier=org.kde.latte.contextmenu 3 | 4 | [Containments][1] 5 | activityId= 6 | byPassWM=false 7 | dockWindowBehavior=true 8 | enableKWinEdges=true 9 | formfactor=2 10 | immutability=1 11 | isPreferredForShortcuts=false 12 | lastScreen=-1 13 | layoutId= 14 | location=4 15 | name=Default Dock 16 | onPrimary=true 17 | plugin=org.kde.latte.containment 18 | raiseOnActivityChange=false 19 | raiseOnDesktopChange=false 20 | timerHide=700 21 | timerShow=200 22 | viewType=0 23 | visibility=2 24 | wallpaperplugin=org.kde.image 25 | 26 | [Containments][1][Applets][2] 27 | immutability=1 28 | plugin=org.kde.latte.plasmoid 29 | 30 | [Containments][1][Applets][2][Configuration] 31 | PreloadWeight=0 32 | 33 | [Containments][1][Applets][2][Configuration][General] 34 | isInLatteDock=true 35 | launchers59=applications:firefox.desktop,applications:org.kde.dolphin.desktop 36 | 37 | [Containments][1][Applets][3] 38 | immutability=1 39 | plugin=org.kde.plasma.analogclock 40 | 41 | [Containments][1][Applets][3][Configuration] 42 | PreloadWeight=0 43 | 44 | [Containments][1][ConfigDialog] 45 | DialogHeight=600 46 | DialogWidth=586 47 | 48 | [Containments][1][Configuration] 49 | PreloadWeight=0 50 | 51 | [Containments][1][General] 52 | advanced=false 53 | alignmentUpgraded=true 54 | appletOrder=2;3 55 | configurationSticker=true 56 | panelSize=10 57 | shadowOpacity=60 58 | shadowSize=45 59 | shadows=All 60 | shadowsUpgraded=true 61 | showGlow=false 62 | tasksUpgraded=true 63 | titleTooltips=false 64 | zoomLevel=17 65 | 66 | [Containments][1][Indicator] 67 | customType= 68 | enabled=true 69 | type=org.kde.latte.default 70 | 71 | [LayoutSettings] 72 | activities= 73 | backgroundStyle=0 74 | color=blue 75 | customBackground= 76 | customTextColor= 77 | icon= 78 | lastUsedActivity= 79 | launchers= 80 | popUpMargin=-1 81 | preferredForShortcutsTouched=false 82 | showInMenu=true 83 | version=2 84 | -------------------------------------------------------------------------------- /kde/.config/lattedockrc: -------------------------------------------------------------------------------- 1 | [KFileDialog Settings] 2 | detailViewIconSize=16 3 | 4 | [KPropertiesDialog] 5 | eDP-1 Height 1366x768=454 6 | eDP-1 Width 1366x768=417 7 | 8 | [LatteSettingsDialog] 9 | downloadWindowSize=980,600 10 | windowSize=1102,640 11 | 12 | [LatteSettingsDialog][DetailsDialog] 13 | windowSize=560,640 14 | 15 | [LatteSettingsDialog][TabLayouts] 16 | columnWidths=49,508,129,104 17 | sortColumn=3 18 | sortOrder=0 19 | 20 | [LatteSettingsDialog][ViewsDialog] 21 | columnWidths=59,256,142,135,131 22 | sortColumn=2 23 | sortOrder=0 24 | windowSize=980,630 25 | 26 | [PlasmaThemeExtended] 27 | outlineWidth=1 28 | 29 | [ScreenConnectors] 30 | 10=eDP-1:::0,0 1366x768 31 | 32 | [UniversalSettings] 33 | badges3DStyle=false 34 | canDisableBorders=true 35 | contextMenuActionsAlwaysShown= 36 | inAdvancedModeForEditSettings=true 37 | isAvailableGeometryBroadcastedToPlasma=true 38 | launchers= 39 | memoryUsage=0 40 | metaPressAndHoldEnabled=false 41 | mouseSensitivity=2 42 | screenTrackerInterval=2500 43 | showInfoWindow=true 44 | singleModeLayoutName=My Layout 45 | userConfiguredAutostart=true 46 | version=2 47 | -------------------------------------------------------------------------------- /kde/.config/plasma-localerc: -------------------------------------------------------------------------------- 1 | [Formats] 2 | LANG=en_US.UTF-8 3 | -------------------------------------------------------------------------------- /kde/.config/plasma-org.kde.plasma.desktop-appletsrc: -------------------------------------------------------------------------------- 1 | [ActionPlugins][0] 2 | MiddleButton;NoModifier=org.kde.paste 3 | RightButton;NoModifier=org.kde.contextmenu 4 | wheel:Vertical;NoModifier=org.kde.switchdesktop 5 | 6 | [ActionPlugins][1] 7 | RightButton;NoModifier=org.kde.contextmenu 8 | 9 | [Containments][1] 10 | ItemGeometries-1366x768= 11 | ItemGeometriesHorizontal= 12 | activityId=bc52799f-9353-4ee8-b223-062228f4ae8e 13 | formfactor=0 14 | immutability=1 15 | lastScreen=0 16 | location=0 17 | plugin=org.kde.plasma.folder 18 | wallpaperplugin=org.kde.image 19 | 20 | [Containments][1][ConfigDialog] 21 | DialogHeight=558 22 | DialogWidth=720 23 | 24 | [Containments][1][Configuration] 25 | PreloadWeight=0 26 | 27 | [Containments][1][General] 28 | ToolBoxButtonState=topcenter 29 | ToolBoxButtonX=300 30 | ToolBoxButtonY=43 31 | filterMimeTypes=\\0 32 | 33 | [Containments][1][Wallpaper][org.kde.image][General] 34 | FillMode=0 35 | Image=file:///home/adwin/Downloads/bg.jpg 36 | SlidePaths=/usr/share/wallpapers 37 | 38 | [Containments2Appletsts][24][Configuration][General] 39 | containmentType=Plasma 40 | formFactor=3 41 | lengthFirstMargin=2 42 | lengthLastMargin=5 43 | lengthMarginsLock=false 44 | showIcon=false 45 | 46 | [ScreenMapping] 47 | itemsOnDisabledScreens= 48 | -------------------------------------------------------------------------------- /kde/.config/plasmarc: -------------------------------------------------------------------------------- 1 | [Theme] 2 | name=Nordic 3 | 4 | [Wallpapers] 5 | usersWallpapers=/home/adwin/Downloads/bg.jpg 6 | -------------------------------------------------------------------------------- /kde/.config/plasmashellrc: -------------------------------------------------------------------------------- 1 | [KFileDialog Settings] 2 | Recent Files[$e]=bg.jpg,file:$HOME/Downloads/bg.jpg 3 | Recent URLs[$e]=file:$HOME/Downloads/ 4 | detailViewIconSize=16 5 | 6 | [PlasmaViews][Panel 15][Defaults] 7 | thickness=27 8 | 9 | [PlasmaViews][Panel 15][Horizontal1366] 10 | thickness=27 11 | 12 | [PlasmaViews][Panel 2][Defaults] 13 | maxLength=1325 14 | minLength=1298 15 | offset=0 16 | thickness=28 17 | 18 | [PlasmaViews][Panel 2][Horizontal1366] 19 | maxLength=1325 20 | minLength=1298 21 | offset=17 22 | thickness=28 23 | 24 | [PlasmaViews][Panel 2][Vertical768] 25 | offset=0 26 | 27 | [ScreenConnectors] 28 | 0=eDP-1 29 | 30 | [Updates] 31 | performed=/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/containmentactions_middlebutton.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/maintain_existing_desktop_icon_sizes.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/klipper_clear_config.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/unlock_widgets.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/systemloadviewer_systemmonitor.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/move_desktop_layout_config.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/obsolete_kickoffrc.js,/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/digitalclock_rename_timezonedisplay_key.js 32 | -------------------------------------------------------------------------------- /kde/.local/share/konsole/Nordic.profile: -------------------------------------------------------------------------------- 1 | [Appearance] 2 | ColorScheme=Nordic 3 | Font=Inconsolata for Powerline,11,-1,5,57,0,0,0,0,0,Medium 4 | 5 | [General] 6 | Name=Nordic 7 | Parent=FALLBACK/ 8 | TerminalMargin=10 9 | -------------------------------------------------------------------------------- /kitty/.config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # 2 | # _ _____ _____ _______ __ 3 | # | |/ /_ _|_ _|_ _\ \ / / 4 | # | ' < | | | | | | \ V / 5 | # |_|\_\___| |_| |_| |_| 6 | # 7 | 8 | font_family HackGenNerd Console 9 | font_size 14.0 10 | 11 | shell_integration no-cursor 12 | cursor_blink_interval 0 13 | 14 | remember_window_size no 15 | initial_window_width 1280 16 | initial_window_height 800 17 | window_padding_width 15 18 | hide_window_decorations titlebar-only 19 | confirm_os_window_close 0 20 | 21 | background_opacity 0.9 22 | foreground #D8DEE9 23 | background #171A20 24 | selection_foreground #000000 25 | selection_background #FFFACD 26 | url_color #0087BD 27 | cursor #D8DEE9 28 | 29 | # black 30 | color0 #3B4252 31 | color8 #4C566A 32 | 33 | # red 34 | color1 #BF616A 35 | color9 #BF616A 36 | 37 | # green 38 | color2 #A3BE8C 39 | color10 #A3BE8C 40 | 41 | # yellow 42 | color3 #EBCB8B 43 | color11 #EBCB8B 44 | 45 | # blue 46 | color4 #81A1C1 47 | color12 #81A1C1 48 | 49 | # magenta 50 | color5 #B48EAD 51 | color13 #B48EAD 52 | 53 | # cyan 54 | color6 #88C0D0 55 | color14 #8FBCBB 56 | 57 | # white 58 | color7 #E5E9F0 59 | color15 #ECEFF4 60 | 61 | map alt+a send_text all \x1ba 62 | map alt+b send_text all \x1bb 63 | map alt+c send_text all \x1bc 64 | map alt+d send_text all \x1bd 65 | map alt+e send_text all \x1be 66 | map alt+f send_text all \x1bf 67 | map alt+g send_text all \x1bg 68 | map alt+h send_text all \x1bh 69 | map alt+i send_text all \x1bi 70 | map alt+j send_text all \x1bj 71 | map alt+k send_text all \x1bk 72 | map alt+l send_text all \x1bl 73 | map alt+m send_text all \x1bm 74 | map alt+n send_text all \x1bn 75 | map alt+o send_text all \x1bo 76 | map alt+p send_text all \x1bp 77 | map alt+q send_text all \x1bq 78 | map alt+r send_text all \x1br 79 | map alt+s send_text all \x1bs 80 | map alt+t send_text all \x1bt 81 | map alt+u send_text all \x1bu 82 | map alt+v send_text all \x1bv 83 | map alt+w send_text all \x1bw 84 | map alt+x send_text all \x1bx 85 | map alt+y send_text all \x1by 86 | map alt+z send_text all \x1bz 87 | -------------------------------------------------------------------------------- /lazygit/.config/lazygit/config.yml: -------------------------------------------------------------------------------- 1 | geporting: "off" 2 | reporting: "off" 3 | startuppopupversion: 1 4 | 5 | gui: 6 | showFileTree: false 7 | 8 | keybinding: 9 | commits: 10 | moveDownCommit: 11 | moveUpCommit: 12 | 13 | customCommands: 14 | - key: 15 | command: "git remote prune {{.SelectedRemote.Name}}" 16 | context: remoteBranches 17 | description: Prune deleted branches 18 | loadingText: Pruning remote... 19 | -------------------------------------------------------------------------------- /lazygit/Library/Application Support/lazygit/config.yml: -------------------------------------------------------------------------------- 1 | ../../../.config/lazygit/config.yml -------------------------------------------------------------------------------- /macos.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # macos.sh 5 | # Install and configure commonly used apps in macOS. 6 | # 7 | 8 | echox() { 9 | echo ">> "$1 10 | } 11 | 12 | echo " " 13 | echo "# " 14 | echo "# macos.sh" 15 | echo "# " 16 | 17 | # Pre-install configuration 18 | echox " " 19 | echox "Starting preconfig..." 20 | 21 | echox " " 22 | echox "Searching and installing macOS updates..." 23 | softwareupdate -i -a 24 | 25 | echox " " 26 | echox "Installing Xcode command-based tools..." 27 | xcode-select --install 28 | 29 | echox " " 30 | echox "Preconfig done." 31 | 32 | echox " " 33 | echox "Installing homebrew..." 34 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 35 | 36 | echox " " 37 | echox "Updating homebrew..." 38 | brew update 39 | brew doctor 40 | 41 | echox " " 42 | echox "macOS script done." 43 | sleep 1 44 | -------------------------------------------------------------------------------- /neovim/.config/nvim/basic.vim: -------------------------------------------------------------------------------- 1 | ../../../vim/.vim/basic.vim -------------------------------------------------------------------------------- /neovim/.config/nvim/colors: -------------------------------------------------------------------------------- 1 | ../../../vim/.vim/colors -------------------------------------------------------------------------------- /nix-config/machines/bootes/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # bootes-specific configs 3 | # 4 | 5 | { ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | ./hardware-configuration.nix 9 | ../../modules/base.nix 10 | ../../modules/linux.nix 11 | ../../modules/docker.nix 12 | ../../modules/tailscale.nix 13 | ]; 14 | 15 | # Import overlays for this machine 16 | nixpkgs.overlays = []; 17 | 18 | # Increase file watch limit 19 | boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288; 20 | 21 | # Bootloader configs 22 | boot.loader.grub.efiSupport = true; 23 | boot.loader.grub.efiInstallAsRemovable = true; 24 | boot.loader.grub.device = "nodev"; 25 | boot.initrd.kernelModules = [ "nvme" ]; 26 | 27 | # No need firewall as this machine is not public facing 28 | networking.firewall.enable = false; 29 | 30 | # Accept tailscale subnet routing routes 31 | services.tailscale.acceptRoutes = true; 32 | 33 | # Import addtional user profiles for this machine 34 | _module.args.profiles = [ 35 | ../../profiles/dev.nix 36 | ]; 37 | } 38 | -------------------------------------------------------------------------------- /nix-config/machines/bootes/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/profiles/qemu-guest.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-label/nixos"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-label/boot"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = [ ]; 27 | 28 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 29 | # (the default) this is the recommended approach. When using systemd-networkd it's 30 | # still possible to use this option, but it's recommended to use it in conjunction 31 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 32 | networking.useDHCP = lib.mkDefault true; 33 | # networking.interfaces.enp0s3.useDHCP = lib.mkDefault true; 34 | 35 | nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; 36 | } 37 | -------------------------------------------------------------------------------- /nix-config/machines/live/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # live environment-specific configs 3 | # 4 | 5 | { pkgs, inputs, lib, ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | (inputs.nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") 9 | ../../modules/base.nix 10 | ../../modules/linux.nix 11 | ../../modules/docker.nix 12 | ../../modules/tailscale.nix 13 | ../../modules/wayland.nix 14 | ../../modules/wireless.nix 15 | ]; 16 | 17 | # Use the latest kernel 18 | boot.kernelPackages = pkgs.linuxPackages_latest; 19 | 20 | # Disable zfs since it's broken 21 | boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; 22 | 23 | # Import overlays for this machine 24 | nixpkgs.overlays = []; 25 | 26 | # Fix conflicting options from base.nix 27 | services.openssh.settings.PermitRootLogin = lib.mkForce "no"; 28 | 29 | # Make ISO builds faster by using a less efficient compression algorithm 30 | isoImage.squashfsCompression = "gzip -Xcompression-level 1"; 31 | 32 | # Import addtional user profiles for this machine 33 | _module.args.profiles = [ 34 | ../../profiles/wayland.nix 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /nix-config/machines/mayodev/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # workdev-specific configs 3 | # 4 | 5 | { inputs, ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | (inputs.nixpkgs + "/nixos/modules/virtualisation/lxc-container.nix") 9 | ./hardware-configuration.nix 10 | ../../modules/base.nix 11 | ../../modules/linux.nix 12 | ../../modules/docker.nix 13 | ../../modules/tailscale.nix 14 | ]; 15 | 16 | # Import overlays for this machine 17 | nixpkgs.overlays = []; 18 | 19 | # Increase file watch limit 20 | boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288; 21 | 22 | # No need firewall as this machine is not public facing 23 | networking.firewall.enable = false; 24 | 25 | # Accept tailscale subnet routing routes 26 | services.tailscale.acceptRoutes = true; 27 | 28 | # Import addtional user profiles for this machine 29 | _module.args.profiles = [ 30 | ../../profiles/dev.nix 31 | ]; 32 | } 33 | -------------------------------------------------------------------------------- /nix-config/machines/mayonaca/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # mayonaca-specific configs 3 | # 4 | 5 | { inputs, ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | ../../modules/base.nix 9 | ../../modules/darwin.nix 10 | ../../modules/homebrew.nix 11 | ../../modules/tailscale.nix 12 | ]; 13 | 14 | # Import overlays for this machine 15 | nixpkgs.overlays = []; 16 | 17 | # Import addtional user profiles for this machine 18 | _module.args.profiles = [ 19 | ../../profiles/darwin.nix 20 | ../../profiles/dev.nix 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /nix-config/machines/nas/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-label/nixos"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-label/boot"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | fileSystems."/home" = 27 | { device = "/dev/disk/by-label/home"; 28 | fsType = "ext4"; 29 | }; 30 | 31 | swapDevices = 32 | [ { device = "/dev/disk/by-label/swap"; } 33 | ]; 34 | 35 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 36 | # (the default) this is the recommended approach. When using systemd-networkd it's 37 | # still possible to use this option, but it's recommended to use it in conjunction 38 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 39 | networking.useDHCP = lib.mkDefault true; 40 | # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; 41 | # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; 42 | # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; 43 | # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; 44 | 45 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 46 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 47 | } 48 | -------------------------------------------------------------------------------- /nix-config/machines/outpost/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # router-specific configs 3 | # 4 | 5 | { pkgs, username, ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | ./hardware-configuration.nix 9 | ../../modules/base.nix 10 | ../../modules/linux.nix 11 | ../../modules/wireless.nix 12 | ../../modules/tailscale.nix 13 | ]; 14 | 15 | # Import overlays for this machine 16 | nixpkgs.overlays = []; 17 | 18 | # Configure Tailscale 19 | services.tailscale = { 20 | exitNode = true; 21 | acceptRoutes = true; 22 | }; 23 | 24 | # Bootloader configs 25 | boot.loader.grub.efiSupport = true; 26 | boot.loader.grub.efiInstallAsRemovable = true; 27 | boot.loader.grub.device = "nodev"; 28 | boot.initrd.kernelModules = [ "nvme" ]; 29 | 30 | # Configure firewall 31 | networking.firewall = { 32 | allowedTCPPorts = [ 33 | # SSH 34 | 22 35 | ]; 36 | allowedUDPPorts = [ 37 | ]; 38 | }; 39 | 40 | # Import addtional user profiles for this machine 41 | _module.args.profiles = []; 42 | } 43 | -------------------------------------------------------------------------------- /nix-config/machines/outpost/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-label/nixos"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-label/boot"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | fileSystems."/home" = 27 | { device = "/dev/disk/by-label/home"; 28 | fsType = "ext4"; 29 | }; 30 | 31 | swapDevices = 32 | [ { device = "/dev/disk/by-label/swap"; } 33 | ]; 34 | 35 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 36 | # (the default) this is the recommended approach. When using systemd-networkd it's 37 | # still possible to use this option, but it's recommended to use it in conjunction 38 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 39 | networking.useDHCP = lib.mkDefault true; 40 | # networking.interfaces.eno1.useDHCP = lib.mkDefault true; 41 | # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; 42 | 43 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 44 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 45 | } 46 | -------------------------------------------------------------------------------- /nix-config/machines/router/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-label/nixos"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-label/boot"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = 27 | [ { device = "/dev/disk/by-label/swap"; } 28 | ]; 29 | 30 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 31 | # (the default) this is the recommended approach. When using systemd-networkd it's 32 | # still possible to use this option, but it's recommended to use it in conjunction 33 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 34 | networking.useDHCP = lib.mkDefault true; 35 | # networking.interfaces.eno1.useDHCP = lib.mkDefault true; 36 | # networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true; 37 | # networking.interfaces.enp1s0f1.useDHCP = lib.mkDefault true; 38 | # networking.interfaces.enp1s0f2.useDHCP = lib.mkDefault true; 39 | # networking.interfaces.enp1s0f3.useDHCP = lib.mkDefault true; 40 | # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; 41 | # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; 42 | 43 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 44 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 45 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 46 | } 47 | -------------------------------------------------------------------------------- /nix-config/machines/thkpad/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # thkpad-specific configs 3 | # 4 | 5 | { ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | ./hardware-configuration.nix 9 | ../../modules/base.nix 10 | ../../modules/linux.nix 11 | ../../modules/docker.nix 12 | ../../modules/tailscale.nix 13 | ../../modules/wayland.nix 14 | ../../modules/wireless.nix 15 | ]; 16 | 17 | # Import overlays for this machine 18 | nixpkgs.overlays = []; 19 | 20 | # Bootloader configs 21 | boot.loader.grub.efiSupport = true; 22 | boot.loader.grub.efiInstallAsRemovable = true; 23 | boot.loader.grub.device = "nodev"; 24 | boot.initrd.kernelModules = [ "nvme" ]; 25 | 26 | # Import addtional user profiles for this machine 27 | _module.args.profiles = [ 28 | ../../profiles/dev.nix 29 | ../../profiles/wayland.nix 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /nix-config/machines/thkpad/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "sd_mod" "rtsx_pci_sdmmc" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-uuid/475778e5-666e-439b-a87c-e5f426bde193"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-uuid/16E0-3470"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = [ ]; 27 | 28 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 29 | # (the default) this is the recommended approach. When using systemd-networkd it's 30 | # still possible to use this option, but it's recommended to use it in conjunction 31 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 32 | networking.useDHCP = lib.mkDefault true; 33 | # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; 34 | # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; 35 | # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; 36 | 37 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 38 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 39 | } 40 | -------------------------------------------------------------------------------- /nix-config/machines/tunnel/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/profiles/qemu-guest.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-label/nixos"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-label/boot"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = [ ]; 27 | 28 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 29 | # (the default) this is the recommended approach. When using systemd-networkd it's 30 | # still possible to use this option, but it's recommended to use it in conjunction 31 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 32 | networking.useDHCP = lib.mkDefault true; 33 | # networking.interfaces.enp0s3.useDHCP = lib.mkDefault true; 34 | 35 | nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; 36 | } 37 | -------------------------------------------------------------------------------- /nix-config/machines/workdev/configuration.nix: -------------------------------------------------------------------------------- 1 | # 2 | # workdev-specific configs 3 | # 4 | 5 | { inputs, ... }: { 6 | # Import system modules for this machine 7 | imports = [ 8 | (inputs.nixpkgs + "/nixos/modules/virtualisation/lxc-container.nix") 9 | ./hardware-configuration.nix 10 | ../../modules/base.nix 11 | ../../modules/linux.nix 12 | ../../modules/docker.nix 13 | ../../modules/tailscale.nix 14 | ../../modules/xserver.nix 15 | ]; 16 | 17 | # Import overlays for this machine 18 | nixpkgs.overlays = []; 19 | 20 | # Increase file watch limit 21 | boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288; 22 | 23 | # No need firewall as this machine is not public facing 24 | networking.firewall.enable = false; 25 | 26 | # Accept tailscale subnet routing routes 27 | services.tailscale.acceptRoutes = true; 28 | 29 | # Import addtional user profiles for this machine 30 | _module.args.profiles = [ 31 | ../../profiles/dev.nix 32 | ../../profiles/gui.nix 33 | ]; 34 | } 35 | -------------------------------------------------------------------------------- /nix-config/modules/docker.nix: -------------------------------------------------------------------------------- 1 | { inputs, config, pkgs, username, ... }: { 2 | environment.systemPackages = [ pkgs.docker ]; 3 | virtualisation.docker.enable = true; 4 | users.users.${username}.extraGroups = [ "docker" ]; 5 | } 6 | -------------------------------------------------------------------------------- /nix-config/modules/homebrew.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | homebrew = { 3 | enable = true; 4 | onActivation = { 5 | cleanup = "zap"; 6 | autoUpdate = true; 7 | upgrade = true; 8 | }; 9 | }; 10 | 11 | imports = [ 12 | # utils 13 | ({ 14 | homebrew.casks = [ 15 | "hammerspoon" 16 | "raycast" 17 | "flux" 18 | "aldente" 19 | "betterdisplay" 20 | "the-unarchiver" 21 | "mac-mouse-fix" 22 | "tailscale" 23 | "nikitabobko/tap/aerospace" 24 | ]; 25 | 26 | homebrew.masApps = { 27 | RunCat = 1429033973; 28 | ScreenZen = 1541027222; 29 | "Microsoft Remote Desktop" = 1295203466; 30 | }; 31 | }) 32 | 33 | # dev 34 | ({ 35 | homebrew.casks = [ 36 | "ghostty" 37 | "sublime-text" 38 | "orbstack" 39 | "tableplus" 40 | ]; 41 | }) 42 | 43 | # media 44 | ({ 45 | homebrew.casks = [ 46 | "arc" 47 | "iina" 48 | ]; 49 | }) 50 | ]; 51 | } 52 | -------------------------------------------------------------------------------- /nix-config/modules/linux.nix: -------------------------------------------------------------------------------- 1 | # 2 | # Linux-specific configs 3 | # 4 | 5 | { inputs, pkgs, username, ... }: { 6 | imports = [ 7 | # Import home-manager's NixOS module 8 | inputs.home-manager.nixosModules.home-manager 9 | ]; 10 | 11 | # Disable password prompt when using sudo 12 | security.sudo.wheelNeedsPassword = false; 13 | 14 | # This setups a SSH server. Very important if you're setting up a headless system. 15 | # Feel free to remove if you don't need it. 16 | services.openssh = { 17 | enable = true; 18 | # Forbid root login through SSH. 19 | settings.PermitRootLogin = "no"; 20 | }; 21 | 22 | # Configure your system-wide user settings (groups, etc), add more users as needed. 23 | users.users.${username} = { 24 | hashedPassword = "$y$j9T$KVgy.ReZophSp7Drn6dfe/$vHd3ect3ux0HVibBQaC/VSsQySz.Y3wocgqmsswxjh4"; 25 | isNormalUser = true; 26 | homeMode = "770"; 27 | # Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) 28 | extraGroups = [ 29 | "wheel" 30 | ]; 31 | }; 32 | 33 | # List packages installed in system profile. To search, run: 34 | # $ nix search wget 35 | environment.systemPackages = with pkgs; [ 36 | pciutils 37 | usbutils 38 | ]; 39 | 40 | # nix-ld: Allows compiled binaries to run on NixOS 41 | programs.nix-ld.enable = true; 42 | programs.nix-ld.libraries = with pkgs; [ 43 | stdenv.cc.cc 44 | systemd 45 | zlib 46 | ]; 47 | 48 | # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion 49 | system.stateVersion = "22.11"; 50 | } 51 | -------------------------------------------------------------------------------- /nix-config/modules/wayland.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | # Window manager 3 | programs.hyprland = { 4 | enable = true; 5 | xwayland.enable = true; 6 | }; 7 | 8 | # Audio 9 | security.rtkit.enable = true; 10 | services.pipewire = { 11 | enable = true; 12 | alsa.enable = true; 13 | alsa.support32Bit = true; 14 | pulse.enable = true; 15 | jack.enable = true; 16 | }; 17 | 18 | # Platform-independent key remapper 19 | services.keyd = { 20 | enable = true; 21 | keyboards.default = { 22 | ids = [ "*" ]; 23 | settings = { 24 | main = { 25 | capslock = "overload(control, esc)"; 26 | }; 27 | }; 28 | }; 29 | }; 30 | 31 | # Allow gtklock to work 32 | security.pam.services.gtklock = {}; 33 | } 34 | -------------------------------------------------------------------------------- /nix-config/modules/wireless.nix: -------------------------------------------------------------------------------- 1 | { lib, username, ... }: { 2 | networking.wireless.enable = lib.mkForce false; 3 | networking.networkmanager.enable = true; 4 | users.users.${username}.extraGroups = [ "networkmanager" ]; 5 | } 6 | -------------------------------------------------------------------------------- /nix-config/modules/xserver.nix: -------------------------------------------------------------------------------- 1 | { ... }: { 2 | services.xserver = { 3 | enable = true; 4 | displayManager.startx.enable = true; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /nix-config/profiles/backup.nix: -------------------------------------------------------------------------------- 1 | # 2 | # NAS appconfig backup 3 | # 4 | 5 | { pkgs, secrets, username, ... }: { 6 | home.packages = with pkgs; [ 7 | kopia 8 | ]; 9 | 10 | xdg.configFile.kopia.source = "${secrets}/kopia"; 11 | 12 | # Trigger backup job every day at 6am 13 | systemd.user = { 14 | timers.backup = { 15 | Unit.Description = "NAS appconfig backup"; 16 | 17 | Timer = { 18 | OnCalendar = "*-*-* 6:00:00"; 19 | Unit = "backup.service"; 20 | }; 21 | 22 | Install = { 23 | WantedBy = [ "timers.target" ]; 24 | }; 25 | }; 26 | 27 | services.backup = { 28 | Unit.Description = "NAS appconfig backup"; 29 | 30 | Service = { 31 | Type = "simple"; 32 | ExecStart = let 33 | script = pkgs.writeShellScriptBin "script" '' 34 | set -eu 35 | 36 | export PATH=$PATH:${pkgs.kopia}/bin 37 | export PATH=$PATH:${pkgs.coreutils}/bin 38 | export PATH=$PATH:${pkgs.curl}/bin 39 | 40 | appdata_dir=/home/${username}/nas-docker/appdata 41 | 42 | healthcheck_endpoint_path=${secrets}/healthcheck_backup_endpoint 43 | healthcheck_endpoint_url=$(cat $healthcheck_endpoint_path) 44 | 45 | kopia snapshot create $appdata_dir 46 | curl -fsS --retry 3 $healthcheck_endpoint_url 47 | ''; 48 | in "${script}/bin/script"; 49 | }; 50 | 51 | Install = { 52 | WantedBy = [ "default.target" ]; 53 | }; 54 | }; 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /nix-config/profiles/container.nix: -------------------------------------------------------------------------------- 1 | # 2 | # Overrides for container environment 3 | # 4 | 5 | { lib, ... }: { 6 | home.homeDirectory = "/root"; 7 | } 8 | -------------------------------------------------------------------------------- /nix-config/profiles/darwin.nix: -------------------------------------------------------------------------------- 1 | # 2 | # darwin-specific home-manager configs 3 | # GUI applications are managed by homebrew cask 4 | # @see modules/homebrew.nix 5 | # 6 | 7 | { dotfiles, ... }: { 8 | imports = [ 9 | # aerospace 10 | ({ 11 | xdg.configFile.aerospace.source = "${dotfiles}/aerospace/.config/aerospace"; 12 | }) 13 | 14 | # ghostty 15 | ({ 16 | xdg.configFile.ghostty.source = "${dotfiles}/ghostty/.config/ghostty"; 17 | }) 18 | 19 | # hammerspoon 20 | ({ 21 | home.file.".hammerspoon".source = "${dotfiles}/hammerspoon/.hammerspoon"; 22 | }) 23 | 24 | # lazygit 25 | ({ 26 | home.file."Library/Application\ Support/lazygit".source = "${dotfiles}/lazygit/.config/lazygit"; 27 | }) 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /nix-config/profiles/dev.nix: -------------------------------------------------------------------------------- 1 | # 2 | # programs/configs for the development 3 | # 4 | 5 | { lib, pkgs, dotfiles, ... }: lib.mkMerge [ 6 | # neovim 7 | ({ 8 | home.packages = with pkgs; [ 9 | gnumake 10 | gcc 11 | cargo 12 | nodejs 13 | unstable.go_1_22 14 | unstable.luajit 15 | unstable.rustc 16 | unstable.neovim # get the latest and greatest version 17 | ]; 18 | xdg.configFile.nvim.source = "${dotfiles}/neovim/.config/nvim"; 19 | }) 20 | ] 21 | -------------------------------------------------------------------------------- /nix-config/profiles/docker_update.nix: -------------------------------------------------------------------------------- 1 | # 2 | # NAS docker update 3 | # 4 | 5 | { pkgs, secrets, config, ... }: { 6 | systemd.user = { 7 | timers.docker-update = { 8 | Unit.Description = "Update docker containers"; 9 | 10 | Timer = { 11 | OnCalendar = "*-*-* 5:00:00"; 12 | Unit = "docker-update.service"; 13 | }; 14 | 15 | Install = { 16 | WantedBy = [ "timers.target" ]; 17 | }; 18 | }; 19 | 20 | services.docker-update = { 21 | Unit.Description = "Update docker containers"; 22 | 23 | Service = { 24 | Type = "simple"; 25 | ExecStart = let 26 | script = pkgs.writeShellScriptBin "script" '' 27 | set -eu 28 | 29 | export PATH=$PATH:${pkgs.bash}/bin 30 | export PATH=$PATH:${pkgs.coreutils}/bin 31 | export PATH=$PATH:${pkgs.docker}/bin 32 | export PATH=$PATH:${pkgs.curl}/bin 33 | 34 | home_path=${config.home.homeDirectory} 35 | dir_path=$home_path/nas-docker 36 | 37 | healthcheck_endpoint_path=${secrets}/healthcheck_docker_endpoint 38 | healthcheck_endpoint_url=$(cat $healthcheck_endpoint_path) 39 | 40 | cd $dir_path 41 | docker compose pull 42 | docker compose up -d 43 | docker image prune -f 44 | curl -fsS --retry 3 $healthcheck_endpoint_url 45 | ''; 46 | in "${script}/bin/script"; 47 | }; 48 | 49 | Install = { 50 | WantedBy = [ "default.target" ]; 51 | }; 52 | }; 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /nix-config/profiles/gui.nix: -------------------------------------------------------------------------------- 1 | # 2 | # programs/configs for GUI environment 3 | # xserver module is required to use this profile 4 | # 5 | 6 | { lib, pkgs, dotfiles, ... }: lib.mkMerge [ 7 | # xorg 8 | ({ 9 | home.packages = with pkgs; [ 10 | xorg.xmodmap 11 | xcape 12 | xclip 13 | ]; 14 | 15 | xsession = { 16 | enable = true; 17 | windowManager.awesome.enable = true; 18 | windowManager.awesome.luaModules = [ 19 | pkgs.luajitPackages.lgi 20 | ]; 21 | }; 22 | 23 | home.file = { 24 | ".Xresources".source = "${dotfiles}/xinit/.Xresources"; 25 | ".xinitrc".source = "${dotfiles}/xinit/.xinitrc"; 26 | ".Xmodmap".source = "${dotfiles}/xmodmap/.Xmodmap"; 27 | }; 28 | }) 29 | 30 | # fonts 31 | ({ 32 | home.packages = with pkgs; [ 33 | noto-fonts-cjk-sans 34 | noto-fonts-cjk-serif 35 | noto-fonts-emoji 36 | hackgen-font 37 | hackgen-nf-font 38 | ]; 39 | xdg.configFile.fontconfig.source = "${dotfiles}/fontconfig/.config/fontconfig"; 40 | }) 41 | 42 | # awesome 43 | ({ 44 | home.packages = with pkgs; [ 45 | awesome 46 | picom 47 | feh 48 | inotify-tools 49 | light 50 | maim 51 | playerctl 52 | ]; 53 | xdg.configFile.awesome.source = "${dotfiles}/awesomewm/.config/awesome"; 54 | }) 55 | 56 | # sound 57 | ({ 58 | home.packages = with pkgs; [ 59 | pavucontrol 60 | pulseaudio 61 | ]; 62 | }) 63 | 64 | # rofi 65 | ({ 66 | home.packages = [ pkgs.rofi ]; 67 | xdg.configFile.rofi.source = "${dotfiles}/rofi/.config/rofi"; 68 | }) 69 | 70 | # ghostty 71 | ({ 72 | home.packages = [ pkgs.ghostty ]; 73 | xdg.configFile.ghostty.source = "${dotfiles}/ghostty/.config/ghostty"; 74 | }) 75 | 76 | # firefox 77 | ({ 78 | home.packages = [ pkgs.firefox ]; 79 | }) 80 | ] 81 | -------------------------------------------------------------------------------- /nix-config/profiles/i18n.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/nix-config/profiles/i18n.nix -------------------------------------------------------------------------------- /nix-config/profiles/wayland.nix: -------------------------------------------------------------------------------- 1 | # 2 | # programs/configs for wayland environment 3 | # xserver module is required to use this profile 4 | # 5 | 6 | { lib, pkgs, dotfiles, ... }: lib.mkMerge [ 7 | # fonts 8 | ({ 9 | home.packages = with pkgs; [ 10 | noto-fonts-cjk-sans 11 | noto-fonts-cjk-serif 12 | noto-fonts-emoji 13 | hackgen-font 14 | hackgen-nf-font 15 | ]; 16 | xdg.configFile.fontconfig.source = "${dotfiles}/fontconfig/.config/fontconfig"; 17 | }) 18 | 19 | # theme 20 | ({ 21 | qt = { 22 | enable = true; 23 | platformTheme.name = "gtk3"; 24 | }; 25 | gtk = { 26 | enable = true; 27 | theme.name = "Nordic-darker"; 28 | theme.package = pkgs.nordic; 29 | iconTheme.name = "Zafiro-icons-Dark"; 30 | iconTheme.package = pkgs.zafiro-icons; 31 | }; 32 | }) 33 | 34 | # hyprland 35 | ({ 36 | home.packages = with pkgs; [ 37 | hyprpaper 38 | waybar 39 | gtklock 40 | wl-clipboard 41 | cliphist 42 | pavucontrol 43 | brightnessctl 44 | playerctl 45 | libnotify 46 | swaynotificationcenter 47 | ]; 48 | xdg.configFile.hypr.source = "${dotfiles}/hyprland/.config/hypr"; 49 | xdg.configFile.waybar.source = "${dotfiles}/waybar/.config/waybar"; 50 | xdg.configFile.swaync.source = "${dotfiles}/swaync/.config/swaync"; 51 | }) 52 | 53 | # rofi 54 | ({ 55 | home.packages = with pkgs; [ 56 | rofi-wayland-unwrapped 57 | rofi-calc 58 | rofi-emoji 59 | ]; 60 | xdg.configFile.rofi.source = "${dotfiles}/rofi/.config/rofi"; 61 | }) 62 | 63 | # ghostty 64 | ({ 65 | home.packages = [ pkgs.ghostty ]; 66 | xdg.configFile.ghostty.source = "${dotfiles}/ghostty/.config/ghostty"; 67 | }) 68 | 69 | # firefox 70 | ({ 71 | home.packages = [ pkgs.firefox ]; 72 | }) 73 | ] 74 | -------------------------------------------------------------------------------- /packages/README.md: -------------------------------------------------------------------------------- 1 | # pacman packages 2 | 3 | Package list for easy bootstrap 4 | 5 | ## Prerequisites 6 | 7 | - Arch Linux (btw) 8 | - Your favorite AUR hepler (paru in my case) 9 | 10 | ## How to use 11 | 12 | ### Installing packages from all lists 13 | 14 | ```bash 15 | $ paru -S --needed - < *.txt 16 | ``` 17 | 18 | ### Installing packages from specified lists 19 | 20 | ```bash 21 | $ paru -S --needed - < list1.txt list2.txt 22 | ``` 23 | 24 | ### Backing up packages 25 | 26 | ```bash 27 | $ pacman -Qqe > pkglist.txt 28 | ``` 29 | -------------------------------------------------------------------------------- /packages/apps.txt: -------------------------------------------------------------------------------- 1 | brave-bin 2 | discord 3 | spotify 4 | spicetify-cli 5 | -------------------------------------------------------------------------------- /packages/cli.txt: -------------------------------------------------------------------------------- 1 | acpi 2 | acpid 3 | htop 4 | lazygit 5 | mosh-git 6 | neofetch 7 | neovim 8 | ripgrep 9 | unzip 10 | yazi 11 | -------------------------------------------------------------------------------- /packages/essentials.txt: -------------------------------------------------------------------------------- 1 | base 2 | base-devel 3 | git 4 | grub 5 | gvim 6 | openssh 7 | stow 8 | sudo 9 | tmux 10 | which 11 | zsh 12 | -------------------------------------------------------------------------------- /packages/firmware.txt: -------------------------------------------------------------------------------- 1 | broadcom-wl 2 | linux-firmware 3 | intel-ucode 4 | virtualbox-guest-utils 5 | -------------------------------------------------------------------------------- /packages/fonts.txt: -------------------------------------------------------------------------------- 1 | noto-fonts-cjk 2 | noto-fonts-emoji 3 | ttf-hackgen 4 | -------------------------------------------------------------------------------- /packages/gui.txt: -------------------------------------------------------------------------------- 1 | awesome 2 | feh 3 | ghostty 4 | inotify-tools 5 | kvantum-theme-nordic-git 6 | light 7 | lua-pam-git 8 | maim 9 | nordic-theme-git 10 | pavucontrol 11 | picom-ibhagwan-git 12 | playerctl 13 | pulseaudio 14 | redshift 15 | rofi 16 | thunar 17 | ueberzug 18 | xcape 19 | xclip 20 | xorg-server 21 | xorg-xinit 22 | xrdp 23 | xorgxrdp-glamor 24 | zafiro-icon-theme 25 | -------------------------------------------------------------------------------- /packages/i18n.txt: -------------------------------------------------------------------------------- 1 | ibus 2 | ibus-mozc-ut 3 | ibus-rime 4 | rime-pinyin-simp 5 | -------------------------------------------------------------------------------- /packages/networking.txt: -------------------------------------------------------------------------------- 1 | blueman 2 | bluez 3 | bluez-utils 4 | networkmanager 5 | networkmanager-l2tp 6 | nm-connection-editor 7 | -------------------------------------------------------------------------------- /paru/.config/paru/paru.conf: -------------------------------------------------------------------------------- 1 | # 2 | # $PARU_CONF 3 | # /etc/paru.conf 4 | # ~/.config/paru/paru.conf 5 | # 6 | # See the paru.conf(5) manpage for options 7 | 8 | # 9 | # GENERAL OPTIONS 10 | # 11 | [options] 12 | PgpFetch 13 | Devel 14 | Provides 15 | DevelSuffixes = -git -cvs -svn -bzr -darcs -always 16 | #AurOnly 17 | BottomUp 18 | #RemoveMake 19 | #SudoLoop 20 | #UseAsk 21 | #CombinedUpgrade 22 | #CleanAfter 23 | #UpgradeMenu 24 | #NewsOnUpgrade 25 | 26 | #LocalRepo 27 | #Chroot 28 | #Sign 29 | #SignDb 30 | 31 | # 32 | # Binary OPTIONS 33 | # 34 | #[bin] 35 | #FileManager = vifm 36 | #MFlags = --skippgpcheck 37 | #Sudo = doas 38 | -------------------------------------------------------------------------------- /picom/.config/picom/picom.conf: -------------------------------------------------------------------------------- 1 | corner-radius = 5.0; 2 | 3 | shadow = true; 4 | 5 | backend = "glx"; 6 | 7 | blur: { 8 | method = "dual_kawase"; 9 | strength = 10; 10 | background = false; 11 | background-frame = false; 12 | background-fixed = false; 13 | } 14 | blur-background-exclude = [ 15 | "name ~= 'slop'", 16 | ] 17 | -------------------------------------------------------------------------------- /polybar/.config/polybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Terminate already running bar instances 4 | killall -q polybar 5 | 6 | # # Wait until the processes have been shut down 7 | while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 | 9 | # Launch Polybar, using default config location ~/.config/polybar/config 10 | polybar mybar & 11 | 12 | echo "Polybar launched..." 13 | -------------------------------------------------------------------------------- /process-compose/.config/process-compose/shortcuts.yaml: -------------------------------------------------------------------------------- 1 | shortcuts: 2 | log_follow: 3 | toggle_description: 4 | false: Follow Off 5 | true: Follow On 6 | shortcut: Ctrl-T 7 | log_screen: 8 | toggle_description: 9 | false: Half Screen 10 | true: Full Screen 11 | shortcut: Ctrl-G 12 | log_wrap: 13 | toggle_description: 14 | false: Wrap Off 15 | true: Wrap On 16 | shortcut: Ctrl-W 17 | process_restart: 18 | description: Restart 19 | shortcut: Ctrl-R 20 | process_screen: 21 | toggle_description: 22 | false: Half Screen 23 | true: Full Screen 24 | shortcut: F8 25 | process_start: 26 | description: Start 27 | shortcut: Ctrl-K 28 | process_stop: 29 | description: Stop 30 | shortcut: Crtl-X 31 | quit: 32 | description: Quit 33 | shortcut: Ctrl-Q 34 | -------------------------------------------------------------------------------- /ranger/.config/ranger/rc.conf: -------------------------------------------------------------------------------- 1 | # ___ _ _ _ ___ ___ ___ 2 | # | _ \ /_\ | \| |/ __| __| _ \ 3 | # | / / _ \| .` | (_ | _|| / 4 | # |_|_\/_/ \_\_|\_|\___|___|_|_\ 5 | # 6 | 7 | # preview images 8 | set preview_images true 9 | set use_preview_script true 10 | set preview_images_method ueberzug 11 | 12 | # show hidden files by default 13 | set show_hidden true 14 | 15 | # z jumper 16 | # https://github.com/ask1234560/ranger-zjumper 17 | z jumper 18 | map cz console z%space 19 | -------------------------------------------------------------------------------- /rectangle/Library/Preferences/com.knollsoft.Rectangle.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adwinying/dotfiles/21571be646803ece9188a42957f00571fffb2036/rectangle/Library/Preferences/com.knollsoft.Rectangle.plist -------------------------------------------------------------------------------- /redshift/.config/redshift.conf: -------------------------------------------------------------------------------- 1 | ; Global settings for redshift 2 | [redshift] 3 | ; Set the day and night screen temperatures 4 | temp-day=5700 5 | temp-night=3500 6 | 7 | ; Enable/Disable a smooth transition between day and night 8 | ; 0 will cause a direct change from day to night screen temperature. 9 | ; 1 will gradually increase or decrease the screen temperature. 10 | transition=1 11 | 12 | ; Set the screen brightness. Default is 1.0. 13 | ;brightness=0.9 14 | ; It is also possible to use different settings for day and night 15 | ; since version 1.8. 16 | ;brightness-day=0.7 17 | ;brightness-night=0.4 18 | ; Set the screen gamma (for all colors, or each color channel 19 | ; individually) 20 | gamma=0.8 21 | ;gamma=0.8:0.7:0.8 22 | ; This can also be set individually for day and night since 23 | ; version 1.10. 24 | ;gamma-day=0.8:0.7:0.8 25 | ;gamma-night=0.6 26 | 27 | ; Set the location-provider: 'geoclue', 'geoclue2', 'manual' 28 | ; type 'redshift -l list' to see possible values. 29 | ; The location provider settings are in a different section. 30 | location-provider=manual 31 | 32 | ; Set the adjustment-method: 'randr', 'vidmode' 33 | ; type 'redshift -m list' to see all possible values. 34 | ; 'randr' is the preferred method, 'vidmode' is an older API. 35 | ; but works in some cases when 'randr' does not. 36 | ; The adjustment method settings are in a different section. 37 | adjustment-method=randr 38 | 39 | ; Configuration of the location-provider: 40 | ; type 'redshift -l PROVIDER:help' to see the settings. 41 | ; ex: 'redshift -l manual:help' 42 | ; Keep in mind that longitudes west of Greenwich (e.g. the Americas) 43 | ; are negative numbers. 44 | [manual] 45 | lat=35.6004 46 | lon=139.6815 47 | 48 | ; Configuration of the adjustment-method 49 | ; type 'redshift -m METHOD:help' to see the settings. 50 | ; ex: 'redshift -m randr:help' 51 | ; In this example, randr is configured to adjust screen 1. 52 | ; Note that the numbering starts from 0, so this is actually the 53 | ; second screen. If this option is not specified, Redshift will try 54 | ; to adjust _all_ screens. 55 | ; [randr] 56 | ; screen=1 57 | -------------------------------------------------------------------------------- /scripts/bootstrap_secrets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script is used to generate files containing secrets for a particular 4 | # host. It is intended to be run on the host itself. 5 | # 6 | # The secrets are obtained from a bitwarden vault, and the bitwarden CLI must 7 | # be installed and configured. The secrets are stored in a secret note, which 8 | # contains an .env formatted text. This .env file will be eval-ed, which will 9 | # export all the values as shell variables. 10 | # 11 | # The script will then make a copy of the secrets directory to ~/.secrets, and 12 | # will replace all instances of $secret_name in the files with the value of the 13 | # corresponding shell variable using envsubst. 14 | 15 | set -eu 16 | 17 | CWD=$(realpath -e $(dirname $0)) 18 | HOSTNAME=$(hostname) 19 | SECRET_NOTE_NAME="secrets.$HOSTNAME" 20 | INPUT_DIR="$CWD/../secrets/$HOSTNAME" 21 | OUTPUT_DIR="$HOME/.secrets" 22 | 23 | # Get all secrets for host 24 | SECRETS=$(bw get notes $SECRET_NOTE_NAME) 25 | 26 | # Expose secrets as shell variables 27 | set -a 28 | eval "$SECRETS" 29 | set +a 30 | 31 | # Remove secrets directory if it exists 32 | if [ -d $OUTPUT_DIR ]; then 33 | rm -rf $OUTPUT_DIR 34 | fi 35 | 36 | # Make a copy of the secrets directory 37 | mkdir -p $(dirname $OUTPUT_DIR) 38 | cp -r $INPUT_DIR $OUTPUT_DIR 39 | 40 | # Temporarily change to output directory 41 | pushd $OUTPUT_DIR > /dev/null 42 | 43 | # Recursively loop through all files in output directory and replace all 44 | # instances of $secret_name with the value of the corresponding shell variable 45 | for file in $(find . -type f); do 46 | echo "Bootstrapping: $file" 47 | envsubst < $file > $file.tmp 48 | cat $file.tmp > $file 49 | rm $file.tmp 50 | done 51 | 52 | # Return to original directory 53 | popd > /dev/null 54 | 55 | echo "Done." 56 | -------------------------------------------------------------------------------- /scripts/input_change.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | INPUT=$(ibus engine) 4 | EN="xkb:us::eng" 5 | JA="mozc-jp" 6 | ZH="rime" 7 | 8 | if [[ $INPUT == $EN ]]; then 9 | ibus engine $JA 10 | elif [[ $INPUT == $JA ]]; then 11 | ibus engine $ZH 12 | elif [[ $INPUT == $ZH ]]; then 13 | ibus engine $EN 14 | fi 15 | -------------------------------------------------------------------------------- /scripts/input_status.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | INPUT=$(ibus engine) 4 | EN="xkb:us::eng" 5 | JA="mozc-jp" 6 | ZH="rime" 7 | 8 | if [[ $INPUT == $EN ]]; then 9 | echo 'EN' 10 | elif [[ $INPUT == $JA ]]; then 11 | echo 'JA' 12 | elif [[ $INPUT == $ZH ]]; then 13 | echo 'ZH' 14 | else 15 | echo '??' 16 | fi 17 | -------------------------------------------------------------------------------- /scripts/powermenu.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # 4 | # powermenu.sh 5 | # Show exit actions powered by rofi 6 | # 7 | 8 | action=$(printf "Lock\nLogout\nSuspend\nReboot\nPoweroff" | rofi -dmenu -i -p "") 9 | 10 | case $action in 11 | Lock) 12 | gtklock ;; 13 | Logout) 14 | hyprctl dispatch exit ;; 15 | Suspend) 16 | systemctl suspend ;; 17 | Reboot) 18 | systemctl reboot ;; 19 | Poweroff) 20 | systemctl poweroff ;; 21 | esac 22 | -------------------------------------------------------------------------------- /scripts/scratchpad.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | DIR=~/.scratchpad 3 | FILE="$(date "+%Y-%m-%d_%H:%M:%S").txt" 4 | FPATH=$DIR/$FILE 5 | 6 | # source .localrc if available 7 | if [[ -s "$HOME/.localrc" ]]; then 8 | source "$HOME/.localrc" 9 | fi 10 | 11 | # use neovim if available; else use vim 12 | if command -v nvim &> /dev/null 13 | then 14 | VIM=nvim 15 | else 16 | VIM=vim 17 | fi 18 | 19 | # create scratchpad directory if it doesn't exist 20 | mkdir -p $DIR 21 | 22 | # create new file in scratchpad directory 23 | $VIM $FPATH 24 | 25 | if [[ -f $FPATH ]]; then 26 | # if file exists print to stdout 27 | cat $FPATH 28 | 29 | # ... and copy to clipboard 30 | if [[ $OSTYPE == "darwin"* ]]; then pbcopy < $FPATH; fi 31 | if [[ $OSTYPE == "linux-gnu" ]]; then xclip < $FPATH; fi 32 | fi 33 | -------------------------------------------------------------------------------- /scripts/update_layout.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # update_layout.sh 5 | # Updates hammerspoon's active layout widget by querying yabai 6 | # 7 | 8 | is_window_floating=$(yabai -m query --windows --window | jq '.floating') 9 | 10 | if [[ $is_window_floating = 1 ]]; then 11 | hs -c "Layouts:update(\"float\")" 12 | exit 0 13 | fi 14 | 15 | space_layout=$(yabai -m query --spaces --space | jq '.type') 16 | 17 | hs_cmd="Layouts:update($space_layout)" 18 | 19 | hs -c "$hs_cmd" 20 | -------------------------------------------------------------------------------- /scripts/update_space.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # update_space.sh 5 | # Updates hammerspoon's active space widget by querying yabai 6 | # 7 | 8 | current_space=$(yabai -m query --spaces --space | jq '.index') 9 | 10 | hs_cmd="Spaces:update($current_space)" 11 | 12 | hs -c "$hs_cmd" 13 | -------------------------------------------------------------------------------- /secrets/bootes/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/bootes/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/bootes/tailscale_auth_key: -------------------------------------------------------------------------------- 1 | $TAILSCALE_AUTH_KEY 2 | -------------------------------------------------------------------------------- /secrets/mayodev/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/mayodev/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/mayodev/tailscale_auth_key: -------------------------------------------------------------------------------- 1 | $TAILSCALE_AUTH_KEY 2 | -------------------------------------------------------------------------------- /secrets/mayonaca/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/mayonaca/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/nas/acme.env: -------------------------------------------------------------------------------- 1 | CF_DNS_API_TOKEN=$CLOUDFLARE_TOKEN 2 | -------------------------------------------------------------------------------- /secrets/nas/cloudflare_tunnel.json: -------------------------------------------------------------------------------- 1 | {"AccountTag":"$CLOUDFLARE_TUNNEL_ACCOUNT_TAG","TunnelSecret":"$CLOUDFLARE_TUNNEL_SECRET","TunnelID":"$CLOUDFLARE_TUNNEL_ID"} 2 | -------------------------------------------------------------------------------- /secrets/nas/healthcheck_backup_endpoint: -------------------------------------------------------------------------------- 1 | $HEALTHCHECK_BACKUP 2 | -------------------------------------------------------------------------------- /secrets/nas/healthcheck_docker_endpoint: -------------------------------------------------------------------------------- 1 | $HEALTHCHECK_DOCKER 2 | -------------------------------------------------------------------------------- /secrets/nas/healthcheck_server_endpoint: -------------------------------------------------------------------------------- 1 | $HEALTHCHECK_SERVER 2 | -------------------------------------------------------------------------------- /secrets/nas/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/nas/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/nas/kopia/repository.config: -------------------------------------------------------------------------------- 1 | { 2 | "storage": { 3 | "type": "sftp", 4 | "config": { 5 | "path": "/home/adwin/kopia", 6 | "host": "outpost", 7 | "port": 22, 8 | "username": "adwin", 9 | "password": "", 10 | "keyfile": "/home/adwin/.ssh/id_ed25519", 11 | "knownHostsData": "outpost ecdsa-sha2-nistp256 $OUTPOST_SSH_HOST_KEY", 12 | "externalSSH": false, 13 | "sshCommand": "ssh", 14 | "dirShards": null 15 | } 16 | }, 17 | "caching": { 18 | "cacheDirectory": "../../.cache/kopia/d99eed7bea7cf519", 19 | "maxCacheSize": 5242880000, 20 | "maxMetadataCacheSize": 5242880000, 21 | "maxListCacheDuration": 30 22 | }, 23 | "hostname": "nas", 24 | "username": "adwin", 25 | "description": "Repository in SFTP adwin@outpost", 26 | "enableActions": false, 27 | "formatBlobCacheDuration": 900000000000 28 | } 29 | -------------------------------------------------------------------------------- /secrets/nas/kopia/repository.config.kopia-password: -------------------------------------------------------------------------------- 1 | $KOPIA_PASSWORD 2 | -------------------------------------------------------------------------------- /secrets/nas/smtp_password.txt: -------------------------------------------------------------------------------- 1 | $SMTP_PASSWORD 2 | -------------------------------------------------------------------------------- /secrets/nas/tailscale_auth_key: -------------------------------------------------------------------------------- 1 | $TAILSCALE_AUTH_KEY 2 | -------------------------------------------------------------------------------- /secrets/outpost/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/outpost/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/outpost/tailscale_auth_key: -------------------------------------------------------------------------------- 1 | $TAILSCALE_AUTH_KEY 2 | -------------------------------------------------------------------------------- /secrets/router/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/router/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/router/wifi_iot_psk: -------------------------------------------------------------------------------- 1 | 00:00:00:00:00:00 $WIFI_IOT_PSK 2 | -------------------------------------------------------------------------------- /secrets/router/wifi_psk: -------------------------------------------------------------------------------- 1 | 00:00:00:00:00:00 $WIFI_PSK 2 | -------------------------------------------------------------------------------- /secrets/tunnel/acme.env: -------------------------------------------------------------------------------- 1 | CF_DNS_API_TOKEN=$CLOUDFLARE_TOKEN 2 | -------------------------------------------------------------------------------- /secrets/tunnel/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/tunnel/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/tunnel/tailscale_auth_key: -------------------------------------------------------------------------------- 1 | $TAILSCALE_AUTH_KEY 2 | -------------------------------------------------------------------------------- /secrets/workdev/id_ed25519: -------------------------------------------------------------------------------- 1 | $SSH_PRIVATE_KEY 2 | -------------------------------------------------------------------------------- /secrets/workdev/id_ed25519.pub: -------------------------------------------------------------------------------- 1 | $SSH_PUBLIC_KEY 2 | -------------------------------------------------------------------------------- /secrets/workdev/tailscale_auth_key: -------------------------------------------------------------------------------- 1 | $TAILSCALE_AUTH_KEY 2 | -------------------------------------------------------------------------------- /sublime/.gitignore: -------------------------------------------------------------------------------- 1 | Package Control.last-run 2 | Package Control.ca-list 3 | Package Control.ca-bundle 4 | Package Control.system-ca-bundle 5 | Package Control.merged-ca-bundle 6 | Package Control.cache/ 7 | Package Control.ca-certs/ 8 | oscrypto-ca-bundle.crt 9 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/ActualVim.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "bufopts": 3 | { 4 | "completefunc": "ActualVimComplete" 5 | }, 6 | "enabled": false, 7 | "large_file_disable": 8 | { 9 | "bytes": 52428800, 10 | "lines": 50000 11 | }, 12 | "neovim_args": 13 | [ 14 | "--cmd", 15 | "let g:actualvim = 1" 16 | ], 17 | "neovim_path": "", 18 | "settings": 19 | { 20 | "sublime": 21 | { 22 | "inverse_caret_state": false 23 | }, 24 | "vim": 25 | { 26 | "bell": 27 | { 28 | "color_scheme": "Packages/ActualVim/Bell.tmTheme", 29 | "duration": 0.001 30 | }, 31 | "inverse_caret_state": false, 32 | "modes": 33 | { 34 | "all insert": 35 | { 36 | }, 37 | "all visual": 38 | { 39 | }, 40 | "command": 41 | { 42 | "inverse_caret_state": true 43 | }, 44 | "insert": 45 | { 46 | }, 47 | "normal": 48 | { 49 | "inverse_caret_state": true 50 | }, 51 | "replace": 52 | { 53 | }, 54 | "visual": 55 | { 56 | }, 57 | "visual block": 58 | { 59 | }, 60 | "visual line": 61 | { 62 | } 63 | } 64 | } 65 | }, 66 | "settings_priority": "sublime", 67 | "smooth_scroll": false 68 | } 69 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/Base File.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "jsdocs_extend_double_slash": false 3 | } -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "keys": ["super+shift+h"], 4 | "command": "format_eslint", 5 | "context": [ 6 | { 7 | "key": "selector", 8 | "operator": "equal", 9 | "operand": "source.js" 10 | } 11 | ] 12 | }, 13 | { 14 | "keys": ["super+shift+h"], 15 | "command": "fmt_now", 16 | "context": [ 17 | { 18 | "key": "selector", 19 | "operator": "equal", 20 | "operand": "source.php" 21 | } 22 | ] 23 | }, 24 | { 25 | "keys": ["f5"], 26 | "command": "import_namespace", 27 | "context": [ 28 | { 29 | "key": "selector", 30 | "operator": "equal", 31 | "operand": "source.php" 32 | } 33 | ] 34 | }, 35 | { 36 | "keys": ["f6"], 37 | "command": "find_use", 38 | "context": [ 39 | { 40 | "key": "selector", 41 | "operator": "equal", 42 | "operand": "source.php" 43 | } 44 | ] 45 | } 46 | ] -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/ESLint-Formatter.sublime-settings: -------------------------------------------------------------------------------- 1 | // Settings in here override those in "ESLint-Formatter/ESLint-Formatter.sublime-settings", 2 | 3 | { 4 | "node_path": { 5 | "osx": "/Users/adwin/.nvm/versions/node/v10.15.1/bin/node" 6 | }, 7 | "eslint_path": { 8 | "osx": "/Users/adwin/.nvm/versions/node/v10.15.1/bin/eslint" 9 | }, 10 | "format_on_save_extensions": [ 11 | "js", 12 | "jsx", 13 | "es", 14 | "es6", 15 | "babel", 16 | "vue" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/Emmet.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "telemetry": false, 3 | "uid": "bee332cc-e92e-414f-b592-43d951c04ce1" 4 | } 5 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/GitGutter.sublime-settings: -------------------------------------------------------------------------------- 1 | // GitGutter Settings - User 2 | { 3 | "show_status_bar_text": false 4 | } -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/PHP Companion.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "namespace_prefix": "App", 3 | "exclude_dir": [ 4 | "evms/node_modules", 5 | "evms/resources/js" 6 | ] 7 | } -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/PHP.sublime-settings: -------------------------------------------------------------------------------- 1 | // These settings override both User and Default settings for the PHP syntax 2 | { 3 | "tab_size": 4, 4 | "translate_tab_to_spaces": true 5 | } 6 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "bootstrapped": true, 3 | "in_process_packages": 4 | [ 5 | ], 6 | "installed_packages": 7 | [ 8 | "ActualVim", 9 | "CodeComplice", 10 | "Codecs33", 11 | "ConvertToUTF8", 12 | "DocBlockr", 13 | "Dockerfile Syntax Highlighting", 14 | "EditorConfig", 15 | "Emmet", 16 | "ESLint-Formatter", 17 | "GitGutter", 18 | "JSX", 19 | "Laravel Blade Highlighter", 20 | "Monokai - Spacegray", 21 | "Package Control", 22 | "PackageResourceViewer", 23 | "PHP Companion", 24 | "phpfmt", 25 | "Sass", 26 | "SqlBeautifier", 27 | "SublimeLinter", 28 | "SublimeLinter-eslint", 29 | "SublimeLinter-phpcs", 30 | "Theme - Spacegray", 31 | "Vue Syntax Highlight", 32 | "Vuejs Snippets" 33 | ], 34 | } 35 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/Package Control.user-ca-bundle: -------------------------------------------------------------------------------- 1 | /Users/adwin/Library/Application Support/Sublime Text 3/Packages/User/Package Control.merged-ca-bundle -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme", 3 | "font_size": 12, 4 | "ignored_packages": 5 | [ 6 | "Vintage", 7 | ], 8 | "rulers": 9 | [ 10 | 80 11 | ], 12 | "tab_size": 2, 13 | "theme": "Spacegray.sublime-theme", 14 | "translate_tabs_to_spaces": true, 15 | } 16 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/SublimeLinter.sublime-settings: -------------------------------------------------------------------------------- 1 | // SublimeLinter Settings - User 2 | { 3 | "linters": { 4 | "eslint": { 5 | "selector": "text.html.vue, source.js - meta.attribute-with-value", 6 | "env": { 7 | "PATH": "/Users/adwin/.nvm/versions/node/v10.15.1/bin" 8 | } 9 | }, 10 | "phpcs": { 11 | "executable": "${folder}/vendor/bin/phpcs", 12 | "args": "--standard=${folder}/phpcs.xml" 13 | } 14 | }, 15 | 16 | "paths": { 17 | "linux": [], 18 | "osx": [ 19 | "/Users/adwin/.nvm/versions/node/v10.15.1/bin", 20 | ], 21 | "windows": [] 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /sublime/Library/Application Support/Sublime Text 3/Packages/User/phpfmt.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "format_on_save": false, 3 | "passes": 4 | [ 5 | "AlignEquals", 6 | "AlignGroupDoubleArrow", 7 | "IndentTernaryConditions" 8 | ], 9 | "psr2": true, 10 | "readini": true, 11 | "version": 1, 12 | } 13 | -------------------------------------------------------------------------------- /swaync/.config/swaync/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./configSchema.json", 3 | "positionX": "right", 4 | "positionY": "top", 5 | "layer": "overlay", 6 | "control-center-layer": "top", 7 | "layer-shell": true, 8 | "cssPriority": "application", 9 | "control-center-margin-top": 14, 10 | "control-center-margin-bottom": 14, 11 | "control-center-margin-right": 14, 12 | "control-center-margin-left": 0, 13 | "notification-2fa-action": true, 14 | "notification-inline-replies": false, 15 | "notification-icon-size": 64, 16 | "notification-body-image-height": 100, 17 | "notification-body-image-width": 200, 18 | "timeout": 10, 19 | "timeout-low": 5, 20 | "timeout-critical": 0, 21 | "fit-to-screen": true, 22 | "control-center-width": 400, 23 | "control-center-height": 600, 24 | "notification-window-width": 400, 25 | "keyboard-shortcuts": true, 26 | "image-visibility": "when-available", 27 | "transition-time": 200, 28 | "hide-on-clear": false, 29 | "hide-on-action": true, 30 | "script-fail-notify": true, 31 | "scripts": { 32 | "example-script": { 33 | "exec": "echo 'Do something...'", 34 | "urgency": "Normal" 35 | }, 36 | "example-action-script": { 37 | "exec": "echo 'Do something actionable!'", 38 | "urgency": "Normal", 39 | "run-on": "action" 40 | } 41 | }, 42 | "notification-visibility": { 43 | "example-name": { 44 | "state": "muted", 45 | "urgency": "Low", 46 | "app-name": "Spotify" 47 | } 48 | }, 49 | "widgets": [ 50 | "inhibitors", 51 | "title", 52 | "dnd", 53 | "notifications" 54 | ], 55 | "widget-config": { 56 | "inhibitors": { 57 | "text": "Inhibitors", 58 | "button-text": "Clear All", 59 | "clear-all-button": true 60 | }, 61 | "title": { 62 | "text": "Notifications", 63 | "clear-all-button": true, 64 | "button-text": "Clear All" 65 | }, 66 | "dnd": { 67 | "text": "Do Not Disturb" 68 | }, 69 | "label": { 70 | "max-lines": 5, 71 | "text": "Label Text" 72 | }, 73 | "mpris": { 74 | "image-size": 96, 75 | "image-radius": 12 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # 2 | # .tmux.conf 3 | # tmux config 4 | # 5 | 6 | source-file ~/.tmux/general.conf 7 | source-file ~/.tmux/keybindings.conf 8 | source-file ~/.tmux/plugins.conf 9 | source-file ~/.tmux/settings.conf 10 | source-file ~/.tmux/statusbar.conf 11 | -------------------------------------------------------------------------------- /tmux/.tmux/general.conf: -------------------------------------------------------------------------------- 1 | # 2 | # general.conf 3 | # general configs 4 | # 5 | 6 | # Start window indexes at 1 7 | set -g base-index 1 8 | 9 | # Enable rich colors 10 | set -g default-terminal 'screen-256color' 11 | set-option -sa terminal-overrides ',xterm-256color:RGB' 12 | 13 | # Ms modifies OSC 52 clipboard handling to work with mosh, see 14 | # https://gist.github.com/yudai/95b20e3da66df1b066531997f982b57b 15 | set -ag terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7" 16 | 17 | # Enable focus events 18 | set-option -g focus-events on 19 | 20 | # Enable mouse mode (tmux 2.1 and above) 21 | set -g mouse on 22 | 23 | # Navigate using vimarrows 24 | set -g mode-keys vi 25 | 26 | # Don't rename windows automatically 27 | set -g allow-rename off 28 | 29 | # Escape immediately 30 | set -s escape-time 0 31 | 32 | # Automaticall restore previous session 33 | set -g @continuum-restore 'on' 34 | -------------------------------------------------------------------------------- /tmux/.tmux/plugins.conf: -------------------------------------------------------------------------------- 1 | # 2 | # plugins 3 | # tmux plugins powered by TPM 4 | # https://github.com/tmux-plugins/tpm 5 | # 6 | 7 | # Nord theme 8 | set -g @plugin 'arcticicestudio/nord-tmux' 9 | 10 | # Save tmux sessions after quitting 11 | set -g @plugin 'tmux-plugins/tmux-resurrect' 12 | set -g @plugin 'tmux-plugins/tmux-continuum' 13 | 14 | # Seamlessly navigate between vim and tmux 15 | set -g @plugin 'christoomey/vim-tmux-navigator' 16 | 17 | # Install TPM if not found 18 | if "test ! -d ~/.tmux/plugins/tpm" \ 19 | "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" 20 | 21 | # Load TPM 22 | run -b '~/.tmux/plugins/tpm/tpm' 23 | -------------------------------------------------------------------------------- /tmux/.tmux/settings.conf: -------------------------------------------------------------------------------- 1 | # 2 | # settings.conf 3 | # plugin settings 4 | # 5 | 6 | # Disable default statusbar (source from statusbar.conf instead) 7 | set -g @nord_tmux_show_status_content '0' 8 | 9 | # Disable use of patched fonts 10 | set -g @nord_tmux_no_patched_font '1' 11 | 12 | # Highlight active pane 13 | set -g pane-active-border-style fg=cyan 14 | -------------------------------------------------------------------------------- /tmux/.tmux/statusbar.conf: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017-present Arctic Ice Studio 2 | # Copyright (C) 2017-present Sven Greb 3 | 4 | # Project: Nord tmux 5 | # Repository: https://github.com/arcticicestudio/nord-tmux 6 | # License: MIT 7 | 8 | #+----------------+ 9 | #+ Plugin Support + 10 | #+----------------+ 11 | #+--- tmux-prefix-highlight ---+ 12 | set -g @prefix_highlight_copy_mode_attr "fg=black,bg=brightcyan" 13 | 14 | #+--------+ 15 | #+ Status + 16 | #+--------+ 17 | #+--- Bars ---+ 18 | set -g status-left "#[fg=black,bg=blue,bold] #S " 19 | set -g status-right "#{prefix_highlight}#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]|#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore] #[fg=black,bg=cyan,bold] #H " 20 | 21 | #+--- Windows ---+ 22 | #@TODO revert to default conf when the following MR is merged: 23 | #https://github.com/arcticicestudio/nord-tmux/pull/23 24 | set -g window-status-format "#[fg=white,bg=brightblack] #I #[fg=white,bg=brightblack]#W #F " 25 | set -g window-status-current-format "#[fg=black,bg=cyan] #I#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F " 26 | set -g window-status-separator "" 27 | -------------------------------------------------------------------------------- /vim/.vim/plugin-settings.vim: -------------------------------------------------------------------------------- 1 | " 2 | " plugin-settings.vim 3 | " plugin settings 4 | " 5 | 6 | " # Fugitive settings 7 | " Workaround for patch mode not responding 8 | if has('nvim') 9 | augroup nvim_term 10 | au! 11 | au TermOpen * startinsert 12 | au TermClose * stopinsert 13 | endif 14 | augroup END 15 | " display git status 16 | nmap gs :Gstatus 17 | " push commits 18 | nmap gp :Git push 19 | " git diff mode 20 | nmap gdd :Gdiff 21 | " git diff mode (against master) 22 | nmap gdm :Gdiff master 23 | " launch difftool (against master) 24 | nmap gdt :Git difftool --name-status master 25 | 26 | " # lightline settings 27 | " hide default statusline 28 | set noshowmode 29 | " set lightline theme 30 | let g:lightline = { 'colorscheme': 'nord' } 31 | 32 | " # nord-vim settings 33 | " set colorscheme 34 | colorscheme nord 35 | 36 | " # fzf settings 37 | " set fzf trigger key 38 | noremap ff :FZF 39 | " set the_silver_searcher trigger key 40 | " requires the_silver_searcher to be installed: 41 | " brew install the_silver_searcher 42 | noremap fz :Ag 43 | 44 | " # vim-easy-align settings 45 | " Start interactive EasyAlign in visual mode (e.g. vipga) 46 | xmap ga (EasyAlign) 47 | " Start interactive EasyAlign for a motion/text object (e.g. gaip) 48 | nmap ga (EasyAlign) 49 | 50 | " # vim-smooth-scroll settings 51 | noremap :call smooth_scroll#up(&scroll, 0, 4) 52 | noremap :call smooth_scroll#down(&scroll, 0, 4) 53 | noremap :call smooth_scroll#up(&scroll*2, 0, 4) 54 | noremap :call smooth_scroll#down(&scroll*2, 0, 4) 55 | -------------------------------------------------------------------------------- /vim/.vim/plugins.vim: -------------------------------------------------------------------------------- 1 | " 2 | " plugins.vim 3 | " plugins powered by vim-plug 4 | " 5 | 6 | " Load vim-plug 7 | if empty(glob('~/.vim/autoload/plug.vim')) 8 | silent execute '!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 9 | autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 10 | endif 11 | 12 | call plug#begin('~/.vim/plugged') 13 | 14 | 15 | " # git stuff 16 | " git commands 17 | Plug 'tpope/vim-fugitive' 18 | " git change indicator 19 | Plug 'airblade/vim-gitgutter' 20 | 21 | 22 | " # features 23 | " colors 24 | Plug 'arcticicestudio/nord-vim' 25 | " statusbar 26 | Plug 'itchyny/lightline.vim' 27 | " smooth scroll 28 | Plug 'terryma/vim-smooth-scroll' 29 | " advanced substitution 30 | Plug 'tpope/vim-abolish' 31 | " tmux integration 32 | Plug 'christoomey/vim-tmux-navigator' 33 | Plug 'melonmanchan/vim-tmux-resizer' 34 | " fuzzy file finder 35 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 36 | Plug 'junegunn/fzf.vim' 37 | 38 | 39 | " # programming 40 | " editorconfig 41 | Plug 'editorconfig/editorconfig-vim' 42 | " commenter 43 | Plug 'tomtom/tcomment_vim' 44 | " align blocks of text 45 | Plug 'junegunn/vim-easy-align' 46 | " replace surrounding quotes/parenthesis 47 | Plug 'tpope/vim-surround' 48 | " enable . support for plugins 49 | Plug 'tpope/vim-repeat' 50 | 51 | 52 | call plug#end() 53 | -------------------------------------------------------------------------------- /vim/.vim/undodir/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /vim/.vim/vimrc: -------------------------------------------------------------------------------- 1 | " 2 | " __ _____ __ __ 3 | " \ \ / /_ _| \/ | 4 | " \ V / | || |\/| | 5 | " \_/ |___|_| |_| 6 | " 7 | 8 | execute "source ~/.vim/basic.vim" 9 | 10 | if !empty(glob('~/.vim/autoload/plug.vim')) && !has('nvim') 11 | execute "source ~/.vim/plugins.vim" 12 | execute "source ~/.vim/plugin-settings.vim" 13 | endif 14 | -------------------------------------------------------------------------------- /vscode/Library/Application Support/Code/User/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.lineNumbers": "relative", 3 | "editor.minimap.enabled": false, 4 | "editor.rulers": [80], 5 | "vim.leader": ",", 6 | "vim.normalModeKeyBindingsNonRecursive": [ 7 | { 8 | "before": ["Y"], 9 | "after": ["\"*y"] 10 | }, 11 | { 12 | "before": ["", "t"], 13 | "commands": ["workbench.action.quickOpen"] 14 | }, 15 | { 16 | "before": ["", "f"], 17 | "commands": ["workbench.view.search"] 18 | }, 19 | { 20 | "before": ["", "l", "l"], 21 | "after": ["editor.action.formatDocument"] 22 | }, 23 | { 24 | "before": ["K"], 25 | "after": ["i", "", ""] 26 | }, 27 | ], 28 | "workbench.colorTheme": "Nord", 29 | "workbench.colorCustomizations": { 30 | "[Nord]": { 31 | "editor.background": "#111318", 32 | "terminal.background": "#111318", 33 | "editorGutter.background": "#111318" 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /wezterm/.config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- __ _____ _________ ___ ___ __ __ 3 | -- \ \ / / __|_ /_ _| __| _ \ \/ | 4 | -- \ \/\/ /| _| / / | | | _|| / |\/| | 5 | -- \_/\_/ |___/___| |_| |___|_|_\_| |_| 6 | -- 7 | 8 | -- Pull in the wezterm API 9 | local wezterm = require "wezterm" 10 | 11 | -- This table will hold the configuration. 12 | local config = {} 13 | 14 | -- In newer versions of wezterm, use the config_builder which will 15 | -- help provide clearer error messages 16 | if wezterm.config_builder then 17 | config = wezterm.config_builder() 18 | end 19 | 20 | -- This is where you actually apply your config choices 21 | config.font = wezterm.font "HackGenNerd Console" 22 | config.font_size = 14.0 23 | 24 | local scheme = wezterm.get_builtin_color_schemes()['nord'] 25 | scheme.background = '#171a20' 26 | config.color_schemes = { 27 | nord = scheme, 28 | } 29 | config.color_scheme = "nord" 30 | 31 | config.window_background_opacity = 0.9 32 | config.window_decorations = "RESIZE" 33 | config.window_padding = { 34 | left = 25, 35 | right = 25, 36 | top = 25, 37 | bottom = 25, 38 | } 39 | config.window_close_confirmation = "NeverPrompt" 40 | 41 | config.initial_cols = 160 42 | config.initial_rows = 60 43 | config.hide_tab_bar_if_only_one_tab = true 44 | 45 | config.keys = { 46 | { key = "q", mods = "CTRL", action = wezterm.action { SendString = "\x11" } }, 47 | } 48 | 49 | config.use_ime = true 50 | 51 | -- and finally, return the configuration to wezterm 52 | return config 53 | -------------------------------------------------------------------------------- /xinit/.Xresources: -------------------------------------------------------------------------------- 1 | ! Copyright (c) 2016-present Arctic Ice Studio 2 | ! Copyright (c) 2016-present Sven Greb 3 | 4 | ! Project: Nord XResources 5 | ! Version: 0.1.0 6 | ! Repository: https://github.com/arcticicestudio/nord-xresources 7 | ! License: MIT 8 | 9 | #define nord0 #2E3440 10 | #define nord1 #3B4252 11 | #define nord2 #434C5E 12 | #define nord3 #4C566A 13 | #define nord4 #D8DEE9 14 | #define nord5 #E5E9F0 15 | #define nord6 #ECEFF4 16 | #define nord7 #8FBCBB 17 | #define nord8 #88C0D0 18 | #define nord9 #81A1C1 19 | #define nord10 #5E81AC 20 | #define nord11 #BF616A 21 | #define nord12 #D08770 22 | #define nord13 #EBCB8B 23 | #define nord14 #A3BE8C 24 | #define nord15 #B48EAD 25 | 26 | *.foreground: nord4 27 | *.background: nord0 28 | *.cursorColor: nord4 29 | *fading: 35 30 | *fadeColor: nord3 31 | 32 | *.color0: nord1 33 | *.color1: nord11 34 | *.color2: nord14 35 | *.color3: nord13 36 | *.color4: nord9 37 | *.color5: nord15 38 | *.color6: nord8 39 | *.color7: nord5 40 | *.color8: nord3 41 | *.color9: nord11 42 | *.color10: nord14 43 | *.color11: nord13 44 | *.color12: nord9 45 | *.color13: nord15 46 | *.color14: nord7 47 | *.color15: nord6 48 | -------------------------------------------------------------------------------- /xinit/.xinitrc: -------------------------------------------------------------------------------- 1 | # 2 | # .xinitrc 3 | # Startup sequence for xorg 4 | # 5 | 6 | xcape="xcape -e 'Control_L=Escape;Super_L=Hangul_Hanja;Super_R=Hangul'" 7 | picom="picom -b" 8 | 9 | # IME 10 | export GTK_IM_MODULE=ibus 11 | export QT_IM_MODULE=ibus 12 | export XMODIFIERS=@im=ibus 13 | 14 | # To start a session other wm: startx ~/.xinitrc [wm] 15 | session=${1:-awesome} 16 | 17 | if [[ "$session" == "i3" ]] || [[ "$sesion" == "i3wm" ]]; then 18 | $xcape 19 | $picom 20 | exec i3 21 | 22 | elif [[ "$session" == "dwm" ]]; then 23 | feh --bg-scale /home/adwin/.config/awesome/wallpapers/pe.jpg & 24 | picom & 25 | $xcape & 26 | exec dwm 27 | 28 | elif [[ "$session" == "awesome" ]]; then 29 | exec awesome 30 | 31 | # No known session, try to run it as command 32 | else 33 | exec $1 34 | fi 35 | -------------------------------------------------------------------------------- /xmodmap/.Xmodmap: -------------------------------------------------------------------------------- 1 | ! Remap control to capslock and capslock to shift + capslock 2 | clear lock 3 | clear control 4 | add control = Caps_Lock Control_L Control_R 5 | keycode 66 = Control_L Caps_Lock NoSymbol NoSymbol 6 | 7 | ! Natrual scroll a-la macOS style 8 | pointer = 1 2 3 5 4 7 6 8 9 10 9 | -------------------------------------------------------------------------------- /zsh/.zsh/autocompletion.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # autocompletion.zsh 3 | # autocomplete 4 | # 5 | 6 | # highlight select 7 | zstyle ':completion:*' menu select 8 | 9 | # case insensitive 10 | zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' 11 | -------------------------------------------------------------------------------- /zsh/.zsh/history.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # history.zsh 3 | # cache zsh command history 4 | # 5 | 6 | HISTFILE=~/.zhistory 7 | setopt APPEND_HISTORY 8 | HISTSIZE=1200 9 | SAVEHIST=1000 10 | setopt HIST_EXPIRE_DUPS_FIRST 11 | setopt EXTENDED_HISTORY 12 | setopt SHARE_HISTORY -------------------------------------------------------------------------------- /zsh/.zsh/keybindings.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # keybindings.zsh 3 | # keybindings 4 | # 5 | 6 | # vi mode 7 | bindkey -v 8 | 9 | # ^O to run command 10 | bindkey '^O' accept-line-and-down-history 11 | -------------------------------------------------------------------------------- /zsh/.zsh/plugins.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # plugins.zsh 3 | # plugins powered by zinit 4 | # 5 | 6 | # install zinit if ~/.zinit does not exist 7 | if [[ ! -d ~/.zinit ]]; then 8 | mkdir ~/.zinit 9 | git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin 10 | fi 11 | 12 | # load zinit 13 | source ~/.zinit/bin/zinit.zsh 14 | 15 | 16 | # syntax highlighting 17 | zinit ice wait lucid atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" 18 | zinit load zdharma-continuum/fast-syntax-highlighting 19 | 20 | # suggestions on tab 21 | zinit ice wait lucid blockf 22 | zinit load zsh-users/zsh-completions 23 | 24 | # fish-like autosuggestions 25 | zinit ice wait lucid atload"!_zsh_autosuggest_start" 26 | zinit load zsh-users/zsh-autosuggestions 27 | 28 | # subtring search 29 | zinit ice wait lucid atload" \ 30 | bindkey '^[[A' history-substring-search-up && \ 31 | bindkey '^[[B' history-substring-search-down && \ 32 | bindkey '^P' history-substring-search-up && \ 33 | bindkey '^N' history-substring-search-down && \ 34 | bindkey -M vicmd 'k' history-substring-search-up && \ 35 | bindkey -M vicmd 'j' history-substring-search-down \ 36 | " 37 | zinit load zsh-users/zsh-history-substring-search 38 | 39 | # cli fuzzy finder 40 | zinit pack"binary" for fzf 41 | 42 | # fuzzy navigation 43 | zinit ice wait"2" as"command" from"gh-r" lucid \ 44 | mv"zoxide*/zoxide -> zoxide" \ 45 | atload'source <(fzf --zsh); eval "$(zoxide init --cmd cd zsh)"' \ 46 | atclone"./zoxide init zsh > init.zsh" \ 47 | atpull"%atclone" src"init.zsh" nocompile'!' 48 | zinit light ajeetdsouza/zoxide 49 | 50 | # nvm 51 | export NVM_SYMLINK_CURRENT=true 52 | export NVM_LAZY_LOAD=true 53 | export NVM_AUTO_USE=true 54 | zinit light lukechilds/zsh-nvm 55 | 56 | # docker completions 57 | zinit ice wait lucid as"completion" 58 | zinit snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker 59 | zinit ice wait lucid as"completion" 60 | zinit snippet https://github.com/docker/compose/tree/v1/contrib/completion/zsh/_docker-compose 61 | -------------------------------------------------------------------------------- /zsh/.zsh/source.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # source.zsh 3 | # source files 4 | # 5 | 6 | # Source .localrc if available 7 | if [[ -s "$HOME/.localrc" ]]; then 8 | source "$HOME/.localrc" 9 | fi 10 | 11 | # If .localrc is a directory, source all files in it 12 | if [[ -d "$HOME/.localrc" ]]; then 13 | for file in "$HOME/.localrc"/*; do 14 | source "$file" 15 | done 16 | fi 17 | 18 | # load directory-specific .profile 19 | PROMPT_COMMAND='if [[ "$profile" != "$PWD" && "$PWD" != "$HOME" && -e .profile ]]; then profile="$PWD"; source .profile; fi' 20 | precmd() { eval "$PROMPT_COMMAND" } 21 | -------------------------------------------------------------------------------- /zsh/.zshenv: -------------------------------------------------------------------------------- 1 | # 2 | # .zshenv 3 | # environment variables 4 | # 5 | 6 | # PATHs 7 | export PATH=/usr/local/bin:/usr/local/sbin:$PATH 8 | 9 | # set delay to vi mode to 0.1s 10 | export KEYTIMEOUT=1 11 | 12 | # preferred editor for local and remote sessions 13 | export EDITOR=vim 14 | export VISUAL=vim 15 | -------------------------------------------------------------------------------- /zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # _______ _ _ ___ ___ 2 | # |_ / __| || | _ \/ __| 3 | # / /\__ \ __ | / (__ 4 | # /___|___/_||_|_|_\\___| 5 | # 6 | 7 | # disable software flow control (Enable C-Q/C-S in terminal) 8 | stty -ixon 9 | 10 | # load configs 11 | source ~/.zsh/plugins.zsh 12 | source ~/.zsh/aliases.zsh 13 | source ~/.zsh/autocompletion.zsh 14 | source ~/.zsh/history.zsh 15 | source ~/.zsh/keybindings.zsh 16 | source ~/.zsh/prompt.zsh 17 | source ~/.zsh/source.zsh 18 | --------------------------------------------------------------------------------