Skip to content

Commit

Permalink
Revision n1
Browse files Browse the repository at this point in the history
  • Loading branch information
zakariakov committed Dec 1, 2018
1 parent b8185bb commit 46a7a38
Show file tree
Hide file tree
Showing 44 changed files with 35 additions and 15 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified PKGBUILD
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified _config.yml
100644 → 100755
Empty file.
Empty file modified elokab-terminal/icons/application-exit.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions elokab-terminal/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ void helpMe()
puts(" -b, --hide-border FramelessWindow no border\n");
puts(" -t, --on-top On top hint\n");
puts(" -g, --geometry <left,top,width,height> Run in specific dimensions ex: 0,0,800,600 \n");
puts(" -o, --opacity <int> Window opacity 0 to 100 \n");

}


Expand Down Expand Up @@ -71,7 +73,7 @@ int main(int argc, char *argv[])
bool framless=false;
bool ontop=false;
QStringList args = a.arguments();

int opacity=-1;
if(args.count()>1)
{

Expand Down Expand Up @@ -102,6 +104,12 @@ int main(int argc, char *argv[])

else if (arg == "-t" || arg == "--on-top" ) {ontop=true;}

else if (arg == "-o" || arg == "--opacity" ) {
if(i+1>args.count()-1){helpMe();return 0;}
opacity=args.at(i+1).toInt();

}


// qWarning() << "echo Unknown option: " << args; helpMe(); return 0;
// command= "echo \"Unknown option: " + arg+"\n"+ help+"\"";
Expand Down Expand Up @@ -129,9 +137,10 @@ int main(int argc, char *argv[])
<<"\n Workdir: "<<workdir
<<"\n Command: "<<command
<<"\n Framless:"<<framless
<<"\n Geometry:"<<geometry;
<<"\n Geometry:"<<geometry
<<"\n Opacity:"<<opacity;

MainWindow w(workdir,command,framless,geometry,ontop);
MainWindow w(workdir,command,framless,geometry,ontop,opacity);


w.show();
Expand Down
24 changes: 17 additions & 7 deletions elokab-terminal/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MainWindow::MainWindow(const QString &wDir,
const QString &command,
bool framless,
const QString &geometry,
bool ontop,
bool ontop,int opacity,
QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
Expand Down Expand Up @@ -44,9 +44,11 @@ MainWindow::MainWindow(const QString &wDir,
int _h=QString(list.at(3)).toInt();
qDebug()<<"MainWindow Geometry:"<<_x<<_y<<_w<<_h;
setGeometry(_x,_y,_w,_h);
mSaveGeometry=false;
}else{
QSettings setting;
restoreGeometry(setting.value("Geometry").toByteArray());
mSaveGeometry=true;
}


Expand All @@ -58,14 +60,16 @@ MainWindow::MainWindow(const QString &wDir,
connect(ui->tabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(closeTab(int)));
connect(ui->tabWidget,SIGNAL(currentChanged(int)),this,SLOT(tabChanged(int)));
clipboardChanged();
addNewTab(wDir,command);
addNewTab(wDir,command,opacity);

}

MainWindow::~MainWindow()
{
QSettings setting;
setting.setValue("Geometry",saveGeometry());
if(mSaveGeometry){
QSettings setting;
setting.setValue("Geometry",saveGeometry());
}

delete ui;
}
Expand Down Expand Up @@ -223,7 +227,7 @@ void MainWindow::customContextMenu(QPoint)
mMenu->exec(QCursor::pos());
}

void MainWindow::addNewTab(const QString &wDir, const QString &command)
void MainWindow::addNewTab(const QString &wDir, const QString &command,int opacity)
{


Expand All @@ -245,7 +249,12 @@ void MainWindow::addNewTab(const QString &wDir, const QString &command)
// font=QApplication::font().family();
// }
int spos=setting.value("ScrollBar",0).toInt();
int opacity=setting.value("Opacity",100).toInt();
qDebug()<<"opacity"<<opacity;

if(opacity==-1)
opacity=setting.value("Opacity",100).toInt();


QString shell=setting.value("Shell",QString()).toString();
int cursorShape=setting.value("CursorShape",0).toInt();

Expand Down Expand Up @@ -307,12 +316,13 @@ QTermWidget *MainWindow::termWidget()
QTermWidget *w= qobject_cast<QTermWidget *>( ui->tabWidget->currentWidget());
if(w)
return w;
return 0;
return nullptr;

}

void MainWindow::closeTab(int index)
{
Q_UNUSED(index);
QSettings setting;
bool checked= setting.value("CloseMsg",true).toBool();
if(checked){
Expand Down
7 changes: 4 additions & 3 deletions elokab-terminal/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class MainWindow : public QMainWindow
bool framless=false,
const QString &geometry=QString(),
bool ontop=false,
QWidget *parent = 0);
int opacity=-1,
QWidget *parent = nullptr);
~MainWindow();
void closeEvent(QCloseEvent *event);
signals:
Expand All @@ -38,7 +39,7 @@ private slots:

void customContextMenu(QPoint);
void addNewTab(const QString &wDir=QDir::homePath(),
const QString &command=QString());
const QString &command=QString(), int opacity=-1);

void changeTitle(const QString &txt);

Expand Down Expand Up @@ -68,7 +69,7 @@ private slots:
QAction *mActQuit;

QMenu *mMenu;

bool mSaveGeometry=true;

};

Expand Down
4 changes: 2 additions & 2 deletions elokab-terminal/settingdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
Expand Down Expand Up @@ -195,7 +195,7 @@
<item>
<widget class="QSlider" name="horizontalSlider">
<property name="minimum">
<number>10</number>
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
Expand Down
Empty file modified usr/share/elokab/color-shemes/Baskerville - Count Von Count.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/Baskerville - Eldorado dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/DOOMICIDE darkocean.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/Gslob nature-suede.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/Gutterslob lightwhite.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/Visiblue.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/ashes.dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/ashes.light.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/belge.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/gotham.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/greenscreen.dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/hybrid.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/marrakesh.dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/material.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/mocha.dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/move.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/navy-and-ivory.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/neon.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/ocean.dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/ocean.light.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random2.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random3.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random4.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random5.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random6.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random7.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random8.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/random9-verdi.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/rezza.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/solarized.dark.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/solarized.light.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/sweetlove.txt
100644 → 100755
Empty file.
Empty file modified usr/share/elokab/color-shemes/user 77 - Mashup colors.txt
100644 → 100755
Empty file.

0 comments on commit 46a7a38

Please sign in to comment.