Skip to content

Commit

Permalink
Merge pull request #1 from haroun/minimal
Browse files Browse the repository at this point in the history
Minimal
  • Loading branch information
haroun authored Aug 19, 2022
2 parents 4f1aaba + 0c19d37 commit 23cd7f2
Show file tree
Hide file tree
Showing 71 changed files with 2,258 additions and 3,565 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@
[submodule "vim/pack/Shougo/opt/ddc-sorter_rank"]
path = vim/pack/Shougo/opt/ddc-sorter_rank
url = https://github.com/Shougo/ddc-sorter_rank.git
[submodule "vim/pack/arcticicestudio/opt/nord-vim"]
path = vim/pack/arcticicestudio/opt/nord-vim
url = https://github.com/arcticicestudio/nord-vim.git
[submodule "terminal/dircolors/arcticicestudio/nord-dircolors"]
path = terminal/dircolors/arcticicestudio/nord-dircolors
url = https://github.com/arcticicestudio/nord-dircolors.git
38 changes: 27 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: default additional-apt additional-brew additional-vscode additional-vscode-save git gpg install javascript terminal update upgrade vim zsh
.PHONY: default additional-apt additional-arch-linux additional-brew additional-pacman additional-vscode additional-vscode-save git gpg install javascript terminal update upgrade vim zsh
# .SILENT:

CURDIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
Expand All @@ -10,10 +10,22 @@ additional-apt:
@echo '>> apt'
apt-get update && apt-get upgrade

additional-arch-linux:
@echo '>> arch-linux'
ln -nfs "$(CURDIR)/additional/arch-linux/sway" "$(TARGETDIR)/.config/sway"
ln -nfs "$(CURDIR)/additional/arch-linux/swaylock" "$(TARGETDIR)/.config/swaylock"
ln -nfs "$(CURDIR)/additional/arch-linux/wofi" "$(TARGETDIR)/.config/wofi"
ln -nfs "$(CURDIR)/additional/arch-linux/waybar" "$(TARGETDIR)/.config/waybar"

additional-brew:
@echo '>> homebrew'
brew update && brew upgrade && brew upgrade --cask

additional-pacman:
@echo '>> pacman'
sudo pacman -Syu
yay -Sua

additional-vscode:
@echo '>> additional: vscode'
@echo . 'Link settings.json & snippets'
Expand Down Expand Up @@ -44,7 +56,7 @@ gpg:

install:
@echo '> install'
git submodule init && git submodule update && git submodule foreach "git checkout main || git checkout master"
git submodule init && git submodule update && git submodule foreach "git checkout main || git checkout master || git checkout develop"
make git
make gpg
make zsh
Expand All @@ -57,39 +69,43 @@ install:
javascript:
@echo '>> javascript'
@echo 'Install tern'
npm install -g tern
npm install --location=global tern
@echo 'Install npm-merge-driver'
npm install -g npm-merge-driver
npm install --location=global npm-merge-driver
@echo 'Link tern configuration'
ln -fs "$(CURDIR)/javascript/.tern-config" "$(TARGETDIR)/.tern-config"

terminal:
@echo '>> terminal'
@echo 'Link alacritty'
mkdir -p "$(TARGETDIR)/.config/alacritty"
ln -fs "$(CURDIR)/terminal/alacritty/.alacritty.yml" "$(TARGETDIR)/.config/alacritty/alacritty.yml"
ln -fs "$(CURDIR)/terminal/alacritty/alacritty.yml" "$(TARGETDIR)/.config/alacritty/alacritty.yml"
ln -fs "$(CURDIR)/terminal/alacritty/color-nord.yml" "$(TARGETDIR)/.config/alacritty/color-nord.yml"
ln -fs "$(CURDIR)/terminal/alacritty/color-base16-ocean.yml" "$(TARGETDIR)/.config/alacritty/color-base16-ocean.yml"
@echo 'Link tmux'
ln -fs "$(CURDIR)/terminal/tmux/tmux.conf" "$(TARGETDIR)/.tmux.conf"
ln -fs "$(CURDIR)/terminal/tmux/.tmux.conf" "$(TARGETDIR)/.tmux.conf"
@echo 'Link dircolors'
ln -fsr "$(CURDIR)/terminal/dircolors/arcticicestudio/nord-dircolors/src/dir_colors" "$(TARGETDIR)/.dir_colors"

update:
@echo '>> update'
git pull
@echo 'npm'
npm -g update
npm update --location=global
@echo 'dependencies'
git submodule update --init

upgrade:
@echo '>> upgrade'
git pull
@echo 'npm'
npm i -g npm
npm install --location=global npm
@echo 'vim'
pip3 install --user --upgrade pynvim
cd $(CURDIR)/vim/pack/ternjs/start/tern_for_vim && npm install && cd $(CURDIR)
@echo 'dependencies'
git submodule foreach 'git checkout $$(git symbolic-ref --short HEAD) && git pull'
npm outdated -g
npm outdated --location=global

vim:
@echo '>> vim'
Expand All @@ -100,11 +116,11 @@ vim:
pip3 install --user --upgrade pynvim
cd $(CURDIR)/vim/pack/ternjs/start/tern_for_vim && npm install && cd $(CURDIR)
@echo 'Install vim language server protocol'
npm install -g dockerfile-language-server-nodejs typescript typescript-language-server vscode-langservers-extracted
npm install --location=global dockerfile-language-server-nodejs typescript typescript-language-server vscode-langservers-extracted
@echo 'Install vim debug adapter protocol'
cd $(CURDIR)/javascript/modules/microsoft/vscode-node-debug2 && npm ci && npx gulp build && cd $(CURDIR)
@echo 'Install node.js provider'
npm install -g neovim
npm install --location=global neovim
@echo 'Please open neovim and run :checkhealth & :UpdateRemotePlugins'

zsh:
Expand Down
179 changes: 179 additions & 0 deletions additional/arch-linux/sway/cheatsheet
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
EndeavourOS Sway-WM CheatSheet :

- Hello! Welcome to EndeavourOS and our Sway-WM Edition! Now we'll admit this is not vanilla Sway and it wasn't desinged to be. It is loosely themed around the ArcDark
colorscheme chosen for it's stability and ease of implementation. The default bar is Waybar not Swaybar - once again chosen it's ease of use and stability as well
the options it offers.

- Sway is documentated through man pages unlike i3.To get a overview of what to expect you can read 'man 5 sway'. The pages are then spilt into topics - some the
important ones are listed at the bottom of the document. Waybar is also documented through man pages - 'man 5 waybar'.

- Our file structure is spilt for easier use - the names of the files eg; 'output' referring to the part they play.

- If your experiencing issus with your cursor - edit file '~/.profile' and comment out 'export WLR_NO_HARDWARE_CURSORS=1'

- Other than that enjoy your time here and welcome! You can join the Forum or our Telegram - we'd love to hear from you!

 = windows key

# start floating xfce4-terminal
+Return

# start fixed termite-terminal
+Shift+Return

# kill focused window
+q

# Application menu - wofi:
+d

# Activities:
+p

# Power-Menu:
+Shift+e

# Lock the system
+f1

# reload the configuration file
+Shift+c

# change window focus,like vim
+h focus left
+j focus down
+k focus up
+l focus right

# alternatively, you can use the cursor keys:
+Left focus left
+Down focus down
+Up focus up
+Right focus right

# move a focused window
+Shift+h move left
+Shift+j move down
+Shift+k move up
+Shift+l move right

# alternatively, you can use the cursor keys:
+Shift+Left move left
+Shift+Down move down
+Shift+Up move up
+Shift+Right move right

# split in horizontal orientation (changes take place on next opened window):
+b

# split in vertical orientation (changes take place on next opened window):
+v

# enter fullscreen mode for the focused container:
+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split):
+s layout stacking
+w layout tabbed
+e layout toggle split

# toggle tiling / floating:
+Shift+space floating toggle

# change focus between tiling / floating windows:
+space focus mode_toggle

# focus the parent container:
+a focus parent

# resize floating window:
+right mouse button

# move floating window:
+left mouse button

# scratchpad:
+Shift+Minus move scratchpad
+minus scratchpad cycle

# resize mode:
+r

# resize,like vim:
h focus left
j focus down
k focus up
l focus right

# alternatively, you can use the cursor keys:
Left focus left
Down focus down
Up focus up
Right focus right

# Return to default mode:
Return or Escape

# Workspaces:
#
# Switch to workspace
+1 workspace number 1
+2 workspace number 2
+3 workspace number 3
+4 workspace number 4
+5 workspace number 5
+6 workspace number 6
+7 workspace number 7
+8 workspace number 8
+9 workspace number 9
+0 workspace number 10
# Move focused container to workspace:
+Shift+1 move container to workspace number 1
+Shift+2 move container to workspace number 2
+Shift+3 move container to workspace number 3
+Shift+4 move container to workspace number 4
+Shift+5 move container to workspace number 5
+Shift+6 move container to workspace number 6
+Shift+7 move container to workspace number 7
+Shift+8 move container to workspace number 8
+Shift+9 move container to workspace number 9
+Shift+0 move container to workspace number 10


# Multimedia Keys (be aware that these may not work for every keyboard):
They are enabled - you may need to hold down the function key while doing so.

# Screenshots:
PrintSrc for full screenshot
Shift+PrintSrc for screenshot options

# App Shortcuts:
+n thunar
+o firefox


# Other Things:

# Input - ~/.config/sway/config.d/input
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Put your touchpad's IDENFICATOR to replace "Touchpad-ID" (keep the quotation marks)
# Read `man 5 sway-input` for more information about this section.

# Output - ~/.config/sway/config.d/output
# You can get the names of your outputs by running: swaymsg -t get_outputs
# Read `man 5 sway-output` for more information about this section.

# Wallpaper - ~/.config/sway/config.d/theme
# exec swaybg -i /path/to/wallpaper

# Waybar - ~/.config/waybar/config : ~/.config/waybar/style.css
# It is an external bar we have chosen because of the option's it allows.
# If you wish to use the default swaybar - ~/.config/sway/config.d/theme and change waybar to sway-bar
# Read `man 5 sway-bar` for more information about this section

# Autostart - ~/.config/sway/config.d/autostart_applications





12 changes: 12 additions & 0 deletions additional/arch-linux/sway/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Initial Setup
# exec ~/set_once.sh

# Config for sway
#
# Read `man 5 sway` for a complete reference.

# user config directory
include $HOME/.config/sway/config.d/*

# only enable this if every app you use is compatible with wayland
# xwayland disable
51 changes: 51 additions & 0 deletions additional/arch-linux/sway/config.d/application_defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Assign workspaces
assign [app_id="firefox"] 2
for_window [app_id="firefox"] focus

assign [class="firefox"] 2
for_window [class="firefox"] focus

assign [app_id=thunar] 3
for_window [app_id=thunar] focus

assign [class="Telegram"] 4
for_window [class="Telegram"] focus


for_window [app_id="xed"] focus


# set floating (nontiling)for apps needing it:
for_window [class="Yad" instance="yad"] floating enable
for_window [app_id="yad"] floating enable
for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt

# set floating (nontiling) for special apps:
for_window [class="Xsane" instance="xsane"] floating enable
for_window [app_id="pavucontrol" ] floating enable, resize set width 40 ppt height 30 ppt
for_window [class="qt5ct" instance="qt5ct"] floating enable, resize set width 60 ppt height 50 ppt
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
for_window [app_id="pamac-manager"] floating enable, resize set width 80 ppt height 70 ppt
for_window [class="Lxappearance"] floating enable, resize set width 60 ppt height 50 ppt

# set floating for window roles
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [window_role="About"] floating enable
for_window [title="File Operation Progress"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt
for_window [app_id="firefox" title="Library"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt
for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt
for_window [title="Picture in picture"] floating enable, sticky enable
for_window [title="nmtui"] floating enable, resize set width 50 ppt height 70 ppt
for_window [title="htop"] floating enable, resize set width 50 ppt height 70 ppt
for_window [app_id="xsensors"] floating enable
for_window [title="Save File"] floating enable
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill

# Inhibit idle
for_window [app_id="firefox"] inhibit_idle fullscreen
for_window [app_id="Chromium"] inhibit_idle fullscreen
19 changes: 19 additions & 0 deletions additional/arch-linux/sway/config.d/autostart_applications
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Auth with polkit-gnome:
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

# Desktop notifications
exec mako

# Network Applet
exec nm-applet --indicator

# GTK3 applications take a long time to start
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK

# Welcome App
exec dex -a -s /etc/xdg/autostart/:~/.config/autostart/

# Sway Fader
# exec python3 ~/.config/sway/scripts/swayfader.py
6 changes: 6 additions & 0 deletions additional/arch-linux/sway/config.d/clamshell
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Clamshell Mode
set $laptop <eDP-1>
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable

exec_always ~/.config/sway/scripts/clamshell.sh
Loading

0 comments on commit 23cd7f2

Please sign in to comment.