From 27903be231ab446c9589c202aa319a4bd1955095 Mon Sep 17 00:00:00 2001 From: Mostafa Qanbaryan Date: Sun, 3 Mar 2024 07:39:04 +0330 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Changed=20.scripts=20to=20.local/bi?= =?UTF-8?q?n=20for=20global=20execution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/packages/fonts.yml | 7 +++++-- ansible/packages/scripts.yml | 4 ++-- fish/config.fish | 2 ++ helix/config.toml | 10 +++++----- hypr/hyprland.conf | 4 ++-- scripts/{bing-wallpaper.sh => bing-wallpaper} | 2 +- scripts/{helix.sh => helix-commands} | 0 scripts/{lock.sh => lock} | 0 scripts/{powermenu.sh => powermenu} | 2 +- sway/config.d/keybindings.conf | 2 +- sway/config.d/output.conf | 2 +- 11 files changed, 20 insertions(+), 15 deletions(-) rename scripts/{bing-wallpaper.sh => bing-wallpaper} (94%) rename scripts/{helix.sh => helix-commands} (100%) rename scripts/{lock.sh => lock} (100%) rename scripts/{powermenu.sh => powermenu} (98%) diff --git a/ansible/packages/fonts.yml b/ansible/packages/fonts.yml index 01f3581..fecd2d1 100644 --- a/ansible/packages/fonts.yml +++ b/ansible/packages/fonts.yml @@ -3,8 +3,11 @@ connection: local tasks: - name: "Install vazir font" - ansible.builtin.command: - cmd: "echo https://github.com/rastikerdar/vazir-code-font/releases" + community.general.pacman: + executable: "yay" + name: + - "vazir-code-fonts" + state: "present" - name: "Install nerd fonts" ansible.builtin.command: diff --git a/ansible/packages/scripts.yml b/ansible/packages/scripts.yml index 8d7acc2..f57f2d5 100644 --- a/ansible/packages/scripts.yml +++ b/ansible/packages/scripts.yml @@ -5,7 +5,7 @@ - name: "Link scripts" ansible.builtin.file: src: "$PWD/../../scripts" - dest: "~/.scripts" + dest: "~/.local/bin" state: "link" force: true @@ -19,7 +19,7 @@ - name: "Enable lockscreen cron" ansible.builtin.cron: name: "bing-lockscreen" - job: "$HOME/.scripts/bing-wallpaper.sh" + job: "bing-wallpaper" minute: "0" - name: "Enable mirrorlist cron" diff --git a/fish/config.fish b/fish/config.fish index cefd9ca..4a53a62 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -81,6 +81,8 @@ set fish_cursor_visual underscore ## Rust set -Ua fish_user_paths $HOME/.cargo/bin +set -x PATH "$PATH:$HOME/.local/bin" + ## Default applications set -gx BROWSER google-chrome-stable set -gx EDITOR nvim diff --git a/helix/config.toml b/helix/config.toml index 3d38494..228e544 100644 --- a/helix/config.toml +++ b/helix/config.toml @@ -62,11 +62,11 @@ e = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before" "/" = ["search_selection", "global_search"] c = ":bc" o = "file_picker_in_current_buffer_directory" -g = ":sh ~/.scripts/helix.sh git $(~/.scripts/helix.sh getfileinfo)" -e = ":sh ~/.scripts/helix.sh explorer $(~/.scripts/helix.sh getfileinfo)" -B = ":sh ~/.scripts/helix.sh blame $(~/.scripts/helix.sh getfileinfo)" -r = ":pipe ~/.scripts/helix.sh getfileinfo" -x = ":sh ~/.scripts/helix.sh copy $(~/.scripts/helix.sh getfileinfo | awk \"{ print \\$1 }\")" +g = ":sh helix-commands git $(helix-commands getfileinfo)" +e = ":sh helix-commands explorer $(helix-commands getfileinfo)" +B = ":sh helix-commands blame $(helix-commands getfileinfo)" +r = ":pipe helix-commands getfileinfo" +x = ":sh helix-commands copy $(helix-commands getfileinfo | awk \"{ print \\$1 }\")" [keys.normal."'"] "." = "repeat_last_motion" diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 419f3a3..0314bab 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -77,7 +77,7 @@ bind = $mainMod, q, killactive, bind = $mainMod, M, exit, bind = $mainMod, V, togglefloating, bind = $mainMod, d, exec, rofi -show drun -theme $HOME/.config/rofi/launchers/type-5/style-2.rasi | xargs swaymsg exec -- -bind = $mainMod, escape, exec, $HOME/.scripts/powermenu.sh +bind = $mainMod, escape, exec, $HOME/.local/bin/powermenu bind = $mainMod, w, togglegroup, bind = $mainMod, f, fullscreen, 1 @@ -204,7 +204,7 @@ exec-once = blueman-applet exec-once = nm-applet --indicator exec-once = waypaper --restore --backend swww exec-once = swaync -exec-once = swayidle -w timeout 60 '$HOME/.scripts/lock.sh --grace 10 --fade-in 2' timeout 1200 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep '$HOME/.scripts/lock.sh' +exec-once = swayidle -w timeout 60 '$HOME/.local/bin/lock --grace 10 --fade-in 2' timeout 1200 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep '$HOME/.local/bin/lock' # trigger when the switch is turning on bindl=,switch:off:Lid Switch,exec,hyprctl keyword monitor "LVDS-1,1366x768,1920x0,auto" diff --git a/scripts/bing-wallpaper.sh b/scripts/bing-wallpaper similarity index 94% rename from scripts/bing-wallpaper.sh rename to scripts/bing-wallpaper index 1176a6a..e5c370a 100755 --- a/scripts/bing-wallpaper.sh +++ b/scripts/bing-wallpaper @@ -1,5 +1,5 @@ #!/bin/sh -# 0 */6 * * * sh ~/.scripts/bing-wallpaper.sh +# 0 */6 * * * sh bing-wallpaper # exit on error set -e diff --git a/scripts/helix.sh b/scripts/helix-commands similarity index 100% rename from scripts/helix.sh rename to scripts/helix-commands diff --git a/scripts/lock.sh b/scripts/lock similarity index 100% rename from scripts/lock.sh rename to scripts/lock diff --git a/scripts/powermenu.sh b/scripts/powermenu similarity index 98% rename from scripts/powermenu.sh rename to scripts/powermenu index 3181ccb..c668f6c 100755 --- a/scripts/powermenu.sh +++ b/scripts/powermenu @@ -93,7 +93,7 @@ case ${chosen} in run_cmd --hibernate ;; $lock) - ~/.scripts/lock.sh + $HOME/.local/bin/lock ;; $suspend) run_cmd --suspend diff --git a/sway/config.d/keybindings.conf b/sway/config.d/keybindings.conf index 8df41ba..cc33a2f 100755 --- a/sway/config.d/keybindings.conf +++ b/sway/config.d/keybindings.conf @@ -8,7 +8,7 @@ floating_modifier $mod normal # Shutdown set $wmexit swaymsg exit -set $lock $HOME/.config/sway/scripts/lock.sh +set $lock lock set $shutdown-menu System (l)lock, (e) exit, (s) suspend, (r) reboot, (End) shutdown set $clipboard-history cliphist list | rofi -dmenu -matching fuzzy -sort-method fzf -sort -theme "$HOME/.config/rofi/launchers/type-1/style-11.rasi" -p "Clipboard" | cliphist decode | wl-copy set $password-manager-ssh $HOME/dotfiles/bitwarden-rofi/bwmenu --folder-id=b028c1cb-2c6f-4e9b-888e-b071007964d2 --no-clear --auto-lock '-1' -- -matching fuzzy -sort-method fzf -sort -theme $HOME/.config/rofi/launchers/type-1/style-11.rasi diff --git a/sway/config.d/output.conf b/sway/config.d/output.conf index 957357b..8777000 100755 --- a/sway/config.d/output.conf +++ b/sway/config.d/output.conf @@ -14,7 +14,7 @@ bindswitch lid:off output LVDS-1 enable # resumed. It will also lock your screen before your computer goes to sleep. # exec swayidle -w \ - timeout 60 '$HOME/.config/sway/scripts/lock.sh --grace 10 --fade-in 2' \ + timeout 60 'lock --grace 10 --fade-in 2' \ timeout 1200 'swaymsg "output * dpms off"' \ resume 'swaymsg "output * dpms on"' \ before-sleep '$lock --grace 10 --fade-in 2'