add sublime build

This commit is contained in:
Aliberk Sandıkçı 2023-10-23 23:13:46 +03:00
parent a97a48aa74
commit 692e5fcd5d
Signed by: asandikci
GPG Key ID: 25C67A03B5666BC1
8 changed files with 35 additions and 13 deletions

View File

@ -12,7 +12,9 @@ wget -qO- https://raw.githubusercontent.com/asandikci/iflbot-setup/main/install.
- Install Apps: VSCodium, Sublime Text, Xournal++ - Install Apps: VSCodium, Sublime Text, Xournal++
- Dark Theme - Dark Theme
- Panel Settings: 28px - Panel Settings: 28px
- Auto Login for user - Auto Login to user account
- Ready to Use C/C++ Sublime Build Files
- Sublime Build Configs for both file/terminal execution
### Compatibility ### Compatibility
- Pardus 23.0 XFCE - Pardus 23.0 XFCE
@ -21,10 +23,6 @@ wget -qO- https://raw.githubusercontent.com/asandikci/iflbot-setup/main/install.
- GNU GPLv3+ - GNU GPLv3+
### TODO ### TODO
- [ ] Sublime Build Configs
---
- [ ] Disable annoying bell sound (in each restart) - [ ] Disable annoying bell sound (in each restart)
- Firefox - Firefox
- [ ] Firefox Change MainPage - [ ] Firefox Change MainPage

View File

@ -155,16 +155,16 @@ _prechecks() {
_log "MEB sertifikası indiriliyor..." verbose _log "MEB sertifikası indiriliyor..." verbose
timeout 10 wget -qO "$temp_file" "http://sertifika.meb.gov.tr/MEB_SERTIFIKASI.cer" || (_log "Sertifikayı yüklemeye çalışırken bir hata oluştu" fatal) timeout 10 wget -qO "$temp_file" "http://sertifika.meb.gov.tr/MEB_SERTIFIKASI.cer" || (_log "Sertifikayı yüklemeye çalışırken bir hata oluştu" fatal)
echo ".cer uzantılı sertifika dosyası .crt uzantılı sertifika dosyasına dönüştürülüyor..." verbose _log ".cer uzantılı sertifika dosyası .crt uzantılı sertifika dosyasına dönüştürülüyor..." verbose
openssl x509 -inform DER -in "$temp_file" -out "$temp_file" openssl x509 -inform DER -in "$temp_file" -out "$temp_file"
echo "Sertifika /usr/local/share/ca-certificates/ dizinine taşınıyor" verbose _log "Sertifika /usr/local/share/ca-certificates/ dizinine taşınıyor" verbose
sudo mv "$temp_file" "/usr/local/share/ca-certificates/MEB_SERTIFIKASI.crt" sudo mv "$temp_file" "/usr/local/share/ca-certificates/MEB_SERTIFIKASI.crt"
echo "Sertifika dosyasına gerekli izinler veriliyor" verbose _log "Sertifika dosyasına gerekli izinler veriliyor" verbose
sudo chmod 644 /usr/local/share/ca-certificates/MEB_SERTIFIKASI.crt sudo chmod 644 /usr/local/share/ca-certificates/MEB_SERTIFIKASI.crt
echo "Sertifikalar yenileniyor..." verbose _log "Sertifikalar yenileniyor..." verbose
sudo update-ca-certificates sudo update-ca-certificates
_log "MEB Sertifikası başarılı bir şekilde kuruldu, Tarayıcılara manuel olarak eklemeniz gerekebilir" "done" _log "MEB Sertifikası başarılı bir şekilde kuruldu, Tarayıcılara manuel olarak eklemeniz gerekebilir" "done"
@ -199,7 +199,7 @@ _install() {
_log "Sistemi ayarlamak için ilgili yapılandırmaları yapmak istiyor musunuz?" _log "Sistemi ayarlamak için ilgili yapılandırmaları yapmak istiyor musunuz?"
if _checkanswer -eq 1; then if _checkanswer -eq 1; then
_log "Kullanıcı Yapılandırmaları (sudo gerektirmeyen) Uygulanıyor..." verbose _log "Kullanıcı Yapılandırmaları (sudo gerektirmeyen) Uygulanıyor..." verbose
bash "$src_dir/user-config.sh" bash "$src_dir/user-config.sh" "$src_dir"
_log "Kullanıcı Yapılandırmaları (sudo gerektirmeyen) Uygulandı..." info _log "Kullanıcı Yapılandırmaları (sudo gerektirmeyen) Uygulandı..." info
sleep 1 sleep 1

0
src/example/in.txt Normal file
View File

5
src/example/main.c Normal file
View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main(){
printf("Hello World!");
}

0
src/example/out.txt Normal file
View File

View File

@ -5,6 +5,6 @@
# Auto Login # Auto Login
AUTO_LOGIN_FILE=/usr/share/lightdm/lightdm.conf.d/99-pardus-lightdm-greeter-autologin.conf AUTO_LOGIN_FILE=/usr/share/lightdm/lightdm.conf.d/99-pardus-lightdm-greeter-autologin.conf
sudo mv "$1/confi/lightdm-autologin" $AUTO_LOGIN_FILE sudo mv "$1/config/lightdm-autologin" $AUTO_LOGIN_FILE
user=$([ -n "$SUDO_USER" ] && echo "$SUDO_USER" || echo "$USER") user=$([ -n "$SUDO_USER" ] && echo "$SUDO_USER" || echo "$USER")
sudo sed -i -e "s/autologin-user=.*/autologin-user=${user}/" $AUTO_LOGIN_FILE sudo sed -i -e "s/autologin-user=.*/autologin-user=${user}/" $AUTO_LOGIN_FILE

View File

@ -0,0 +1,15 @@
{
"shell_cmd": "gcc -fsanitize=address -fsanitize=undefined -Wall -Wshadow \"${file}\" -o \"${file_path}/${file_base_name}\" && echo Complied && time timeout 5 \"${file_path}/${file_base_name}\" <in.txt >out.txt || echo -e \"!!! Kodun çalışma Süresi 5 Saniyeyi Aştı !!!\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c",
"variants":
[
{
"name": "Run in Terminal",
"linux": {
"shell_cmd": "gcc -fsanitize=address -fsanitize=undefined -Wall -Wshadow \"${file}\" -o \"${file_path}/${file_base_name}\" && echo Complied && time xfce4-terminal -e \"bash -c '\"${file_path}/${file_base_name}\" && echo && echo Press ENTER to continue && read line && exit'\""
},
},
]
}

View File

@ -11,6 +11,10 @@ xfconf-query -c "xsettings" -p "/Net/IconThemeName" -s "pardus-xfce-dark" --type
# Panel Size # Panel Size
xfconf-query --channel 'xfce4-panel' --property '/panels/panel-1/size' --type int --set 28 --create xfconf-query --channel 'xfce4-panel' --property '/panels/panel-1/size' --type int --set 28 --create
### SUBLIME BUILDS
user=$([ -n "$SUDO_USER" ] && echo "$SUDO_USER" || echo "$USER")
SUBLIME_CONFIG_FILE="/home/${user}/.config/sublime-text/Packages/User/"
sudo cp "$1/sublime/gcc.sublime-build" "$SUBLIME_CONFIG_FILE"
### Desktop Files
### SUBLIME BUILDS mv "$1/example/" "/home/${user}/Masaüstü/'C Kodları'/"