Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 494d3a21a8 | |||
| 06c10b7a32 | |||
| 5b70bf8480 | |||
| 9a4d3401b9 | |||
| dff21fdb0c | |||
| 4c4c80a704 | |||
| 14382cd501 | |||
| 4658ffa321 | |||
| 94a37d6ee4 | |||
| ac3cfc7ca6 | |||
| 5b8dfde8c2 | |||
| 872b594f2c | |||
| cc6e7c2b72 | |||
| 194c795aae | |||
| 03cea9482a | |||
| 58aadf500a | |||
| 58591d885a | |||
| 667579a984 | |||
| 6375b8e31f | |||
| 652baaab98 |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
68
.gitignore
vendored
68
.gitignore
vendored
@ -1,54 +1,54 @@
|
||||
home/user/.config/zsh/plugins/*
|
||||
configs/.config/zsh/plugins/*
|
||||
|
||||
home/user/.config/nvim/plugin
|
||||
home/user/.config/nvim/spell
|
||||
configs/.config/nvim/plugin
|
||||
configs/.config/nvim/spell
|
||||
|
||||
home/user/.config/zsh/zshrc.d/*
|
||||
!home/user/.config/zsh/zshrc.d/00_zhashd.sh
|
||||
configs/.config/zsh/zshrc.d/*
|
||||
!configs/.config/zsh/zshrc.d/00_zhashd.sh
|
||||
|
||||
home/user/.zshenv.d/*
|
||||
!home/user/.zshenv.d/.gitkeep
|
||||
configs/.zshenv.d/*
|
||||
!configs/.zshenv.d/.gitkeep
|
||||
|
||||
home/user/.config/zsh/.zcalc_history
|
||||
configs/.config/zsh/.zcalc_history
|
||||
|
||||
.zcompdump
|
||||
*.zwc
|
||||
|
||||
home/user/.ssh/*
|
||||
!home/user/.ssh/config
|
||||
configs/.ssh/*
|
||||
!configs/.ssh/config
|
||||
|
||||
home/user/.ipython/profile_default/*
|
||||
!home/user/.ipython/profile_default/ipython_config.py
|
||||
configs/.ipython/profile_default/*
|
||||
!configs/.ipython/profile_default/ipython_config.py
|
||||
|
||||
home/user/.gnupg/*
|
||||
!home/user/.gnupg/gpg.conf
|
||||
configs/.gnupg/*
|
||||
!configs/.gnupg/gpg.conf
|
||||
|
||||
lazy-lock.json
|
||||
|
||||
home/user/.config/ranger/plugins
|
||||
home/user/.termux/shell
|
||||
configs/.config/ranger/plugins
|
||||
configs/.termux/shell
|
||||
|
||||
home/user/.config/tmux/plugins
|
||||
home/user/.config/tmux/local.conf
|
||||
configs/.config/tmux/plugins
|
||||
configs/.config/tmux/local.conf
|
||||
|
||||
home/user/.tmux/*
|
||||
!home/user/.tmux/dotfiles
|
||||
!home/user/.tmux/sandbox
|
||||
!home/user/.tmux/ssh
|
||||
!home/user/.tmux/example-background-job
|
||||
!home/user/.tmux/system-update
|
||||
!home/user/.tmux/music
|
||||
!home/user/.tmux/landing
|
||||
configs/.tmux/*
|
||||
!configs/.tmux/dotfiles
|
||||
!configs/.tmux/sandbox
|
||||
!configs/.tmux/ssh
|
||||
!configs/.tmux/example-background-job
|
||||
!configs/.tmux/system-update
|
||||
!configs/.tmux/music
|
||||
!configs/.tmux/landing
|
||||
|
||||
home/user/.config/git/local
|
||||
configs/.config/git/local
|
||||
|
||||
home/user/.config/sway/config.d/*
|
||||
!home/user/.config/sway/config.d/.gitkeep
|
||||
configs/.config/sway/config.d/*
|
||||
!configs/.config/sway/config.d/.gitkeep
|
||||
|
||||
home/user/.config/sway/variables.d/*
|
||||
!home/user/.config/sway/variables.d/.gitkeep
|
||||
configs/.config/sway/variables.d/*
|
||||
!configs/.config/sway/variables.d/.gitkeep
|
||||
|
||||
home/user/.config/alacritty/config.d/*
|
||||
!home/user/.config/alacritty/config.d/.gitkeep
|
||||
configs/.config/alacritty/config.d/*
|
||||
!configs/.config/alacritty/config.d/.gitkeep
|
||||
|
||||
home/user/.config/yazi/plugins/
|
||||
configs/.config/yazi/plugins/
|
||||
|
||||
68
README.md
68
README.md
@ -1,68 +0,0 @@
|
||||
<h1 align="center">Kan`s dotfiles</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/TheK4n">
|
||||
<img src="https://img.shields.io/github/followers/TheK4n?label=Follow&style=social" alt="TheK4n">
|
||||
</a>
|
||||
<a href="https://github.com/TheK4n/dotfiles">
|
||||
<img src="https://img.shields.io/github/stars/TheK4n/dotfiles?style=social" alt="project">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
## Content
|
||||
|
||||
* [Project description](#chapter-0)
|
||||
* [Installation](#chapter-1)
|
||||
|
||||
|
||||
<a id="chapter-0"></a>
|
||||
## Project description
|
||||
|
||||
Config files for:
|
||||
* zsh
|
||||
* alacritty
|
||||
* tmux
|
||||
* ssh
|
||||
* git
|
||||
* ranger
|
||||
* sway
|
||||
* vim
|
||||
* nvim
|
||||
|
||||
|
||||
### Prompt
|
||||
<p align="center">
|
||||
<img src=".assets/prompt.png" alt="Prompt">
|
||||
</p>
|
||||
|
||||
You can add your files to the `~/.config/zsh/zshrc.d` directory for zsh so
|
||||
that they automatically run in ascending order when you open a terminal.\
|
||||
Example:\
|
||||
`~/.config/zsh/zshrc.d/01_hello.sh`
|
||||
```sh
|
||||
echo "Hello $USER!"
|
||||
```
|
||||
|
||||
<a id="chapter-1"></a>
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
git clone https://github.com/TheK4n/dotfiles
|
||||
cd dotfiles
|
||||
./install zsh nvim ...
|
||||
```
|
||||
|
||||
|
||||
## Installation script
|
||||
Per-user dotfiles "package" manager
|
||||
|
||||
### Features
|
||||
1. Installing files from dotfiles/home/user to $HOME
|
||||
2. Uninstalling installed files
|
||||
3. Check installation integrity
|
||||
4. Transaction based installation
|
||||
5. Does not overwrite your configs
|
||||
|
||||
|
||||
<h1 align="center"><a href="#top">▲</a></h1>
|
||||
32
TARGETS.sh
32
TARGETS.sh
@ -1,32 +0,0 @@
|
||||
readonly TARGETS="\
|
||||
colors:.config/terminal-colors.d
|
||||
less:.lesskey .infokey
|
||||
tmux:.config/tmux .tmux .config/systemd/user/tmux.service %copypasta
|
||||
t:
|
||||
note:
|
||||
psw:
|
||||
zsh:.config/zsh .zshenv .zshenv.d .inputrc %copypasta %colors
|
||||
alacritty:.config/alacritty
|
||||
nvim:.config/nvim .editorconfig .editrc .local/bin/vim_askpass_helper
|
||||
ssh:
|
||||
git:.config/git .local/bin/ga
|
||||
ranger:.config/ranger
|
||||
yazi:.config/yazi
|
||||
gpg:
|
||||
sway:.config/sway .config/waybar .config/mako .config/mimeapps.list .config/rofi .local/bin/screenshot .config/swaylock .Xresources .config/kanshi .local/bin/firefox_media %copypasta %pomodoro
|
||||
pomodoro:
|
||||
bat:.config/bat
|
||||
font:
|
||||
termux:.termux
|
||||
arch:
|
||||
psql:.psqlrc
|
||||
docker:.docker/cli-plugins
|
||||
ipython:.ipython/profile_default/ipython_config.py
|
||||
gdb:.config/gdb
|
||||
sandbox:
|
||||
chromium:.local/bin/pchromium .local/share/applications/pchromium.desktop
|
||||
scripts:.local/bin/httpstatus .local/bin/apco .local/bin/bb .local/bin/emoji .local/bin/mksh .local/bin/nato .local/bin/pastas .local/bin/timer .local/bin/tryna .local/bin/trynafail .local/bin/bak .local/bin/cleanup-directory .local/bin/cleanup-directory-log .local/bin/gobuild .local/bin/json .local/bin/open .local/bin/py .local/bin/sha .local/bin/showtips .local/bin/weather .local/bin/rmt .local/bin/scratch .local/bin/wake .local/bin/myip .local/bin/genpass .local/bin/gensalt .local/bin/django-create-project .local/bin/mirror-site .local/bin/split-file .local/bin/extract .local/bin/destroy .local/bin/serveit .local/bin/highlight-logs .local/bin/flipbit %copypasta
|
||||
music:.local/bin/mpv-service.sh .config/systemd/user/mpv.service .local/bin/player
|
||||
copypasta:.local/bin/copy .local/bin/pasta
|
||||
starsector:.java/.userPrefs/com/fs/starfarer/prefs.xml .local/share/applications/starsector.desktop .local/bin/starsector
|
||||
all:%less %t %note %tmux %zsh %nvim %git %yazi"
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
beep -f 4000 -l 150 -D 150 -n -f 4000 -l 150
|
||||
14
etc/hosts
14
etc/hosts
@ -1,14 +0,0 @@
|
||||
|
||||
# Local
|
||||
## 192.168.50.1 router.home
|
||||
## 192.168.50.2 router2.home
|
||||
|
||||
## 192.168.50.10 files.home
|
||||
## 192.168.50.11 builder.home
|
||||
## 192.168.50.12 printer.home
|
||||
|
||||
## 192.168.50.20 workstation.home
|
||||
## 192.168.50.21 phone.home
|
||||
|
||||
# Network
|
||||
# 91.91.91.91 home
|
||||
@ -1,3 +0,0 @@
|
||||
chmod 751 "${HOME}"
|
||||
mkdir "${HOME}/public"
|
||||
chmod 1777 "${HOME}/public"
|
||||
@ -1,5 +0,0 @@
|
||||
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
|
||||
@includedir /etc/sudoers.d
|
||||
|
||||
Defaults passwd_timeout=0
|
||||
@ -1 +0,0 @@
|
||||
%custompower ALL= NOPASSWD: /sbin/reboot,/sbin/shutdown now,/sbin/systemctl suspend
|
||||
@ -1 +0,0 @@
|
||||
%wireguard ALL= NOPASSWD: /sbin/systemctl start wg-quick@wg0.service,/sbin/systemctl stop wg-quick@wg0.service
|
||||
@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Disable capslock
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -c "dumpkeys | sed s/Caps_Lock/Control/ | loadkeys"
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
After=multi-user.target
|
||||
@ -1,4 +0,0 @@
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --noreset --noclear --autologin thek4n - ${TERM}
|
||||
@ -1,3 +0,0 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty -o '-p -- %%USER%%' --noclear --skip-login - $TERM
|
||||
@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=Wake-on-LAN for enp3s0
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ethtool -s enp3s0 wol g
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo
|
||||
figlet -ct -f banner "welcome mr.kan"
|
||||
echo
|
||||
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "wg0 status: $(systemctl is-active wg-quick@wg0.service)"
|
||||
|
||||
if ! systemctl is-active wg-quick@wg0.service 1>/dev/null; then
|
||||
#shellcheck disable=SC2016
|
||||
echo 'Executing this command may fix wireguard: "sudo apt update && sudo apt install linux-headers-$(uname -r) && sudo reboot"'
|
||||
fi
|
||||
|
||||
echo
|
||||
86
flake.lock
generated
Normal file
86
flake.lock
generated
Normal file
@ -0,0 +1,86 @@
|
||||
{
|
||||
"nodes": {
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781152676,
|
||||
"narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786538400,
|
||||
"narHash": "sha256-PH8B1YKxedcWKNw2xsk6cKPVk/rJoLgdlWd5d+Icies=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e13ba5e5abbd9b912fa8c6979bd119e87ca7fdd9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1786384358,
|
||||
"narHash": "sha256-RzPPiWeUtuvymnpuEWsdtzli5w4kjZs49FqEs3/1u+I=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fcb964de67fcf60b43471c55d5d99e61a9ccb5a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1786430034,
|
||||
"narHash": "sha256-Vux08kA5PICwS2sViCMfwVLAHNoH8TkKAeBo25LjpMI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "70cc4559b10a6062b05ff1af17e0add065ccaed9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
76
flake.nix
Normal file
76
flake.nix
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
description = "My NixOS configuration with flakes and home-manager";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, disko, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
mkHost = { hostname, username, system ? "x86_64-linux", extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
hostname = hostname;
|
||||
username = username;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./hosts/default/configuration.nix
|
||||
./hosts/${hostname}/configuration.nix
|
||||
|
||||
disko.nixosModules.disko
|
||||
|
||||
./hosts/${hostname}/disko.nix
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
users.${username} = import ./home/users/${username}.nix;
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
hostname = hostname;
|
||||
};
|
||||
};
|
||||
}
|
||||
] ++ extraModules;
|
||||
};
|
||||
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
thek4n = mkHost {
|
||||
hostname = "thek4n";
|
||||
username = "thek4n";
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system}.default = nixpkgs.legacyPackages.${system}.mkShell {
|
||||
buildInputs = with nixpkgs.legacyPackages.${system}; [
|
||||
nixpkgs-fmt
|
||||
nixd
|
||||
git
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
Xft.dpi: 100
|
||||
@ -1,12 +0,0 @@
|
||||
set preview_images true
|
||||
set preview_images_method ueberzug
|
||||
|
||||
# Show VCS info
|
||||
set vcs_aware true
|
||||
|
||||
default_linemode devicons
|
||||
|
||||
set viewmode miller
|
||||
|
||||
map <F3> exit
|
||||
map ,x exit
|
||||
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
readonly SESSION=dotfiles
|
||||
readonly MAINW=1
|
||||
|
||||
readonly WORKING_PROJECT="${HOME}/dotfiles"
|
||||
|
||||
if ! tmux has-session -t="${SESSION}"; then
|
||||
tmux new-session -s "${SESSION}" -d -n "${MAINW}" -c "${WORKING_PROJECT}"
|
||||
tmux splitw -t "${SESSION}:${MAINW}" -d -b -h -l "${_tmux_other_pane_size}" -c "${WORKING_PROJECT}"
|
||||
sleep 0.3
|
||||
tmux send-keys -t "${SESSION}:${MAINW}.1" "git pull --rebase && git push" Enter
|
||||
tmux send-keys -t "${SESSION}:${MAINW}.2" 'ya' Enter
|
||||
fi
|
||||
|
||||
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"
|
||||
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
|
||||
random() {
|
||||
shuf -i 0-32767 -n 1
|
||||
}
|
||||
|
||||
readonly SESSION_PREFIX="sandbox"
|
||||
|
||||
SESSION="${SESSION_PREFIX}$(random)"
|
||||
while tmux has-session -t="${SESSION}" 2>/dev/null
|
||||
do
|
||||
SESSION="${SESSION_PREFIX}$(random)"
|
||||
done
|
||||
readonly SESSION
|
||||
|
||||
|
||||
WORKING_PROJECT="$(mktemp -td "${SESSION}.XXXX")"
|
||||
readonly WORKING_PROJECT
|
||||
|
||||
tmux new-session -s "${SESSION}" -d -c "${WORKING_PROJECT}"
|
||||
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"
|
||||
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
readonly SESSION='system-update'
|
||||
readonly MAINW=1
|
||||
|
||||
readonly WORKING_PROJECT="${HOME}"
|
||||
|
||||
if ! tmux has-session -t="${SESSION}"; then
|
||||
tmux new-session -s "${SESSION}" -d -n "${MAINW}" -c "${WORKING_PROJECT}"
|
||||
tmux splitw -t "${SESSION}:${MAINW}" -d -b -h -l "${_tmux_other_pane_size}" -c '#{pane_current_path}'
|
||||
tmux send-keys -t "${SESSION}:${MAINW}.1" "sudo pacman -Syu --noconfirm"
|
||||
tmux send-keys -t "${SESSION}:${MAINW}.2" '$EDITOR' Enter
|
||||
sleep 0.5
|
||||
tmux send-keys -t "${SESSION}:${MAINW}.2" ':Lazy' Enter
|
||||
fi
|
||||
|
||||
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"
|
||||
@ -1 +0,0 @@
|
||||
export PATH="${PATH}:${HOME}/.local/bin"
|
||||
@ -145,7 +145,10 @@ vim.cmd.highlight({ "DiagnosticInfo", "guifg=Grey" })
|
||||
vim.cmd.highlight({ "DiagnosticHint", "guifg=Grey" })
|
||||
|
||||
-- Russian commands
|
||||
opt.langmap = 'ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz'
|
||||
-- opt.langmap = 'ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz'
|
||||
|
||||
-- Colemak fix
|
||||
opt.langmap = "nei;jkl,jkl;nei"
|
||||
|
||||
|
||||
vim.o.viewdir = vim.fn.stdpath('cache')..'/view'
|
||||
@ -3,8 +3,9 @@ configuration {
|
||||
terminal: "alacritty";
|
||||
font: "xft:FiraCode 12";
|
||||
kb-accept-entry: "Ctrl+m,Return";
|
||||
kb-row-up: "Ctrl+k";
|
||||
kb-row-down: "Ctrl+j";
|
||||
kb-row-up: "Ctrl+e,Up";
|
||||
kb-row-down: "Ctrl+n,Down";
|
||||
kb-move-end: "Control+j"
|
||||
kb-remove-to-eol: "";
|
||||
}
|
||||
@theme "Arc-Dark"
|
||||
@ -38,13 +38,14 @@ bindsym --to-code $mod+Shift+r reload
|
||||
|
||||
set $menu rofi -show drun -m -1
|
||||
bindsym --to-code $mod+d exec $menu
|
||||
bindsym $mod+o exec --no-startup-id slm_rofi
|
||||
|
||||
bindsym --to-code $mod+Shift+x exec --no-startup-id ~/.config/sway/scripts/power-menu.sh
|
||||
|
||||
# Change focus
|
||||
bindsym --to-code $mod+h focus left
|
||||
bindsym --to-code $mod+j focus down
|
||||
bindsym --to-code $mod+k focus up
|
||||
bindsym --to-code $mod+l focus right
|
||||
bindsym --to-code $mod+n focus down
|
||||
bindsym --to-code $mod+e focus up
|
||||
bindsym --to-code $mod+i focus right
|
||||
bindsym --to-code $mod+Left focus left
|
||||
bindsym --to-code $mod+Down focus down
|
||||
bindsym --to-code $mod+Up focus up
|
||||
@ -52,9 +53,9 @@ bindsym --to-code $mod+Right focus right
|
||||
|
||||
# Move focused window
|
||||
bindsym --to-code $mod+Shift+h move left
|
||||
bindsym --to-code $mod+Shift+j move down
|
||||
bindsym --to-code $mod+Shift+k move up
|
||||
bindsym --to-code $mod+Shift+l move right
|
||||
bindsym --to-code $mod+Shift+n move down
|
||||
bindsym --to-code $mod+Shift+e move up
|
||||
bindsym --to-code $mod+Shift+i move right
|
||||
bindsym --to-code $mod+Shift+Left move left
|
||||
bindsym --to-code $mod+Shift+Down move down
|
||||
bindsym --to-code $mod+Shift+Up move up
|
||||
@ -62,9 +63,9 @@ bindsym --to-code $mod+Shift+Right move right
|
||||
|
||||
|
||||
bindsym --to-code $mod+Ctrl+Shift+l move workspace to output right
|
||||
bindsym --to-code $mod+Ctrl+Shift+h move workspace to output left
|
||||
bindsym --to-code $mod+Ctrl+Shift+k move workspace to output up
|
||||
bindsym --to-code $mod+Ctrl+Shift+j move workspace to output down
|
||||
bindsym --to-code $mod+Ctrl+Shift+n move workspace to output left
|
||||
bindsym --to-code $mod+Ctrl+Shift+e move workspace to output up
|
||||
bindsym --to-code $mod+Ctrl+Shift+i move workspace to output down
|
||||
|
||||
|
||||
bindsym --to-code $mod+f fullscreen toggle
|
||||
@ -146,9 +147,9 @@ bindsym --to-code $mod+Tab workspace back_and_forth
|
||||
set $resizemode "Resize: toggle [p]recize"
|
||||
mode $resizemode {
|
||||
bindsym --to-code h resize shrink width 10 px or 10 ppt
|
||||
bindsym --to-code j resize grow height 10 px or 10 ppt
|
||||
bindsym --to-code k resize shrink height 10 px or 10 ppt
|
||||
bindsym --to-code l resize grow width 10 px or 10 ppt
|
||||
bindsym --to-code n resize grow height 10 px or 10 ppt
|
||||
bindsym --to-code e resize shrink height 10 px or 10 ppt
|
||||
bindsym --to-code i resize grow width 10 px or 10 ppt
|
||||
|
||||
bindsym --to-code $mod+r mode "default"
|
||||
bindsym --to-code p mode $presizemode
|
||||
@ -159,9 +160,9 @@ mode $resizemode {
|
||||
set $presizemode "Precise resize: toggle [p]resize"
|
||||
mode $presizemode {
|
||||
bindsym --to-code h resize shrink width 1 px or 1 ppt
|
||||
bindsym --to-code j resize grow height 1 px or 1 ppt
|
||||
bindsym --to-code k resize shrink height 1 px or 1 ppt
|
||||
bindsym --to-code l resize grow width 1 px or 1 ppt
|
||||
bindsym --to-code n resize grow height 1 px or 1 ppt
|
||||
bindsym --to-code i resize shrink height 1 px or 1 ppt
|
||||
bindsym --to-code i resize grow width 1 px or 1 ppt
|
||||
|
||||
bindsym --to-code $mod+r mode "default"
|
||||
bindsym --to-code p mode $resizemode
|
||||
13
home/users/configs/.config/sway/scripts/power-menu.sh
Executable file
13
home/users/configs/.config/sway/scripts/power-menu.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
choice=$(echo -e "Exit\nReboot\nShutdown\nSuspend\nLock\nBlack\nUEFI" | rofi -dmenu -p "Power Menu:" -i)
|
||||
|
||||
case "${choice}" in
|
||||
Exit) swaymsg exit ;;
|
||||
Reboot) systemctl reboot ;;
|
||||
Shutdown) shutdown -h now ;;
|
||||
Suspend) ~/.config/sway/scripts/lock-telegram.sh && systemctl suspend ;;
|
||||
Lock) ~/.config/sway/scripts/lock-telegram.sh && swaylock -f ;;
|
||||
Black) magick canvas:none PNG:- | feh --class black -YFx - ;;
|
||||
UEFI) systemctl reboot --firmware-setup ;;
|
||||
esac
|
||||
@ -21,6 +21,7 @@
|
||||
"custom/battery",
|
||||
"custom/pomodoro",
|
||||
"custom/bluetooth",
|
||||
"custom/ScrollMPRIS",
|
||||
"pulseaudio",
|
||||
"custom/language",
|
||||
"custom/userhost",
|
||||
@ -64,6 +65,22 @@
|
||||
"interval": 5,
|
||||
"return-type": "text",
|
||||
},
|
||||
"custom/ScrollMPRIS": {
|
||||
"name": "custom-scrollmedia",
|
||||
"return-type": "json",
|
||||
"exec": "ScrollMPRIS -s 80 -w 20 --scroll wrapping --format '{title} - {artist}'",
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-click-right": "playerctl next",
|
||||
"on-middle-click": "playerctl previous",
|
||||
},
|
||||
"custom/media": {
|
||||
"exec": "playerctl metadata --format '{{title}} - {{artist}}' | cut -c -30",
|
||||
"interval": 1,
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-click-right": "playerctl next",
|
||||
"on-middle-click": "playerctl previous",
|
||||
"format": " {}",
|
||||
},
|
||||
"custom/bluetooth": {
|
||||
"exec": "~/.config/waybar/scripts/builder.sh bluetooth_battery",
|
||||
"interval": 5,
|
||||
@ -38,6 +38,8 @@ window#waybar {
|
||||
#cpu,
|
||||
#custom-cpu_temp,
|
||||
#custom-bluetooth,
|
||||
#custom-media,
|
||||
#custom-scrollmedia,
|
||||
#pulseaudio,
|
||||
#custom-pomodoro,
|
||||
#custom-language,
|
||||
@ -56,6 +58,10 @@ window#waybar {
|
||||
color: #81C784;
|
||||
}
|
||||
|
||||
#custom-media, #custom-scrollmedia {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #2a5c45;
|
||||
}
|
||||
@ -1,3 +1,18 @@
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "h"
|
||||
run = "leave"
|
||||
desc = "Назад (вверх по иерархии)"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "n"
|
||||
run = "arrow next"
|
||||
desc = "Вниз"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "e"
|
||||
run = "arrow prev"
|
||||
desc = "Вверх"
|
||||
|
||||
[[mgr.append_keymap]]
|
||||
on = [ "c", "e" ]
|
||||
run = "shell -- flipbit x %h"
|
||||
@ -13,7 +28,7 @@ run = "plugin jump-to-char"
|
||||
desc = "Jump to char"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "l"
|
||||
on = "i"
|
||||
run = "plugin smart-enter"
|
||||
desc = "Enter the child directory, or open the file"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user