ciao
This commit is contained in:
parent
8f1d3cc383
commit
9b2bf745a7
13
.zshrc
13
.zshrc
@ -37,13 +37,8 @@ alias space="du -hsx * | sort -rh | head -10"
|
|||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
|
|
||||||
|
source /usr/share/nvm/init-nvm.sh
|
||||||
|
source "/home/user/.sdkman/bin/sdkman-init.sh"
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
export NVM_DIR="$HOME/.nvm"
|
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
||||||
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
||||||
|
|||||||
60
dns.md
Normal file
60
dns.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# How to Manually Manage Your DNS Configuration (`/etc/resolv.conf`)
|
||||||
|
|
||||||
|
## 1. Introduction
|
||||||
|
|
||||||
|
On a standard Linux system, the `/etc/resolv.conf` file is managed automatically by network services. However, if your system is overriding your preferred DNS settings, you may need to take manual control.
|
||||||
|
|
||||||
|
This guide explains how to "unlock" the file to make changes and "lock" it again to prevent the system from overwriting your manual configuration. The `chattr` command is used to change file attributes, specifically the **immutable** flag.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. The Workflow: Unlock, Edit, Lock
|
||||||
|
|
||||||
|
The process always follows these three steps:
|
||||||
|
|
||||||
|
1. **Unlock (Make Mutable):** Remove the immutable flag so you can write to the file.
|
||||||
|
2. **Edit:** Make your desired changes to the DNS servers.
|
||||||
|
3. **Lock (Make Immutable):** Set the immutable flag again to protect the file from being overwritten.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. The Commands
|
||||||
|
|
||||||
|
### Step 1: Unlock the File (Make it Editable)
|
||||||
|
|
||||||
|
To make changes to `/etc/resolv.conf`, you must first remove the immutable flag (`-i`).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chattr -i /etc/resolv.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2: Edit the File
|
||||||
|
|
||||||
|
Once the file is unlocked, you can edit it with any command-line text editor. Using `nano` is a common and straightforward choice.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nano /etc/resolv.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Inside the editor, add or change the `nameserver` lines to your desired DNS providers. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Primary DNS (Cloudflare)
|
||||||
|
nameserver 1.1.1.1
|
||||||
|
# Secondary DNS (Google)
|
||||||
|
nameserver 8.8.8.8
|
||||||
|
# Tertiary DNS (Quad9)
|
||||||
|
nameserver 9.9.9.9
|
||||||
|
```
|
||||||
|
|
||||||
|
Save the file and exit the editor. (In `nano`, you do this by pressing `Ctrl+X`, then `Y` to confirm, and `Enter` to save).
|
||||||
|
|
||||||
|
### Step 3: Lock the File (Make it Read-Only)
|
||||||
|
|
||||||
|
This is the most important step. To prevent the system from overwriting your changes, you must make the file immutable again by adding the immutable flag (`+i`).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chattr +i /etc/resolv.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Once this command is run, your DNS settings are saved and protected. The changes take effect immediately.
|
||||||
@ -33,3 +33,11 @@ vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper win
|
|||||||
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
||||||
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
||||||
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
||||||
|
|
||||||
|
-- DAP keymaps
|
||||||
|
vim.keymap.set("n", "<leader>db", "<cmd>lua require'dap'.toggle_breakpoint()<CR>", { desc = "Toggle [B]reakpoint" })
|
||||||
|
vim.keymap.set("n", "<leader>dc", "<cmd>lua require'dap'.continue()<CR>", { desc = "[C]ontinue" })
|
||||||
|
vim.keymap.set("n", "<leader>di", "<cmd>lua require'dap'.step_into()<CR>", { desc = "Step [I]nto" })
|
||||||
|
vim.keymap.set("n", "<leader>do", "<cmd>lua require'dap'.step_over()<CR>", { desc = "Step [O]ver" })
|
||||||
|
vim.keymap.set("n", "<leader>dO", "<cmd>lua require'dap'.step_out()<CR>", { desc = "Step [O]ut" })
|
||||||
|
vim.keymap.set("n", "<leader>dr", "<cmd>lua require'dap'.repl.open()<CR>", { desc = "Open [R]EPL" })
|
||||||
|
|||||||
@ -115,10 +115,11 @@ return {
|
|||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
texlab = {},
|
texlab = {},
|
||||||
-- clangd = {},
|
|
||||||
gopls = {},
|
|
||||||
jdtls = {},
|
jdtls = {},
|
||||||
-- nil_ls = {},
|
cssls = {},
|
||||||
|
astro = {},
|
||||||
|
tailwindcss = {},
|
||||||
|
pylsp = {},
|
||||||
ts_ls = {},
|
ts_ls = {},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
16
sway/config
16
sway/config
@ -241,12 +241,23 @@ client.focused $gruvbox_orange $gruvbox_orange $gruvbox_bg_dark $gruvbox_orange
|
|||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
|
|
||||||
### Impostazioni GTK per tema scuro
|
### Impostazioni GTK per tema scuro
|
||||||
|
set $qt_theme qt5ct
|
||||||
exec_always {
|
exec_always {
|
||||||
|
# Questi servono ancora per le app GTK4/Libadwaita native
|
||||||
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3-dark'
|
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3-dark'
|
||||||
gsettings set org.gnome.desktop.interface icon-theme 'Adwaita'
|
gsettings set org.gnome.desktop.interface icon-theme 'Adwaita'
|
||||||
gsettings set org.gnome.desktop.interface cursor-theme 'Adwaita'
|
|
||||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||||
|
|
||||||
|
# Forza il refresh delle variabili ambiente
|
||||||
|
systemctl --user import-environment QT_QPA_PLATFORMTHEME
|
||||||
}
|
}
|
||||||
|
# sudo pacman -S xorg-xhost
|
||||||
|
# xhost +SI:localuser:root
|
||||||
|
exec xhost +SI:localuser:root
|
||||||
|
|
||||||
|
# Aggiungi QT_QPA_PLATFORMTHEME alla lista delle variabili da importare
|
||||||
|
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME
|
||||||
|
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP SWAYSOCK QT_QPA_PLATFORMTHEME=$qt_theme
|
||||||
|
|
||||||
### Applicazioni in autostart
|
### Applicazioni in autostart
|
||||||
exec keepassxc
|
exec keepassxc
|
||||||
@ -263,7 +274,8 @@ exec --no-startup-id wluma
|
|||||||
# Avvio del polkit agent GNOME
|
# Avvio del polkit agent GNOME
|
||||||
# exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
# exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
# (Se preferisci il KDE agent, commenta la riga sopra e decommenta quella sottostante)
|
# (Se preferisci il KDE agent, commenta la riga sopra e decommenta quella sottostante)
|
||||||
exec "/usr/lib/polkit-kde-authentication-agent-1"
|
# exec "/usr/lib/polkit-kde-authentication-agent-1"
|
||||||
|
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
|
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
|
||||||
|
|
||||||
# Importa variabili ambiente per DBus e il desktop corrente
|
# Importa variabili ambiente per DBus e il desktop corrente
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user