Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherhadi committed Oct 10, 2024
1 parent df52538 commit 159ce3c
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 55 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
paths:
- 'docs/src/README_template.md'
permissions:
contents: write
jobs:
update-readme:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Run a script
run: |
chmod +x ./docs/scripts/create_readme.sh
./docs/scripts/create_readme.sh
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update README.md (auto)"
git push
75 changes: 38 additions & 37 deletions docs/KEYBINDINGS-HYPRLAND.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
[//]: # (This file is autogenerated)
# Keybindings for Hyprland

The list of the keybindings working on Hyprland:
> [!NOTE]
> SUPER is the windows key by default
| Description | Keybinding |
| -- | -- |
| Switch Workspace | SUPER + {Number} |
| Move app to Workspace | SHIFT + SUPER + {Number} |
| Kitty | SUPER + RETURN |
| Thunar | SUPER + E |
| Qutebrowser | SUPER + B |
| Bitwarden | SUPER + K |
| Lock | SUPER + L |
| Powermenu | SUPER + X |
| Launcher | SUPER + SPACE |
| Toggle HyprFocus | SHIFT + SUPER + SPACE |
| Close window | SUPER + Q |
| Toggle Floating | SUPER + T |
| Toggle Fullscreen | SUPER + F |
| Move focus left | SUPER + left |
| Move focus Right | SUPER + right |
| Move focus Up | SUPER + up |
| Move focus Down | SUPER + down |
| Focus previous monitor | SHIFT + SUPER + up |
| Focus next monitor | SHIFT + SUPER + down |
| Add to master | SHIFT + SUPER + left |
| Remove from master | SHIFT + SUPER + right |
| Screenshot window | SUPER + PRINT |
| Screenshot monitor | PRINT |
| Screenshot region | SHIFT + SUPER + PRINT |
| Screenshot region then edit | ALT PRINT |
| Search on internet with wofi | SHIFT + SUPER + S |
| Clipboard picker with wofi | SHIFT + SUPER + C |
| Emoji picker with wofi | SHIFT + SUPER + E |
| Toggle night shift | SUPER + F2 |
| Toggle night shift | SUPER + F3 |
| Move Window (mouse) | SUPER + mouse:272 |
| Resize Window (mouse) | SUPER + R |
| Toggle Mute | XF86AudioMute |
| Lock when closing Lid | switch:Lid Switch |
| Sound Up | XF86AudioRaiseVolume |
| Sound Down | XF86AudioLowerVolume |
| Brightness Up | XF86MonBrightnessUp |
| Brightness Down | XF86MonBrightnessDown |
| Kitty | SUPER + RETURN |
| Thunar | SUPER + E |
| Qutebrowser | SUPER + B |
| Bitwarden | SUPER + K |
| Lock | SUPER + L |
| Powermenu | SUPER + X |
| Launcher | SUPER + SPACE |
| Toggle HyprFocus | SHIFT + SUPER + SPACE |
| Close window | SUPER + Q |
| Toggle Floating | SUPER + T |
| Toggle Fullscreen | SUPER + F |
| Move focus left | SUPER + left |
| Move focus Right | SUPER + right |
| Move focus Up | SUPER + up |
| Move focus Down | SUPER + down |
| Focus previous monitor | SHIFT + SUPER + up |
| Focus next monitor | SHIFT + SUPER + down |
| Add to master | SHIFT + SUPER + left |
| Remove from master | SHIFT + SUPER + right |
| Screenshot window | SUPER + PRINT |
| Screenshot monitor | PRINT |
| Screenshot region | SHIFT + SUPER + PRINT |
| Screenshot region then edit | ALT PRINT |
| Search on internet with wofi | SHIFT + SUPER + S |
| Clipboard picker with wofi | SHIFT + SUPER + C |
| Emoji picker with wofi | SHIFT + SUPER + E |
| Toggle night shift | SUPER + F2 |
| Toggle night shift | SUPER + F3 |
| Move Window (mouse) | SUPER + mouse:272 |
| Resize Window (mouse) | SUPER + R |
| Toggle Mute | XF86AudioMute |
| Lock when closing Lid | switch:Lid Switch |
| Sound Up | XF86AudioRaiseVolume |
| Sound Down | XF86AudioLowerVolume |
| Brightness Up | XF86MonBrightnessUp |
| Brightness Down | XF86MonBrightnessDown |
11 changes: 6 additions & 5 deletions docs/scripts/keybindings_to_markdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,25 @@ keybindings=$(echo -e "$bind\n$bindm\n$bindl\n$bindle" | grep '"')
echo "[//]: # (This file is autogenerated)" >"$KEYBINDINGS_FILE"
echo "# Keybindings for Hyprland" >>"$KEYBINDINGS_FILE"
echo "" >>"$KEYBINDINGS_FILE"
echo "The list of the keybindings working on Hyprland:" >>"$KEYBINDINGS_FILE"
echo "> [!NOTE]" >>"$KEYBINDINGS_FILE"
echo "> SUPER is the windows key by default" >>"$KEYBINDINGS_FILE"
echo "" >>"$KEYBINDINGS_FILE"

echo "| Description | Keybinding |" >>"$KEYBINDINGS_FILE"
echo "| -- | -- |" >>"$KEYBINDINGS_FILE"
echo "| Switch Workspace | SUPER + {Number} |" >>"$KEYBINDINGS_FILE"
echo "| Move app to Workspace | SHIFT + SUPER + {Number} |" >>"$KEYBINDINGS_FILE"
echo "$keybindings" | while read line; do
echo "$keybindings" | while read -r line; do
comment=$(echo "$line" | cut -d\# -f2)
line=$(echo "$line" | cut -d\# -f1)
line=${line:1:${#line}-3}
mod=$(echo "$line" | cut -d, -f1)
key=$(echo "$line" | cut -d, -f2)
dispatcher=$(echo "$line" | cut -d, -f3)
params=$(echo "$line" | cut -d, -f4)
# dispatcher=$(echo "$line" | cut -d, -f3)
# params=$(echo "$line" | cut -d, -f4)

[[ $mod == '$mod' ]] && mod="SUPER + "
[[ $mod == '$shiftMod' ]] && mod="SHIFT + SUPER + "

echo "| $comment | $mod$key |" >>"$KEYBINDINGS_FILE"
echo "| ${comment:1} | $mod$key |" >>"$KEYBINDINGS_FILE"
done
15 changes: 8 additions & 7 deletions docs/src/README_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ git clone https://github.com/anotherhadi/nixy ~/.config/nixos
4. Add your 'nixosConfigurations' inside `flake.nix`

> [!Important]
> I added few `# CHANGEME` comments in the files to help you find what to change. Be sure to check them up
> I added few `# CHANGEME` comments in the files to help you find what to change. Be sure to check them up.
> You can use `rg "CHANGEME"` to find them all with ripgrep.
> [!TIP]
> When you add new files, don't forget to run `git add .` to add them to the git repository
Expand All @@ -98,11 +99,11 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname

## Documentation

- [THEMES.md](docs/THEMES.md): How themes work and how to create your own
- [SCRIPTS.md](docs/SCRIPTS.md): Scripts that are available
- [KEYBINDINGS-HYPRLAND.md](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in Hyprland
- [WALLPAPERS.md](https://github.com/anotherhadi/nixy-wallpapers): A collection of wallpapers for Nixy.
- [THEMES](docs/THEMES.md): How themes work and how to create your own
- [SCRIPTS](docs/SCRIPTS.md): Scripts that are available
- [KEYBINDINGS-HYPRLAND](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in Hyprland
- [WALLPAPERS](https://github.com/anotherhadi/nixy-wallpapers): A collection of wallpapers for Nixy.

- [TODO.md](docs/TODO.md): What's next (feel free to contribute)
- [CONTRIBUTING.md](docs/CONTRIBUTING.md): How to contribute
- [TODO](docs/TODO.md): What's next (feel free to contribute)
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
- [LICENSE](LICENSE): MIT License
5 changes: 3 additions & 2 deletions hosts/laptop/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{ config, ... }: {
imports = [
../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
../../nixos/prime.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU

../../nixos/audio.nix
../../nixos/auto-upgrade.nix
../../nixos/bluetooth.nix
../../nixos/fonts.nix
../../nixos/home-manager.nix
../../nixos/network-manager.nix
../../nixos/nix.nix
../../nixos/nvidia.nix
../../nixos/prime.nix
../../nixos/systemd-boot.nix
../../nixos/timezone.nix
../../nixos/tuigreet.nix
Expand Down
2 changes: 1 addition & 1 deletion hosts/laptop/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
../../home/system/udiskie
../../home/system/clipman

./secrets # You should probably remove this line
./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
];

home = {
Expand Down
2 changes: 2 additions & 0 deletions hosts/laptop/secrets/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Those are my secrets, encrypted with sops
# You shouldn't import this file, unless you edit it
{ pkgs, inputs, ... }: {
imports = [ inputs.sops-nix.homeManagerModules.sops ];

Expand Down
3 changes: 2 additions & 1 deletion hosts/laptop/variables.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
config.var = {
hostname = "nixy";
username = "hadi";
configDirectory = "/home/" + config.var.username + "/.config/nixos";
configDirectory = "/home/" + config.var.username
+ "/.config/nixos"; # The path of the nixos configuration directory

keyboardLayout = "fr";

Expand Down
8 changes: 6 additions & 2 deletions nixos/prime.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

# sync.enable = true;

amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
# CHANGEME: Change those values to match your hardware (if prime is imported)
amdgpuBusId =
"PCI:5:0:0"; # Set this to the bus ID of your AMD GPU if you have one
# intelBusId = "PCI:0:2:0"; # Set this to the bus ID of your Intel GPU if you have one
nvidiaBusId =
"PCI:1:0:0"; # Set this to the bus ID of your Nvidia GPU if you have one
};
}

0 comments on commit 159ce3c

Please sign in to comment.