desktop.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/sh
  2. # xdg-runtime-dir ayarı
  3. mkdir -p $XDG_RUNTIME_DIR
  4. chown $UID:$UID $XDG_RUNTIME_DIR
  5. chmod 700 $XDG_RUNTIME_DIR
  6. # varsayılan export değerleri
  7. export XKB_DEFAULT_LAYOUT=`initc keyboard`
  8. export GDK_BACKEND=wayland
  9. export MOZ_ENABLE_WAYLAND=1
  10. # waybar tray destek
  11. export XDG_CURRENT_DESKTOP=Unity
  12. # drm_kms_helper kontrolü
  13. #drmkms=`lsmod | grep drm_kms_helper | head -n1 | awk '{print $4}' | cut -d, -f1`
  14. #[ "${drmkms}" == "qxl" ] &&
  15. export WLR_RENDERER_ALLOW_SOFTWARE=1
  16. # fare imleci gözükmeme sorun tamiri
  17. [ -f /sys/class/dmi/id/board_name ] && [[ $(cat /sys/class/dmi/id/board_name) =~ VirtualBox|PAV10 ]] && export WLR_NO_HARDWARE_CURSORS=1
  18. mkdir -p ~/.config
  19. # tekli varsayılan ayarlar
  20. [ ! -f ~/.config/user-dirs.dirs ] && user-dirs.sh
  21. [ ! -f ~/.config/wayfire.ini ] && cp /etc/skel/.config/wayfire.ini ~/.config/
  22. #[ ! -f ~/.config/wf-shell.ini ] && cp /etc/skel/.config/wf-shell.ini ~/.config/
  23. [ ! -f ~/.bashrc ] && cp /etc/skel/.bashrc ~/
  24. [ -f /etc/skel/.config/mimeapps.list ] && [ ! -f ~/.config/mimeapps.list ] && cp /etc/skel/.config/mimeapps.list ~/.config/
  25. # dizinli varsayılan ayarlar
  26. for cdir in waybar nwg-launchers gtk-3.0 geany fnott lxterminal libfm
  27. do
  28. [ -d /etc/skel/.config/${cdir} ] && [ ! -d ~/.config/${cdir} ] && cp -rf /etc/skel/.config/${cdir} ~/.config/
  29. [ "$cdir" = "waybar" ] && waybar_fix.sh
  30. done
  31. # Çıkış menü yerel ayar
  32. lang=$(echo `initc locale.language`| cut -d_ -f1)
  33. [ ! -f ~/.config/nwg-launchers/nwgbar/bar.json ] &&
  34. [ -f /etc/skel/.config/nwg-launchers/nwgbar/bar-${lang}.json ] &&
  35. ln -s /etc/skel/.config/nwg-launchers/nwgbar/bar-${lang}.json ~/.config/nwg-launchers/nwgbar/bar.json
  36. # Milis uygulamaları desktop dosya kontrolü
  37. desktop_list="/usr/milis/ayarlar/uygulama/desktop.list"
  38. user_app_dir=".local/share/applications"
  39. if [ -f ${desktop_list} ];then
  40. for dosya in `cat ${desktop_list}`;do
  41. if [ -f $dosya ];then
  42. mkdir -p ~/${user_app_dir}
  43. cp -f $dosya ~/${user_app_dir}/
  44. fi
  45. bdosya=`basename $dosya`
  46. [ ! -f $dosya ] && [ -f ~/${user_app_dir}/${bdosya} ] && rm -f ~/${user_app_dir}/${bdosya}
  47. done
  48. fi