From 384540cebf1404bc6cb5130d2d5f2770d821f294 Mon Sep 17 00:00:00 2001 From: Yigit Colakoglu Date: Sat, 3 Apr 2021 16:20:51 +0300 Subject: [PATCH] install script updated, some bugs fixed --- arch-setup/chroot.sh | 13 ++++++++++++- config/.gitignore | 1 - config/mpd/.gitignore | 1 + config/mpd/mpd.conf | 3 ++- config/ncmpcpp/bindings | 23 +++++++---------------- config/ncmpcpp/config | 2 ++ install.sh | 6 ++++-- local/bin/nextcloud-sync | 1 + profile | 2 +- 9 files changed, 30 insertions(+), 22 deletions(-) diff --git a/arch-setup/chroot.sh b/arch-setup/chroot.sh index a6a0f797..208c6f3f 100755 --- a/arch-setup/chroot.sh +++ b/arch-setup/chroot.sh @@ -51,6 +51,17 @@ if [ ! -f "/tmp/.blackarch" ]; then pacman -Syy touch /tmp/.blackarch + echo -n "Are you going to use a flexo server?(y/N): " + read flexo + + while [ "$flex" = "y" ]; do + echo -n "Please enter ip address of flexo server: " + read flexo_ip + echo "\nServer = http://$flexo_ip:7878/\$repo/os/\$arch\n" >> /etc/pacman.d/mirrorlist + done + + pacman -Syy + echo -n "Did any errors occur?(y/N): " read errors @@ -184,9 +195,9 @@ EOF fi mkdir -p /etc/sudoers.d -echo "$username $hostname =NOPASSWD: /usr/bin/systemctl poweroff,/usr/bin/systemctl halt,/usr/bin/systemctl reboot,/usr/bin/systemctl hibernate" > /etc/sudoers.d/wheel echo "Defaults env_reset,pwfeedback" >> /etc/sudoers.d/wheel echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopwd +echo "$username $hostname =NOPASSWD: /usr/bin/systemctl poweroff,/usr/bin/systemctl halt,/usr/bin/systemctl reboot,/usr/bin/systemctl hibernate,/bin/pacman -Syyuw --noconfirm" > /etc/sudoers.d/wheel sudo -u $username bash -c "git clone https://aur.archlinux.org/yay.git /tmp/yay" diff --git a/config/.gitignore b/config/.gitignore index daf71224..e31c826d 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -27,7 +27,6 @@ !mimeapps.list !mimeapps.list/** !mpd -!mpd/** !mpv !mpv/** !nvim diff --git a/config/mpd/.gitignore b/config/mpd/.gitignore index b4c4cfb8..663a2a99 100644 --- a/config/mpd/.gitignore +++ b/config/mpd/.gitignore @@ -1 +1,2 @@ +database playlists diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf index 68365c2d..a91a125d 100644 --- a/config/mpd/mpd.conf +++ b/config/mpd/mpd.conf @@ -1,5 +1,6 @@ -music_directory "~/Music" +music_directory "~/Music" playlist_directory "~/.config/mpd/playlists" +db_file "~/.config/mpd/database" auto_update "yes" bind_to_address "127.0.0.1" diff --git a/config/ncmpcpp/bindings b/config/ncmpcpp/bindings index 8865f2d2..847393af 100644 --- a/config/ncmpcpp/bindings +++ b/config/ncmpcpp/bindings @@ -67,8 +67,6 @@ #def_key "space" # toggle_visualization_type # -#def_key "delete" -# delete_playlist_items # #def_key "delete" # delete_browser_items @@ -239,8 +237,6 @@ #def_key "/" # find # -#def_key "/" -# find_item_forward # #def_key "?" # find @@ -388,30 +384,19 @@ # #def_key "q" # quit -# -# -#def_key "f" -# find -#def_key "f" -# find_item_forward def_key "j" scroll_down def_key "k" scroll_up +#push_characters "jjjjjjjjjjjjjjj" def_key "ctrl-u" page_up #push_characters "kkkkkkkkkkkkkkk" def_key "ctrl-d" page_down #push_characters "jjjjjjjjjjjjjjj" -def_key "u" - page_up -#push_characters "kkkkkkkkkkkkkkk" -def_key "d" - page_down -#push_characters "jjjjjjjjjjjjjjj" def_key "h" previous_column def_key "l" @@ -475,3 +460,9 @@ def_key "shift-up" def_key "shift-down" select_item scroll_down +def_key "d" + delete_playlist_items +def_key "/" + find_item_forward +def_key "space" + select_item diff --git a/config/ncmpcpp/config b/config/ncmpcpp/config index a3db764d..0934a054 100644 --- a/config/ncmpcpp/config +++ b/config/ncmpcpp/config @@ -87,4 +87,6 @@ display_bitrate = "yes" enable_window_title = "yes" empty_tag_marker = "" +mpd_crossfade_time=3 + execute_on_song_change="kill -63 $(pidof dwmblocks)" diff --git a/install.sh b/install.sh index be5254a8..e83a2ca2 100755 --- a/install.sh +++ b/install.sh @@ -108,7 +108,8 @@ if [ ! -f "/var/spool/cron/$username" ]; then sudo chown $username:$username "/var/spool/cron/$username" sudo chmod 755 "/var/spool/cron/$username" echo "*/8 * * * * /home/$username/.local/bin/mailsync" > /var/spool/cron/$username - echo "*/15 * * * * /home/$username/.local/bin/scripts/nextcloud-sync" >> /var/spool/cron/$username + echo "*/15 * * * * /home/$username/.local/bin/nextcloud-sync" >> /var/spool/cron/$username + echo "* */1 * * * /home/$username/.local/bin/check-updates" >> /var/spool/cron/$username echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/$username echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/$username else @@ -117,7 +118,8 @@ else if [ ! "$cron" = "n" ]; then cp /var/spool/cron/$username ~/.dotfiles_backup/crontab echo "*/8 * * * * /home/$username/.local/bin/mailsync" > /var/spool/cron/$username - echo "*/15 * * * * /home/$username/.local/bin/scripts/nextcloud-sync" >> /var/spool/cron/$username + echo "*/15 * * * * /home/$username/.local/bin/nextcloud-sync" >> /var/spool/cron/$username + echo "* */1 * * * /home/$username/.local/bin/check-updates" >> /var/spool/cron/$username echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/$username echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/$username fi diff --git a/local/bin/nextcloud-sync b/local/bin/nextcloud-sync index 56a23615..0b1e2554 100755 --- a/local/bin/nextcloud-sync +++ b/local/bin/nextcloud-sync @@ -7,6 +7,7 @@ rm -rf /tmp/nextcloud.err for i in "${!mappings[@]}"; do echo "Syncing: $i" + mkdir -p "${mappings[$i]}" nextcloudcmd -h -u "$NEXTCLOUD_USERNAME" -p "$NEXTCLOUD_PASSWORD" \ "${mappings[$i]}" "$i" >> /tmp/nextcloud.out 2>> /tmp/nextcloud.err done diff --git a/profile b/profile index 80c34b08..d2b861a8 100755 --- a/profile +++ b/profile @@ -8,7 +8,7 @@ export SHELL=/bin/zsh export TERMINAL=/usr/local/bin/st export TMUX_PLUGIN_MANAGER_PATH=~/.tmux/plugins export BORG_KEYS_DIR=~/.keys/borg -export BROWSER="/home/yigit/.local/bin/brave-start" +export BROWSER=brave export EDITOR=nvim export OPENER=xdg-open export ANDROID_HOME=/home/yigit/Android