diff --git a/.config/clipse/clipboard_history.json b/.config/clipse/clipboard_history.json index 9de6f03..d51f7ec 100644 --- a/.config/clipse/clipboard_history.json +++ b/.config/clipse/clipboard_history.json @@ -1 +1 @@ -{"clipboardHistory":[{"value":"brightnessctl s 5%+ # increase brightness","recorded":"2024-12-28 16:27:23.291490562","filePath":"null","pinned":false},{"value":" col.shadow = rgba(1a1a1aee)\n","recorded":"2024-12-28 16:25:15.793317595","filePath":"null","pinned":false},{"value":" shadow_render_power = 3\n","recorded":"2024-12-28 16:25:14.086345579","filePath":"null","pinned":false},{"value":" shadow_range = 4\n","recorded":"2024-12-28 16:25:13.019764251","filePath":"null","pinned":false},{"value":" drop_shadow = yes\n","recorded":"2024-12-28 16:25:09.606127998","filePath":"null","pinned":false},{"value":"git reset --hard HEAD\n","recorded":"2024-12-28 16:24:14.568075326","filePath":"null","pinned":false},{"value":".config/\n","recorded":"2024-12-28 16:20:52.188015473","filePath":"null","pinned":false},{"value":"supabase on server\n","recorded":"2024-12-28 16:11:14.215828599","filePath":"null","pinned":false},{"value":"https://chat.whatsapp.com/Llbqpi9VsQT5hZT3jY7stq","recorded":"2024-12-27 15:38:54.148938231","filePath":"null","pinned":false},{"value":")","recorded":"2024-12-27 14:58:43.605642468","filePath":"null","pinned":false},{"value":"binWidth","recorded":"2024-12-27 14:58:43.360606729","filePath":"null","pinned":false},{"value":"\"","recorded":"2024-12-27 14:57:49.061925533","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 14:57:36.673382640","filePath":"null","pinned":false},{"value":"\n","recorded":"2024-12-27 14:56:29.127813860","filePath":"null","pinned":false},{"value":" // Canvas canvas = new Canvas(600, 400);\n // drawNormalPDF(canvas);\n\n // root.getChildren().addAll(canvas);","recorded":"2024-12-27 14:56:27.839418306","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 14:56:25.576927458","filePath":"null","pinned":false},{"value":"private void drawNormalPDF(Canvas canvas) {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n // Parameters for Normal Distribution\n double mu = 300;\n double sigma = 60;\n double scale = 200; // Scaling factor for the canvas\n\n gc.beginPath();\n gc.moveTo(50, scale * normalPDF(50, mu, sigma) + 100); // Start the curve\n\n // Plot the normal distribution curve\n for (int x = 50; x \u003c 550; x++) {\n double y = scale * normalPDF(x, mu, sigma) + 100; // Calculate the PDF value\n gc.lineTo(x, y);\n }\n\n gc.stroke();\n }\n\n private double normalPDF(double x, double mu, double sigma) {\n return (1.0 / (sigma * Math.sqrt(2 * Math.PI))) * Math.exp(-Math.pow(x - mu, 2) / (2 * Math.pow(sigma, 2)));\n }","recorded":"2024-12-27 14:56:24.581225896","filePath":"null","pinned":false},{"value":" // histogram.getData().add(pdfSeries)","recorded":"2024-12-27 14:55:44.183694909","filePath":"null","pinned":false},{"value":"FIX /dev/sda3\n","recorded":"2024-12-27 14:53:53.547713155","filePath":"null","pinned":false},{"value":" System.out.println(binDivider.getNormalizationFactor());","recorded":"2024-12-27 14:53:27.495878642","filePath":"null","pinned":false},{"value":"stats.getStandardDeviation(); // Standard deviation (spread)","recorded":"2024-12-27 14:42:56.267473003","filePath":"null","pinned":false},{"value":"stats.getMean(); // Mean (center of the distribution)","recorded":"2024-12-27 14:42:53.278371981","filePath":"null","pinned":false},{"value":" // Normal distribution PDF function","recorded":"2024-12-27 14:42:49.299806554","filePath":"null","pinned":false},{"value":" // Formula for normal distribution","recorded":"2024-12-27 14:42:47.892992984","filePath":"null","pinned":false},{"value":"\n ","recorded":"2024-12-27 14:39:40.526541485","filePath":"null","pinned":false},{"value":"\n\n Canvas canvas = new Canvas();\n drawNormalPDF(canvas);\n\n root.getChildren().add(canvas);\n\n","recorded":"2024-12-27 14:39:37.641927861","filePath":"null","pinned":false},{"value":"private double normalPDF(double x, double mu, double sigma) {\n return (1.0 / (sigma * Math.sqrt(2 * Math.PI))) * Math.exp(-Math.pow(x - mu, 2) / (2 * Math.pow(sigma, 2)));\n }","recorded":"2024-12-27 14:39:33.081045946","filePath":"null","pinned":false},{"value":"private void drawNormalPDF(Canvas canvas) {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n // Parameters for Normal Distribution\n double mu = stats.getMean(); // Mean (center of the distribution)\n double sigma = stats.getStandardDeviation(); // Standard deviation (spread)\n double scale = 10; // Scaling factor for the canvas\n\n gc.beginPath();\n gc.moveTo(50, scale * normalPDF(50, mu, sigma) + 100); // Start the curve\n\n // Plot the normal distribution curve\n for (int x = 50; x \u003c 550; x++) {\n double y = scale * normalPDF(x, mu, sigma) + 100; // Calculate the PDF value\n gc.lineTo(x, y);\n }\n System.out.println(\"wow\");\n gc.stroke();\n }","recorded":"2024-12-27 14:39:31.048797303","filePath":"null","pinned":false},{"value":"60","recorded":"2024-12-27 14:34:38.773427842","filePath":"null","pinned":false},{"value":"300","recorded":"2024-12-27 14:34:33.327833111","filePath":"null","pinned":false},{"value":" private void drawNormalPDF(Canvas canvas) {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n // Parameters for Normal Distribution\n double mu = 300; // Mean (center of the distribution)\n double sigma = 60; // Standard deviation (spread)\n double scale = 200; // Scaling factor for the canvas\n\n gc.beginPath();\n gc.moveTo(50, scale * normalPDF(50, mu, sigma) + 100); // Start the curve\n\n // Plot the normal distribution curve\n for (int x = 50; x \u003c 550; x++) {\n double y = scale * normalPDF(x, mu, sigma) + 100; // Calculate the PDF value\n gc.lineTo(x, y);\n }\n\n gc.stroke();\n }\n\n // Normal distribution PDF function\n private double normalPDF(double x, double mu, double sigma) {\n // Formula for normal distribution\n return (1.0 / (sigma * Math.sqrt(2 * Math.PI))) * Math.exp(-Math.pow(x - mu, 2) / (2 * Math.pow(sigma, 2)));\n }","recorded":"2024-12-27 14:34:07.418926288","filePath":"null","pinned":false},{"value":" root.getChildren().add(histogram);","recorded":"2024-12-27 14:33:39.115754607","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 14:26:56.619664404","filePath":"null","pinned":false},{"value":"BarChart\u003cString, Number\u003e","recorded":"2024-12-27 14:26:55.706810155","filePath":"null","pinned":false},{"value":"BarChart\u003cString, Number\u003e histogram","recorded":"2024-12-27 14:26:40.230321262","filePath":"null","pinned":false},{"value":"\n\n // double mean = stats.getMean();\n // double stdDev = stats.getStandardDeviation();\n\n // int steps = 50; // number of points for smooth line\n // double minX = stats.getMin();\n // double maxX = stats.getMax();\n // double step = (maxX - minX) / steps;\n\n // for(int i = 0; i \u003c= steps; i++){\n // double xVal = minX + i * step;\n\n // double pdfVal = binDivider.getNormalizationFactor() * Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));\n // // Convert xVal to label format (just for demonstration):\n // String range = String.format(\"%f - %f\", stats.getMin() + i * binWidth, stats.getMin() + (i + 1) * binWidth);\n // pdfSeries.getData().add(new XYChart.Data\u003c\u003e(range, pdfVal));\n // }\n\n // histogram.lookupAll(\".chart-series-line\").forEach(node -\u003e {\n // node.setStyle(\"-fx-stroke: red; -fx-stroke-width: 2;\");\n // });","recorded":"2024-12-27 14:26:24.238495567","filePath":"null","pinned":false},{"value":"\n \n\n // XYChart.Series\u003cString, Number\u003e pdfSeries = new XYChart.Series\u003c\u003e();\n // pdfSeries.setName(\"PDF\");","recorded":"2024-12-27 14:26:14.289892618","filePath":"null","pinned":false},{"value":" histogram.getData().add(series);","recorded":"2024-12-27 14:23:01.020067208","filePath":"null","pinned":false},{"value":"CategoryAxis xAxis = new CategoryAxis();\n NumberAxis yAxis = new NumberAxis();\n\n BarChart\u003cString, Number\u003e histogram = new BarChart\u003c\u003e(xAxis, yAxis);\n histogram.setTitle(\"Histogram\");\n\n XYChart.Series\u003cString, Number\u003e series = new XYChart.Series\u003c\u003e();\n series.setName(\"Data Distribution\");","recorded":"2024-12-27 14:22:53.370982286","filePath":"null","pinned":false},{"value":"BinDivider binDivider = new BinDivider(data, numBins);\n binDivider.divideIntoBins();\n List\u003cDouble\u003e freq = binDivider.getAllNormalizedFrequencies();\n\n double binWidth = binDivider.getBinWidth();\n\n series.getData().clear();\n for(int i=0;i\u003cnumBins;i++){\n String range = String.format(\"%f - %f\", stats.getMin() + i * binWidth, stats.getMin() + (i + 1) * binWidth);\n series.getData().add(new XYChart.Data\u003c\u003e(range, freq.get(i)));\n }","recorded":"2024-12-27 14:22:37.086906149","filePath":"null","pinned":false},{"value":"c","recorded":"2024-12-27 14:22:05.283258524","filePath":"null","pinned":false},{"value":";","recorded":"2024-12-27 14:22:03.756849300","filePath":"null","pinned":false},{"value":"private","recorded":"2024-12-27 14:21:19.576707559","filePath":"null","pinned":false},{"value":"can i not add a line to the same chart","recorded":"2024-12-27 14:18:39.376571607","filePath":"null","pinned":false},{"value":"lineChart","recorded":"2024-12-27 14:17:25.985972762","filePath":"null","pinned":false},{"value":" lineChart.setStyle(\"-fx-background-color: transparent;\");","recorded":"2024-12-27 14:17:15.944675027","filePath":"null","pinned":false},{"value":"label","recorded":"2024-12-27 14:16:23.453209246","filePath":"null","pinned":false},{"value":" String range = String.format(\"%f - %f\", stats.getMin() + i * binWidth, stats.getMin() + (i + 1) * binWidth);","recorded":"2024-12-27 14:16:15.647956674","filePath":"null","pinned":false},{"value":"xVal","recorded":"2024-12-27 14:16:11.286085831","filePath":"null","pinned":false},{"value":"Number","recorded":"2024-12-27 14:16:06.172694374","filePath":"null","pinned":false},{"value":"xAxis2","recorded":"2024-12-27 14:15:51.012135797","filePath":"null","pinned":false},{"value":" NumberAxis xAxis2 = new NumberAxis();","recorded":"2024-12-27 14:15:46.758705422","filePath":"null","pinned":false},{"value":" root.getChildren().add(histogram);\n root.getChildren().add(pdfChart);","recorded":"2024-12-27 14:14:20.059824790","filePath":"null","pinned":false},{"value":" pdfChart.","recorded":"2024-12-27 14:14:15.345723706","filePath":"null","pinned":false},{"value":" histogram.lookupAll(\".chart-series-line\").forEach(node -\u003e {\n node.setStyle(\"-fx-stroke: red; -fx-stroke-width: 2;\");\n });","recorded":"2024-12-27 14:12:05.723170561","filePath":"null","pinned":false},{"value":"LineChart","recorded":"2024-12-27 14:11:59.316854801","filePath":"null","pinned":false},{"value":"histogram","recorded":"2024-12-27 14:11:52.923316922","filePath":"null","pinned":false},{"value":"e","recorded":"2024-12-27 14:11:02.290721537","filePath":"null","pinned":false},{"value":"String","recorded":"2024-12-27 14:10:58.807729386","filePath":"null","pinned":false},{"value":"range","recorded":"2024-12-27 14:10:53.819122795","filePath":"null","pinned":false},{"value":"histogram.lookupAll(\".chart-series-line\").forEach(node -\u003e {\n node.setStyle(\"-fx-stroke: red; -fx-stroke-width: 2;\");\n});","recorded":"2024-12-27 14:08:41.230500049","filePath":"null","pinned":false},{"value":"\"\",","recorded":"2024-12-27 14:07:15.993382895","filePath":"null","pinned":false},{"value":"import javafx.scene.chart.CategoryAxis;","recorded":"2024-12-27 14:02:59.368627318","filePath":"null","pinned":false},{"value":" double binStart = stats.getMin() + i * binWidth;\n double binEnd = stats.getMin() + (i + 1) * binWidth;\n double binCenter = (binStart + binEnd) / 2;","recorded":"2024-12-27 14:02:26.364516977","filePath":"null","pinned":false},{"value":"CategoryAxis","recorded":"2024-12-27 14:01:40.698055434","filePath":"null","pinned":false},{"value":" xAxis.setTickLabelGap(50);","recorded":"2024-12-27 14:01:38.091601451","filePath":"null","pinned":false},{"value":" // xAxis.setAutoRanging(false);","recorded":"2024-12-27 14:01:37.227924033","filePath":"null","pinned":false},{"value":" histogram.layout();","recorded":"2024-12-27 14:00:56.822583148","filePath":"null","pinned":false},{"value":" xAxis.getCategories().clear();","recorded":"2024-12-27 13:03:46.308340814","filePath":"null","pinned":false},{"value":" xAxis.getCategories().add(range);","recorded":"2024-12-27 13:03:44.544270540","filePath":"null","pinned":false},{"value":"selected","recorded":"2024-12-27 13:03:12.219922701","filePath":"null","pinned":false},{"value":" series.","recorded":"2024-12-27 13:02:54.881598562","filePath":"null","pinned":false},{"value":"setCategories();","recorded":"2024-12-27 13:02:35.420457160","filePath":"null","pinned":false},{"value":"bins = new ArrayList\u003cList\u003cDouble\u003e\u003e();\n for(int i = 0; i \u003c numBins; i++){\n bins.add(new ArrayList\u003cDouble\u003e());\n }","recorded":"2024-12-27 12:51:08.736820879","filePath":"null","pinned":false},{"value":"CategoryAxis xAxis = new CategoryAxis();\n NumberAxis yAxis = new NumberAxis();\n\n BarChart\u003cString, Number\u003e histogram = new BarChart\u003c\u003e(xAxis, yAxis);\n histogram.setTitle(\"Histogram\");\n\n XYChart.Series\u003cString, Number\u003e series = new XYChart.Series\u003c\u003e();\n series.setName(\"Data Distribution\");\n\n XYChart.Series\u003cNumber, Number\u003e pdfSeries = new XYChart.Series\u003c\u003e();\n pdfSeries.setName(\"PDF\");","recorded":"2024-12-27 12:48:59.968035078","filePath":"null","pinned":false},{"value":" CategoryAxis xAxis = new CategoryAxis();","recorded":"2024-12-27 12:46:47.139553978","filePath":"null","pinned":false},{"value":"how to do that\n\n","recorded":"2024-12-27 12:46:06.040119384","filePath":"null","pinned":false},{"value":"0","recorded":"2024-12-27 12:44:13.399522134","filePath":"null","pinned":false},{"value":"series","recorded":"2024-12-27 12:42:55.513581344","filePath":"null","pinned":false},{"value":"null","recorded":"2024-12-27 12:41:42.378255496","filePath":"null","pinned":false},{"value":" double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.exp(-0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:41:07.013966903","filePath":"null","pinned":false},{"value":"double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:41:01.069158067","filePath":"null","pinned":false},{"value":" Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:40:57.526960240","filePath":"null","pinned":false},{"value":" Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:40:52.468376185","filePath":"null","pinned":false},{"value":" String xLabel = String.format(\"%.2f\", xVal);","recorded":"2024-12-27 12:39:34.670927751","filePath":"null","pinned":false},{"value":"xLabel","recorded":"2024-12-27 12:39:32.407733398","filePath":"null","pinned":false},{"value":"double mean = stats.getMean();\n double stdDev = stats.getStandardDeviation();\n\n int steps = 50; // number of points for smooth line\n double minX = stats.getMin();\n double maxX = stats.getMax();\n double step = (maxX - minX) / steps;\n\n for(int i = 0; i \u003c= steps; i++){\n double xVal = minX + i * step;\n double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.exp(-0.5 * Math.pow((xVal - mean) / stdDev, 2));\n // Convert xVal to label format (just for demonstration):\n String xLabel = String.format(\"%.2f\", xVal);\n pdfSeries.getData().add(new XYChart.Data\u003c\u003e(xLabel, pdfVal));\n }","recorded":"2024-12-27 12:36:30.085180221","filePath":"null","pinned":false},{"value":"histogram.getData().add(pdfSeries);","recorded":"2024-12-27 12:35:38.067653093","filePath":"null","pinned":false},{"value":"double mean = stats.getMean();\ndouble stdDev = stats.getStandardDeviation();","recorded":"2024-12-27 12:35:17.319497249","filePath":"null","pinned":false},{"value":"int steps = 50; // number of points for smooth line\ndouble minX = stats.getMin();\ndouble maxX = stats.getMax();\ndouble step = (maxX - minX) / steps;\n\nfor(int i = 0; i \u003c= steps; i++){\n double xVal = minX + i * step;\n double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.exp(-0.5 * Math.pow((xVal - mean) / stdDev, 2));\n // Convert xVal to label format (just for demonstration):\n String xLabel = String.format(\"%.2f\", xVal);\n pdfSeries.getData().add(new XYChart.Data\u003c\u003e(xLabel, pdfVal));\n}","recorded":"2024-12-27 12:35:04.021237066","filePath":"null","pinned":false},{"value":"Fit and plot the histogram with a Probability Density Function model (PDF). ","recorded":"2024-12-27 12:31:50.341858120","filePath":"null","pinned":false},{"value":" histogram.getData().clear(); // Clear old data\n histogram.getData().add(series); // Add updated data","recorded":"2024-12-27 12:31:08.380714456","filePath":"null","pinned":false},{"value":"histogram.getData().clear(); // Clear old data\nhistogram.getData().add(series); // Add updated data\n","recorded":"2024-12-27 12:30:39.590183675","filePath":"null","pinned":false},{"value":"h","recorded":"2024-12-27 12:28:59.586361005","filePath":"null","pinned":false},{"value":" xAxis.setTickLabelGap(10);","recorded":"2024-12-27 12:28:08.560230106","filePath":"null","pinned":false},{"value":"s = new CategoryAxis();","recorded":"2024-12-27 12:27:36.578549228","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 12:26:18.936108254","filePath":"null","pinned":false},{"value":" // TODO Auto-generated catch block","recorded":"2024-12-27 12:26:16.053791223","filePath":"null","pinned":false},{"value":"try{\n }\n catch(IOException ex){\n ex.printStackTrace();\n }","recorded":"2024-12-27 12:26:01.487175750","filePath":"null","pinned":false},{"value":" ImageIO.write(SwingFXUtils.fromFXImage(snapshot, null), \"png\", img);","recorded":"2024-12-27 12:25:55.832238174","filePath":"null","pinned":false}]} \ No newline at end of file +{"clipboardHistory":[{"value":"namei -l /usr/share/sddm/themes/sddm-theme\nf: /usr/share/sddm/themes/sddm-theme\ndrwxr-xr-x root root /\ndrwxr-xr-x root root usr\ndrwxr-xr-x root root share\ndrwxr-xr-x root root sddm\ndrwxr-xr-x root root themes\nlrwxrwxrwx root root sddm-theme -\u003e /home/rafayahmad/dotfiles/sddm-theme\ndrwxr-xr-x root root /\ndrwxr-xr-x root root home\ndrwx------ rafayahmad rafayahmad rafayahmad\ndrwxr-xr-x rafayahmad rafayahmad dotfiles\ndrwxr-xr-x root root sddm-theme","recorded":"2025-01-01 08:08:31.346397399","filePath":"null","pinned":false},{"value":"\n","recorded":"2024-12-31 19:29:22.427352831","filePath":"null","pinned":false},{"value":"sddm conf\n","recorded":"2024-12-31 19:29:20.706940276","filePath":"null","pinned":false},{"value":"password manager maybe\n","recorded":"2024-12-31 19:28:53.078162601","filePath":"null","pinned":false},{"value":"exec-once = clipse -listen","recorded":"2024-12-31 18:43:49.415509532","filePath":"null","pinned":false},{"value":"windowrulev2 = float, class:(clipse)\n","recorded":"2024-12-31 18:43:45.925235143","filePath":"null","pinned":false},{"value":"brightnessctl s 5%+ # increase brightness","recorded":"2024-12-28 16:27:23.291490562","filePath":"null","pinned":false},{"value":" col.shadow = rgba(1a1a1aee)\n","recorded":"2024-12-28 16:25:15.793317595","filePath":"null","pinned":false},{"value":" shadow_render_power = 3\n","recorded":"2024-12-28 16:25:14.086345579","filePath":"null","pinned":false},{"value":" shadow_range = 4\n","recorded":"2024-12-28 16:25:13.019764251","filePath":"null","pinned":false},{"value":" drop_shadow = yes\n","recorded":"2024-12-28 16:25:09.606127998","filePath":"null","pinned":false},{"value":"git reset --hard HEAD\n","recorded":"2024-12-28 16:24:14.568075326","filePath":"null","pinned":false},{"value":".config/\n","recorded":"2024-12-28 16:20:52.188015473","filePath":"null","pinned":false},{"value":"supabase on server\n","recorded":"2024-12-28 16:11:14.215828599","filePath":"null","pinned":false},{"value":"https://chat.whatsapp.com/Llbqpi9VsQT5hZT3jY7stq","recorded":"2024-12-27 15:38:54.148938231","filePath":"null","pinned":false},{"value":")","recorded":"2024-12-27 14:58:43.605642468","filePath":"null","pinned":false},{"value":"binWidth","recorded":"2024-12-27 14:58:43.360606729","filePath":"null","pinned":false},{"value":"\"","recorded":"2024-12-27 14:57:49.061925533","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 14:57:36.673382640","filePath":"null","pinned":false},{"value":" // Canvas canvas = new Canvas(600, 400);\n // drawNormalPDF(canvas);\n\n // root.getChildren().addAll(canvas);","recorded":"2024-12-27 14:56:27.839418306","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 14:56:25.576927458","filePath":"null","pinned":false},{"value":"private void drawNormalPDF(Canvas canvas) {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n // Parameters for Normal Distribution\n double mu = 300;\n double sigma = 60;\n double scale = 200; // Scaling factor for the canvas\n\n gc.beginPath();\n gc.moveTo(50, scale * normalPDF(50, mu, sigma) + 100); // Start the curve\n\n // Plot the normal distribution curve\n for (int x = 50; x \u003c 550; x++) {\n double y = scale * normalPDF(x, mu, sigma) + 100; // Calculate the PDF value\n gc.lineTo(x, y);\n }\n\n gc.stroke();\n }\n\n private double normalPDF(double x, double mu, double sigma) {\n return (1.0 / (sigma * Math.sqrt(2 * Math.PI))) * Math.exp(-Math.pow(x - mu, 2) / (2 * Math.pow(sigma, 2)));\n }","recorded":"2024-12-27 14:56:24.581225896","filePath":"null","pinned":false},{"value":" // histogram.getData().add(pdfSeries)","recorded":"2024-12-27 14:55:44.183694909","filePath":"null","pinned":false},{"value":"FIX /dev/sda3\n","recorded":"2024-12-27 14:53:53.547713155","filePath":"null","pinned":false},{"value":" System.out.println(binDivider.getNormalizationFactor());","recorded":"2024-12-27 14:53:27.495878642","filePath":"null","pinned":false},{"value":"stats.getStandardDeviation(); // Standard deviation (spread)","recorded":"2024-12-27 14:42:56.267473003","filePath":"null","pinned":false},{"value":"stats.getMean(); // Mean (center of the distribution)","recorded":"2024-12-27 14:42:53.278371981","filePath":"null","pinned":false},{"value":" // Normal distribution PDF function","recorded":"2024-12-27 14:42:49.299806554","filePath":"null","pinned":false},{"value":" // Formula for normal distribution","recorded":"2024-12-27 14:42:47.892992984","filePath":"null","pinned":false},{"value":"\n ","recorded":"2024-12-27 14:39:40.526541485","filePath":"null","pinned":false},{"value":"\n\n Canvas canvas = new Canvas();\n drawNormalPDF(canvas);\n\n root.getChildren().add(canvas);\n\n","recorded":"2024-12-27 14:39:37.641927861","filePath":"null","pinned":false},{"value":"private double normalPDF(double x, double mu, double sigma) {\n return (1.0 / (sigma * Math.sqrt(2 * Math.PI))) * Math.exp(-Math.pow(x - mu, 2) / (2 * Math.pow(sigma, 2)));\n }","recorded":"2024-12-27 14:39:33.081045946","filePath":"null","pinned":false},{"value":"private void drawNormalPDF(Canvas canvas) {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n // Parameters for Normal Distribution\n double mu = stats.getMean(); // Mean (center of the distribution)\n double sigma = stats.getStandardDeviation(); // Standard deviation (spread)\n double scale = 10; // Scaling factor for the canvas\n\n gc.beginPath();\n gc.moveTo(50, scale * normalPDF(50, mu, sigma) + 100); // Start the curve\n\n // Plot the normal distribution curve\n for (int x = 50; x \u003c 550; x++) {\n double y = scale * normalPDF(x, mu, sigma) + 100; // Calculate the PDF value\n gc.lineTo(x, y);\n }\n System.out.println(\"wow\");\n gc.stroke();\n }","recorded":"2024-12-27 14:39:31.048797303","filePath":"null","pinned":false},{"value":"60","recorded":"2024-12-27 14:34:38.773427842","filePath":"null","pinned":false},{"value":"300","recorded":"2024-12-27 14:34:33.327833111","filePath":"null","pinned":false},{"value":" private void drawNormalPDF(Canvas canvas) {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n // Parameters for Normal Distribution\n double mu = 300; // Mean (center of the distribution)\n double sigma = 60; // Standard deviation (spread)\n double scale = 200; // Scaling factor for the canvas\n\n gc.beginPath();\n gc.moveTo(50, scale * normalPDF(50, mu, sigma) + 100); // Start the curve\n\n // Plot the normal distribution curve\n for (int x = 50; x \u003c 550; x++) {\n double y = scale * normalPDF(x, mu, sigma) + 100; // Calculate the PDF value\n gc.lineTo(x, y);\n }\n\n gc.stroke();\n }\n\n // Normal distribution PDF function\n private double normalPDF(double x, double mu, double sigma) {\n // Formula for normal distribution\n return (1.0 / (sigma * Math.sqrt(2 * Math.PI))) * Math.exp(-Math.pow(x - mu, 2) / (2 * Math.pow(sigma, 2)));\n }","recorded":"2024-12-27 14:34:07.418926288","filePath":"null","pinned":false},{"value":" root.getChildren().add(histogram);","recorded":"2024-12-27 14:33:39.115754607","filePath":"null","pinned":false},{"value":" ","recorded":"2024-12-27 14:26:56.619664404","filePath":"null","pinned":false},{"value":"BarChart\u003cString, Number\u003e","recorded":"2024-12-27 14:26:55.706810155","filePath":"null","pinned":false},{"value":"BarChart\u003cString, Number\u003e histogram","recorded":"2024-12-27 14:26:40.230321262","filePath":"null","pinned":false},{"value":"\n\n // double mean = stats.getMean();\n // double stdDev = stats.getStandardDeviation();\n\n // int steps = 50; // number of points for smooth line\n // double minX = stats.getMin();\n // double maxX = stats.getMax();\n // double step = (maxX - minX) / steps;\n\n // for(int i = 0; i \u003c= steps; i++){\n // double xVal = minX + i * step;\n\n // double pdfVal = binDivider.getNormalizationFactor() * Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));\n // // Convert xVal to label format (just for demonstration):\n // String range = String.format(\"%f - %f\", stats.getMin() + i * binWidth, stats.getMin() + (i + 1) * binWidth);\n // pdfSeries.getData().add(new XYChart.Data\u003c\u003e(range, pdfVal));\n // }\n\n // histogram.lookupAll(\".chart-series-line\").forEach(node -\u003e {\n // node.setStyle(\"-fx-stroke: red; -fx-stroke-width: 2;\");\n // });","recorded":"2024-12-27 14:26:24.238495567","filePath":"null","pinned":false},{"value":"\n \n\n // XYChart.Series\u003cString, Number\u003e pdfSeries = new XYChart.Series\u003c\u003e();\n // pdfSeries.setName(\"PDF\");","recorded":"2024-12-27 14:26:14.289892618","filePath":"null","pinned":false},{"value":" histogram.getData().add(series);","recorded":"2024-12-27 14:23:01.020067208","filePath":"null","pinned":false},{"value":"CategoryAxis xAxis = new CategoryAxis();\n NumberAxis yAxis = new NumberAxis();\n\n BarChart\u003cString, Number\u003e histogram = new BarChart\u003c\u003e(xAxis, yAxis);\n histogram.setTitle(\"Histogram\");\n\n XYChart.Series\u003cString, Number\u003e series = new XYChart.Series\u003c\u003e();\n series.setName(\"Data Distribution\");","recorded":"2024-12-27 14:22:53.370982286","filePath":"null","pinned":false},{"value":"BinDivider binDivider = new BinDivider(data, numBins);\n binDivider.divideIntoBins();\n List\u003cDouble\u003e freq = binDivider.getAllNormalizedFrequencies();\n\n double binWidth = binDivider.getBinWidth();\n\n series.getData().clear();\n for(int i=0;i\u003cnumBins;i++){\n String range = String.format(\"%f - %f\", stats.getMin() + i * binWidth, stats.getMin() + (i + 1) * binWidth);\n series.getData().add(new XYChart.Data\u003c\u003e(range, freq.get(i)));\n }","recorded":"2024-12-27 14:22:37.086906149","filePath":"null","pinned":false},{"value":"c","recorded":"2024-12-27 14:22:05.283258524","filePath":"null","pinned":false},{"value":";","recorded":"2024-12-27 14:22:03.756849300","filePath":"null","pinned":false},{"value":"private","recorded":"2024-12-27 14:21:19.576707559","filePath":"null","pinned":false},{"value":"can i not add a line to the same chart","recorded":"2024-12-27 14:18:39.376571607","filePath":"null","pinned":false},{"value":"lineChart","recorded":"2024-12-27 14:17:25.985972762","filePath":"null","pinned":false},{"value":" lineChart.setStyle(\"-fx-background-color: transparent;\");","recorded":"2024-12-27 14:17:15.944675027","filePath":"null","pinned":false},{"value":"label","recorded":"2024-12-27 14:16:23.453209246","filePath":"null","pinned":false},{"value":" String range = String.format(\"%f - %f\", stats.getMin() + i * binWidth, stats.getMin() + (i + 1) * binWidth);","recorded":"2024-12-27 14:16:15.647956674","filePath":"null","pinned":false},{"value":"xVal","recorded":"2024-12-27 14:16:11.286085831","filePath":"null","pinned":false},{"value":"Number","recorded":"2024-12-27 14:16:06.172694374","filePath":"null","pinned":false},{"value":"xAxis2","recorded":"2024-12-27 14:15:51.012135797","filePath":"null","pinned":false},{"value":" NumberAxis xAxis2 = new NumberAxis();","recorded":"2024-12-27 14:15:46.758705422","filePath":"null","pinned":false},{"value":" root.getChildren().add(histogram);\n root.getChildren().add(pdfChart);","recorded":"2024-12-27 14:14:20.059824790","filePath":"null","pinned":false},{"value":" pdfChart.","recorded":"2024-12-27 14:14:15.345723706","filePath":"null","pinned":false},{"value":" histogram.lookupAll(\".chart-series-line\").forEach(node -\u003e {\n node.setStyle(\"-fx-stroke: red; -fx-stroke-width: 2;\");\n });","recorded":"2024-12-27 14:12:05.723170561","filePath":"null","pinned":false},{"value":"LineChart","recorded":"2024-12-27 14:11:59.316854801","filePath":"null","pinned":false},{"value":"histogram","recorded":"2024-12-27 14:11:52.923316922","filePath":"null","pinned":false},{"value":"e","recorded":"2024-12-27 14:11:02.290721537","filePath":"null","pinned":false},{"value":"String","recorded":"2024-12-27 14:10:58.807729386","filePath":"null","pinned":false},{"value":"range","recorded":"2024-12-27 14:10:53.819122795","filePath":"null","pinned":false},{"value":"histogram.lookupAll(\".chart-series-line\").forEach(node -\u003e {\n node.setStyle(\"-fx-stroke: red; -fx-stroke-width: 2;\");\n});","recorded":"2024-12-27 14:08:41.230500049","filePath":"null","pinned":false},{"value":"\"\",","recorded":"2024-12-27 14:07:15.993382895","filePath":"null","pinned":false},{"value":"import javafx.scene.chart.CategoryAxis;","recorded":"2024-12-27 14:02:59.368627318","filePath":"null","pinned":false},{"value":" double binStart = stats.getMin() + i * binWidth;\n double binEnd = stats.getMin() + (i + 1) * binWidth;\n double binCenter = (binStart + binEnd) / 2;","recorded":"2024-12-27 14:02:26.364516977","filePath":"null","pinned":false},{"value":"CategoryAxis","recorded":"2024-12-27 14:01:40.698055434","filePath":"null","pinned":false},{"value":" xAxis.setTickLabelGap(50);","recorded":"2024-12-27 14:01:38.091601451","filePath":"null","pinned":false},{"value":" // xAxis.setAutoRanging(false);","recorded":"2024-12-27 14:01:37.227924033","filePath":"null","pinned":false},{"value":" histogram.layout();","recorded":"2024-12-27 14:00:56.822583148","filePath":"null","pinned":false},{"value":" xAxis.getCategories().clear();","recorded":"2024-12-27 13:03:46.308340814","filePath":"null","pinned":false},{"value":" xAxis.getCategories().add(range);","recorded":"2024-12-27 13:03:44.544270540","filePath":"null","pinned":false},{"value":"selected","recorded":"2024-12-27 13:03:12.219922701","filePath":"null","pinned":false},{"value":" series.","recorded":"2024-12-27 13:02:54.881598562","filePath":"null","pinned":false},{"value":"setCategories();","recorded":"2024-12-27 13:02:35.420457160","filePath":"null","pinned":false},{"value":"bins = new ArrayList\u003cList\u003cDouble\u003e\u003e();\n for(int i = 0; i \u003c numBins; i++){\n bins.add(new ArrayList\u003cDouble\u003e());\n }","recorded":"2024-12-27 12:51:08.736820879","filePath":"null","pinned":false},{"value":"CategoryAxis xAxis = new CategoryAxis();\n NumberAxis yAxis = new NumberAxis();\n\n BarChart\u003cString, Number\u003e histogram = new BarChart\u003c\u003e(xAxis, yAxis);\n histogram.setTitle(\"Histogram\");\n\n XYChart.Series\u003cString, Number\u003e series = new XYChart.Series\u003c\u003e();\n series.setName(\"Data Distribution\");\n\n XYChart.Series\u003cNumber, Number\u003e pdfSeries = new XYChart.Series\u003c\u003e();\n pdfSeries.setName(\"PDF\");","recorded":"2024-12-27 12:48:59.968035078","filePath":"null","pinned":false},{"value":" CategoryAxis xAxis = new CategoryAxis();","recorded":"2024-12-27 12:46:47.139553978","filePath":"null","pinned":false},{"value":"how to do that\n\n","recorded":"2024-12-27 12:46:06.040119384","filePath":"null","pinned":false},{"value":"0","recorded":"2024-12-27 12:44:13.399522134","filePath":"null","pinned":false},{"value":"series","recorded":"2024-12-27 12:42:55.513581344","filePath":"null","pinned":false},{"value":"null","recorded":"2024-12-27 12:41:42.378255496","filePath":"null","pinned":false},{"value":" double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.exp(-0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:41:07.013966903","filePath":"null","pinned":false},{"value":"double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:41:01.069158067","filePath":"null","pinned":false},{"value":" Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:40:57.526960240","filePath":"null","pinned":false},{"value":" Math.pow(Math.E, -0.5 * Math.pow((xVal - mean) / stdDev, 2));","recorded":"2024-12-27 12:40:52.468376185","filePath":"null","pinned":false},{"value":" String xLabel = String.format(\"%.2f\", xVal);","recorded":"2024-12-27 12:39:34.670927751","filePath":"null","pinned":false},{"value":"xLabel","recorded":"2024-12-27 12:39:32.407733398","filePath":"null","pinned":false},{"value":"double mean = stats.getMean();\n double stdDev = stats.getStandardDeviation();\n\n int steps = 50; // number of points for smooth line\n double minX = stats.getMin();\n double maxX = stats.getMax();\n double step = (maxX - minX) / steps;\n\n for(int i = 0; i \u003c= steps; i++){\n double xVal = minX + i * step;\n double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.exp(-0.5 * Math.pow((xVal - mean) / stdDev, 2));\n // Convert xVal to label format (just for demonstration):\n String xLabel = String.format(\"%.2f\", xVal);\n pdfSeries.getData().add(new XYChart.Data\u003c\u003e(xLabel, pdfVal));\n }","recorded":"2024-12-27 12:36:30.085180221","filePath":"null","pinned":false},{"value":"histogram.getData().add(pdfSeries);","recorded":"2024-12-27 12:35:38.067653093","filePath":"null","pinned":false},{"value":"double mean = stats.getMean();\ndouble stdDev = stats.getStandardDeviation();","recorded":"2024-12-27 12:35:17.319497249","filePath":"null","pinned":false},{"value":"int steps = 50; // number of points for smooth line\ndouble minX = stats.getMin();\ndouble maxX = stats.getMax();\ndouble step = (maxX - minX) / steps;\n\nfor(int i = 0; i \u003c= steps; i++){\n double xVal = minX + i * step;\n double pdfVal = (1 / (stdDev * Math.sqrt(2 * Math.PI))) *\n Math.exp(-0.5 * Math.pow((xVal - mean) / stdDev, 2));\n // Convert xVal to label format (just for demonstration):\n String xLabel = String.format(\"%.2f\", xVal);\n pdfSeries.getData().add(new XYChart.Data\u003c\u003e(xLabel, pdfVal));\n}","recorded":"2024-12-27 12:35:04.021237066","filePath":"null","pinned":false},{"value":"Fit and plot the histogram with a Probability Density Function model (PDF). ","recorded":"2024-12-27 12:31:50.341858120","filePath":"null","pinned":false},{"value":" histogram.getData().clear(); // Clear old data\n histogram.getData().add(series); // Add updated data","recorded":"2024-12-27 12:31:08.380714456","filePath":"null","pinned":false},{"value":"histogram.getData().clear(); // Clear old data\nhistogram.getData().add(series); // Add updated data\n","recorded":"2024-12-27 12:30:39.590183675","filePath":"null","pinned":false},{"value":"h","recorded":"2024-12-27 12:28:59.586361005","filePath":"null","pinned":false},{"value":" xAxis.setTickLabelGap(10);","recorded":"2024-12-27 12:28:08.560230106","filePath":"null","pinned":false}]} \ No newline at end of file diff --git a/.config/dconf/user b/.config/dconf/user index 8766839..c3b3469 100644 Binary files a/.config/dconf/user and b/.config/dconf/user differ diff --git a/.config/hypr/hyprbinds.conf b/.config/hypr/hyprbinds.conf index b408821..1da32e2 100644 --- a/.config/hypr/hyprbinds.conf +++ b/.config/hypr/hyprbinds.conf @@ -61,6 +61,9 @@ bind = $mainMod CTRL, R, exec, killall waybar bind = , Print, exec, grim -g "$(slurp)" bind = $mainMod, Print, exec, grim +# Clipboard +bind = SUPER SHIFT, V, exec, kitty --class clipse -e clipse + # Color Picker bind = ALT, P, exec, hyprpicker --format=hex -a diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 66c1aed..0a371e8 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -14,6 +14,7 @@ monitor=HDMI-A-1,1920x1080@60,0x0,1,mirror,eDP-1 # Execute your favorite apps at launch exec-once = hypridle exec-once = waybar +exec-once = clipse -listen exec-once = hyprpaper && ~/dotfiles/scripts/currentWallpaperHyprlock.sh exec-once = /home/rafayahmad/dotfiles/scripts/brightnessWidget.sh exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 @@ -134,3 +135,4 @@ misc { windowrule = float, title:nmtui windowrule = float, title:UltimMC windowrule = float, title:rofi +windowrulev2 = float, class:(clipse) diff --git a/sddm-theme/AUTHORS b/sddm-theme/AUTHORS new file mode 100644 index 0000000..7939829 --- /dev/null +++ b/sddm-theme/AUTHORS @@ -0,0 +1,10 @@ +AUTHOR(S) + +Based on the original work by: +Thayer Williams +thayerw@gmail.com +http://cinderwick.ca/ + +Ported to SDDM by: +Guidobelix +guidobelix@hotmail.it \ No newline at end of file diff --git a/sddm-theme/COPYING b/sddm-theme/COPYING new file mode 100644 index 0000000..2c7e868 --- /dev/null +++ b/sddm-theme/COPYING @@ -0,0 +1,380 @@ + +Creative Commons Legal Code - Attribution-ShareAlike 3.0 + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY +BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. + +1. Definitions + + 1. "Adaptation" means a work based upon the Work, or upon the Work + and other pre-existing works, such as a translation, adaptation, + derivative work, arrangement of music or other alterations of a + literary or artistic work, or phonogram or performance and includes + cinematographic adaptations or any other form in which the Work may + be recast, transformed, or adapted including in any form recognizably + derived from the original, except that a work that constitutes a + Collection will not be considered an Adaptation for the purpose of + this License. For the avoidance of doubt, where the Work is a musical + work, performance or phonogram, the synchronization of the Work in + timed-relation with a moving image ("synching") will be considered an + Adaptation for the purpose of this License. + + 2. "Collection" means a collection of literary or artistic works, + such as encyclopedias and anthologies, or performances, phonograms or + broadcasts, or other works or subject matter other than works listed + in Section 1(f) below, which, by reason of the selection and + arrangement of their contents, constitute intellectual creations, in + which the Work is included in its entirety in unmodified form along + with one or more other contributions, each constituting separate and + independent works in themselves, which together are assembled into a + collective whole. A work that constitutes a Collection will not be + considered an Adaptation (as defined below) for the purposes of this + License. + + 3. "Creative Commons Compatible License" means a license that is + listed at http://creativecommons.org/compatiblelicenses that has been + approved by Creative Commons as being essentially equivalent to this + License, including, at a minimum, because that license: (i) contains + terms that have the same purpose, meaning and effect as the License + Elements of this License; and, (ii) explicitly permits the + relicensing of adaptations of works made available under that license + under this License or a Creative Commons jurisdiction license with + the same License Elements as this License. + + 4. "Distribute" means to make available to the public the original + and copies of the Work or Adaptation, as appropriate, through sale or + other transfer of ownership. + + 5. "License Elements" means the following high-level license + attributes as selected by Licensor and indicated in the title of this + License: Attribution, ShareAlike. + + 6. "Licensor" means the individual, individuals, entity or entities + that offer(s) the Work under the terms of this License. + + 7. "Original Author" means, in the case of a literary or artistic + work, the individual, individuals, entity or entities who created the + Work or if no individual or entity can be identified, the publisher; + and in addition (i) in the case of a performance the actors, singers, + musicians, dancers, and other persons who act, sing, deliver, + declaim, play in, interpret or otherwise perform literary or artistic + works or expressions of folklore; (ii) in the case of a phonogram the + producer being the person or legal entity who first fixes the sounds + of a performance or other sounds; and, (iii) in the case of + broadcasts, the organization that transmits the broadcast. + + 8. "Work" means the literary and/or artistic work offered under the + terms of this License including without limitation any production in + the literary, scientific and artistic domain, whatever may be the + mode or form of its expression including digital form, such as a + book, pamphlet and other writing; a lecture, address, sermon or other + work of the same nature; a dramatic or dramatico-musical work; a + choreographic work or entertainment in dumb show; a musical + composition with or without words; a cinematographic work to which + are assimilated works expressed by a process analogous to + cinematography; a work of drawing, painting, architecture, sculpture, + engraving or lithography; a photographic work to which are + assimilated works expressed by a process analogous to photography; a + work of applied art; an illustration, map, plan, sketch or + three-dimensional work relative to geography, topography, + architecture or science; a performance; a broadcast; a phonogram; a + compilation of data to the extent it is protected as a copyrightable + work; or a work performed by a variety or circus performer to the + extent it is not otherwise considered a literary or artistic work. + + 9. "You" means an individual or entity exercising rights under this + License who has not previously violated the terms of this License + with respect to the Work, or who has received express permission from + the Licensor to exercise rights under this License despite a previous + violation. + + 10. "Publicly Perform" means to perform public recitations of the + Work and to communicate to the public those public recitations, by + any means or process, including by wire or wireless means or public + digital performances; to make available to the public Works in such a + way that members of the public may access these Works from a place + and at a place individually chosen by them; to perform the Work to + the public by any means or process and the communication to the + public of the performances of the Work, including by public digital + performance; to broadcast and rebroadcast the Work by any means + including signs, sounds or images. + + 11. "Reproduce" means to make copies of the Work by any means + including without limitation by sound or visual recordings and the + right of fixation and reproducing fixations of the Work, including + storage of a protected performance or phonogram in digital form or + other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, +limit, or restrict any uses free from copyright or rights arising from +limitations or exceptions that are provided for in connection with the +copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, +Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license to +exercise the rights in the Work as stated below: + + 1. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the + Collections; + + 2. to create and Reproduce Adaptations provided that any such + Adaptation, including any translation in any medium, takes reasonable + steps to clearly label, demarcate or otherwise identify that changes + were made to the original Work. For example, a translation could be + marked "The original work was translated from English to Spanish," or + a modification could indicate "The original work has been modified."; + + 3. to Distribute and Publicly Perform the Work including as + incorporated in Collections; and, + + 4. to Distribute and Publicly Perform Adaptations. + + 5. For the avoidance of doubt: + + 1. Non-waivable Compulsory License Schemes. In those + jurisdictions in which the right to collect royalties through + any statutory or compulsory licensing scheme cannot be waived, + the Licensor reserves the exclusive right to collect such + royalties for any exercise by You of the rights granted under + this License; + + 2. Waivable Compulsory License Schemes. In those jurisdictions + in which the right to collect royalties through any statutory + or compulsory licensing scheme can be waived, the Licensor + waives the exclusive right to collect such royalties for any + exercise by You of the rights granted under this License; and, + + 3. Voluntary License Schemes. The Licensor waives the right to + collect royalties, whether individually or, in the event that + the Licensor is a member of a collecting society that + administers voluntary licensing schemes, via that society, from + any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now +known or hereafter devised. The above rights include the right to make +such modifications as are technically necessary to exercise the rights +in other media and formats. Subject to Section 8(f), all rights not +expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly +made subject to and limited by the following restrictions: + + 1. You may Distribute or Publicly Perform the Work only under the + terms of this License. You must include a copy of, or the Uniform + Resource Identifier (URI) for, this License with every copy of the + Work You Distribute or Publicly Perform. You may not offer or impose + any terms on the Work that restrict the terms of this License or the + ability of the recipient of the Work to exercise the rights granted + to that recipient under the terms of the License. You may not + sublicense the Work. You must keep intact all notices that refer to + this License and to the disclaimer of warranties with every copy of + the Work You Distribute or Publicly Perform. When You Distribute or + Publicly Perform the Work, You may not impose any effective + technological measures on the Work that restrict the ability of a + recipient of the Work from You to exercise the rights granted to that + recipient under the terms of the License. This Section 4(a) applies + to the Work as incorporated in a Collection, but this does not + require the Collection apart from the Work itself to be made subject + to the terms of this License. If You create a Collection, upon notice + from any Licensor You must, to the extent practicable, remove from + the Collection any credit as required by Section 4(c), as requested. + If You create an Adaptation, upon notice from any Licensor You must, + to the extent practicable, remove from the Adaptation any credit as + required by Section 4(c), as requested. + + 2. You may Distribute or Publicly Perform an Adaptation only under + the terms of: (i) this License; (ii) a later version of this License + with the same License Elements as this License; (iii) a Creative + Commons jurisdiction license (either this or a later license version) + that contains the same License Elements as this License (e.g., + Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible + License. If you license the Adaptation under one of the licenses + mentioned in (iv), you must comply with the terms of that license. If + you license the Adaptation under the terms of any of the licenses + mentioned in (i), (ii) or (iii) (the "Applicable License"), you must + comply with the terms of the Applicable License generally and the + following provisions: (I) You must include a copy of, or the URI for, + the Applicable License with every copy of each Adaptation You + Distribute or Publicly Perform; (II) You may not offer or impose any + terms on the Adaptation that restrict the terms of the Applicable + License or the ability of the recipient of the Adaptation to exercise + the rights granted to that recipient under the terms of the + Applicable License; (III) You must keep intact all notices that refer + to the Applicable License and to the disclaimer of warranties with + every copy of the Work as included in the Adaptation You Distribute + or Publicly Perform; (IV) when You Distribute or Publicly Perform the + Adaptation, You may not impose any effective technological measures + on the Adaptation that restrict the ability of a recipient of the + Adaptation from You to exercise the rights granted to that recipient + under the terms of the Applicable License. This Section 4(b) applies + to the Adaptation as incorporated in a Collection, but this does not + require the Collection apart from the Adaptation itself to be made + subject to the terms of the Applicable License. + + 3. If You Distribute, or Publicly Perform the Work or any Adaptations + or Collections, You must, unless a request has been made pursuant to + Section 4(a), keep intact all copyright notices for the Work and + provide, reasonable to the medium or means You are utilizing: (i) the + name of the Original Author (or pseudonym, if applicable) if + supplied, and/or if the Original Author and/or Licensor designate + another party or parties (e.g., a sponsor institute, publishing + entity, journal) for attribution ("Attribution Parties") in + Licensor's copyright notice, terms of service or by other reasonable + means, the name of such party or parties; (ii) the title of the Work + if supplied; (iii) to the extent reasonably practicable, the URI, if + any, that Licensor specifies to be associated with the Work, unless + such URI does not refer to the copyright notice or licensing + information for the Work; and (iv) , consistent with Ssection 3(b), + in the case of an Adaptation, a credit identifying the use of the + Work in the Adaptation (e.g., "French translation of the Work by + Original Author," or "Screenplay based on original Work by Original + Author"). The credit required by this Section 4(c) may be implemented + in any reasonable manner; provided, however, that in the case of a + Adaptation or Collection, at a minimum such credit will appear, if a + credit for all contributing authors of the Adaptation or Collection + appears, then as part of these credits and in a manner at least as + prominent as the credits for the other contributing authors. For the + avoidance of doubt, You may only use the credit required by this + Section for the purpose of attribution in the manner set out above + and, by exercising Your rights under this License, You may not + implicitly or explicitly assert or imply any connection with, + sponsorship or endorsement by the Original Author, Licensor and/or + Attribution Parties, as appropriate, of You or Your use of the Work, + without the separate, express prior written permission of the + Original Author, Licensor and/or Attribution Parties. + + 4. Except as otherwise agreed in writing by the Licensor or as may be + otherwise permitted by applicable law, if You Reproduce, Distribute + or Publicly Perform the Work either by itself or as part of any + Adaptations or Collections, You must not distort, mutilate, modify or + take other derogatory action in relation to the Work which would be + prejudicial to the Original Author's honor or reputation. Licensor + agrees that in those jurisdictions (e.g. Japan), in which any + exercise of the right granted in Section 3(b) of this License (the + right to make Adaptations) would be deemed to be a distortion, + mutilation, modification or other derogatory action prejudicial to + the Original Author's honor and reputation, the Licensor will waive + or not assert, as appropriate, this Section, to the fullest extent + permitted by the applicable national law, to enable You to reasonably + exercise Your right under Section 3(b) of this License (right to make + Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR +OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY +KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, +INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF +LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, +WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE +LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR +ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES +ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate + automatically upon any breach by You of the terms of this License. + Individuals or entities who have received Adaptations or Collections + from You under this License, however, will not have their licenses + terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will + survive any termination of this License. + + 2. Subject to the above terms and conditions, the license granted + here is perpetual (for the duration of the applicable copyright in + the Work). Notwithstanding the above, Licensor reserves the right to + release the Work under different license terms or to stop + distributing the Work at any time; provided, however that any such + election will not serve to withdraw this License (or any other + license that has been, or is required to be, granted under the terms + of this License), and this License will continue in full force and + effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You Distribute or Publicly Perform the Work or a + Collection, the Licensor offers to the recipient a license to the + Work on the same terms and conditions as the license granted to You + under this License. + + 2. Each time You Distribute or Publicly Perform an Adaptation, + Licensor offers to the recipient a license to the original Work on + the same terms and conditions as the license granted to You under + this License. + + 3. If any provision of this License is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this License, and without further + action by the parties to this agreement, such provision shall be + reformed to the minimum extent necessary to make such provision valid + and enforceable. + + 4. No term or provision of this License shall be deemed waived and no + breach consented to unless such waiver or consent shall be in writing + and signed by the party to be charged with such waiver or consent. + + 5. This License constitutes the entire agreement between the parties + with respect to the Work licensed here. There are no understandings, + agreements or representations with respect to the Work not specified + here. Licensor shall not be bound by any additional provisions that + may appear in any communication from You. This License may not be + modified without the mutual written agreement of the Licensor and + You. + + 6. The rights granted under, and the subject matter referenced, in + this License were drafted utilizing the terminology of the Berne + Convention for the Protection of Literary and Artistic Works (as + amended on September 28, 1979), the Rome Convention of 1961, the WIPO + Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty + of 1996 and the Universal Copyright Convention (as revised on July + 24, 1971). These rights and subject matter take effect in the + relevant jurisdiction in which the License terms are sought to be + enforced according to the corresponding provisions of the + implementation of those treaty provisions in the applicable national + law. If the standard suite of rights granted under applicable + copyright law includes additional rights not granted under this + License, such additional rights are deemed to be included in the + License; this License is not intended to restrict the license of any + rights under applicable law. + + Creative Commons Notice + + Creative Commons is not a party to this License, and makes no + warranty whatsoever in connection with the Work. Creative Commons + will not be liable to You or any party on any legal theory for any + damages whatsoever, including without limitation any general, + special, incidental or consequential damages arising in connection + to this license. Notwithstanding the foregoing two (2) sentences, if + Creative Commons has expressly identified itself as the Licensor + hereunder, it shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the + Work is licensed under the CCPL, Creative Commons does not authorize + the use by either party of the trademark "Creative Commons" or any + related trademark or logo of Creative Commons without the prior + written consent of Creative Commons. Any permitted use will be in + compliance with Creative Commons' then-current trademark usage + guidelines, as may be published on its website or otherwise made + available upon request from time to time. For the avoidance of + doubt, this trademark restriction does not form part of the License. + + Creative Commons may be contacted at http://creativecommons.org/. + diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml new file mode 100644 index 0000000..cfab23f --- /dev/null +++ b/sddm-theme/Main.qml @@ -0,0 +1,335 @@ +/***********************************************************************/ + + +import QtQuick 2.0 + +import SddmComponents 2.0 + + +Rectangle { + color: "black" + + TextConstants { id: textConstants } + + Connections { + target: sddm + + onLoginSucceeded: { + password.borderColor = "green" + password.focusColor = "green" + password.hoverColor = "green" + } + + onLoginFailed: { + password.borderColor = "red" + password.focusColor = "red" + password.hoverColor = "red" + } + } + + Background { + anchors.fill: parent + source: config.background + fillMode: Image.PreserveAspectCrop + // x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height + onStatusChanged: { + if (status == Image.Error && source != config.defaultBackground) { + source = config.defaultBackground + } + } + } + + + // BG + // Image { + // source: "/home/rafayahmad/Pictures/bgs/1.png" + // anchors.fill: parent + // } + + + // Time Label + Rectangle { + width: 400 + height: 300 + anchors.centerIn: parent + color: "transparent" + anchors.verticalCenterOffset: -150 + + Text { + id: timeLabel + text: formattedTime + font.pixelSize: 100 + anchors.centerIn: parent + color: "#F4DA7D" + } + + + Timer { + interval: 1000 // Update every second + running: true + repeat: true + onTriggered: { + var date = new Date(); + var hours = date.getHours(); + var minutes = date.getMinutes(); + + hours = hours % 12 + hours = hours ? hours : 12 + + // Format the time as HH:MM:SS + timeLabel.text = + (hours < 10 ? "0" : "") + hours + "\n" + + (minutes < 10 ? "0" : "") + minutes + } + } + + Component.onCompleted: { + interval: 1000 // Update every second + running: true + repeat: true + onTriggered: { + var date = new Date(); + var hours = date.getHours(); + var minutes = date.getMinutes(); + + hours = hours % 12 + hours = hours ? hours : 12 + + // Format the time as HH:MM:SS + timeLabel.text = + (hours < 10 ? "0" : "") + hours + "\n" + + (minutes < 10 ? "0" : "") + minutes + } + } + + } + + Rectangle { + id: archlinux + anchors.centerIn: parent + height: 200 + width: 600 + // anchors.verticalCenterOffset: height * 2 / 3 + anchors.verticalCenterOffset: 100 + color: "transparent" + + Column { + id: mainColumn + anchors.centerIn: parent + width: parent.width + spacing: 20 + + TextBox { + id: name + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width * 0.6; height: archlinux.height / 4 + + color: "transparent" + font.pixelSize: 16 + font.family: "HackNerdFont" + borderColor: "#F4DA7D" + focusColor: "#F4DA7D" + hoverColor: "#F4DA7D" + textColor: "white" + radius: 50 + + text: userModel.lastUser + KeyNavigation.backtab: session; KeyNavigation.tab: password + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, session.index) + event.accepted = true + } + } + } + PasswordBox { + id: password + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width * 0.6; height: archlinux.height / 4 + + font.pixelSize: 16 + color: "transparent" + borderColor: "#F4DA7D" + focusColor: "#F4DA7D" + hoverColor: "#F4DA7D" + textColor: "white" + radius: 50 + + focus: true + Timer { + interval: 200 + running: true + onTriggered: password.forceActiveFocus() + } + + KeyNavigation.backtab: name; KeyNavigation.tab: rebootButton + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, session.index) + event.accepted = true + + } + } + } + + } + } + + // Session + Rectangle { + x: 50 + y: 975 + width: 225 + height: 75 + // spacing: 25 + color: "transparent" + border.color: "#F4DA7D" + border.width: 3 + radius: 50 + + Text { + id: lblSession + text: textConstants.session + verticalAlignment: Text.AlignVCenter + color: "white" + wrapMode: TextEdit.WordWrap + font.bold: true + font.pixelSize: 18 + font.family: "HackNerdFont" + anchors.centerIn: parent + anchors.horizontalCenterOffset: -60 + } + + ComboBox { + id: session + width: 100 + height: 25 + font.pixelSize: 14 + font.family: "HackNerdFont" + anchors.centerIn: parent + anchors.horizontalCenterOffset: 40 + + arrowIcon: "angle-down.png" + + model: sessionModel + index: sessionModel.lastIndex + + KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name + } + } + + // Buttons + Rectangle { + x: 1670 + y: 975 + width: 200 + height: 75 + color: "transparent" + border.color: "#F4DA7D" + border.width: 3 + radius: 50 + + FocusScope{ + id: focusReboot + width: 40 + height: 40 + anchors.centerIn: parent + anchors.horizontalCenterOffset: -40 + + ImageButton { + id: rebootButton + source: "reboot.png" + anchors.fill: parent + + onFocusChanged: { + if (rebootButton.focus) { + rebootButton.opacity = 1.0 + } + } + + onClicked: sddm.reboot() + KeyNavigation.backtab: password; KeyNavigation.tab: shutdownButton + } + + } + FocusScope{ + id: focusShutdown + width: 40 + height: 40 + anchors.centerIn: parent + anchors.horizontalCenterOffset: 40 + ImageButton { + id: shutdownButton + source: "shutdown.png" + anchors.fill: parent + // opacity: 1.0 + + onFocusChanged: { + if (shutdownButton.focus) { + shutdownButton.opacity = 1.0 + } + } + + onClicked: sddm.powerOff() + KeyNavigation.backtab: rebootButton; KeyNavigation.tab: session + } + } + // Button { + // id: shutdownButton + // + // width: 40 + // height: 40 + // text: "" + // color: "black" + // activeColor: "transparent" + // pressedColor: "transparent" + // borderColor: "transparent" + // anchors.centerIn: parent + // anchors.horizontalCenterOffset: 40 + // + // Image { + // source: "shutdown.png" + // fillMode: Image.PreserveAspectFit + // anchors.fill: parent + // } + // + // onClicked: sddm.powerOff() + // + // KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton + // } + + // Button { + // id: rebootButton + // text: "" + // width: 40 + // height: 40 + // color: "black" + // activeColor: "transparent" + // pressedColor: "transparent" + // borderColor: "transparent" + // anchors.centerIn: parent + // anchors.horizontalCenterOffset: -40 + // + // Image { + // source: "reboot.png" + // fillMode: Image.PreserveAspectFit + // anchors.fill: parent + // } + // + // onClicked: sddm.reboot() + // + // KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name + // } + } + + + + Component.onCompleted: { + if (name.text == "") + name.focus = true + else + password.focus = true + } +} diff --git a/sddm-theme/TRADEMARKS b/sddm-theme/TRADEMARKS new file mode 100644 index 0000000..54a7981 --- /dev/null +++ b/sddm-theme/TRADEMARKS @@ -0,0 +1,3 @@ +The ARCHLINUX name and logo are recognized trademarks. +See http://www.archlinux.org/ for acceptable use and restrictions. + diff --git a/sddm-theme/angle-down.png b/sddm-theme/angle-down.png new file mode 100644 index 0000000..4e9aeb0 Binary files /dev/null and b/sddm-theme/angle-down.png differ diff --git a/sddm-theme/archlinux.png b/sddm-theme/archlinux.png new file mode 100644 index 0000000..d2ddb2a Binary files /dev/null and b/sddm-theme/archlinux.png differ diff --git a/sddm-theme/background.png b/sddm-theme/background.png new file mode 100644 index 0000000..1047282 Binary files /dev/null and b/sddm-theme/background.png differ diff --git a/sddm-theme/metadata.desktop b/sddm-theme/metadata.desktop new file mode 100644 index 0000000..ebfe3ad --- /dev/null +++ b/sddm-theme/metadata.desktop @@ -0,0 +1,13 @@ +[SddmGreeterTheme] +Name=Arch Linux Simply Black +Description=A simple SDDM theme for Arch Linux. +Screenshot=screenshot.png +License=CC-BY-SA +Type=sddm-theme +Version=1.0 +Screenshot=screenshot.png +MainScript=Main.qml +ConfigFile=theme.conf +TranslationsDirectory=translations +Theme-Id=archlinux-simplyblack +Theme-API=2.0 diff --git a/sddm-theme/reboot.png b/sddm-theme/reboot.png new file mode 100644 index 0000000..91daed8 Binary files /dev/null and b/sddm-theme/reboot.png differ diff --git a/sddm-theme/screenshot.png b/sddm-theme/screenshot.png new file mode 100644 index 0000000..dcb5117 Binary files /dev/null and b/sddm-theme/screenshot.png differ diff --git a/sddm-theme/shutdown.png b/sddm-theme/shutdown.png new file mode 100644 index 0000000..9d364ea Binary files /dev/null and b/sddm-theme/shutdown.png differ diff --git a/sddm-theme/test.qml b/sddm-theme/test.qml new file mode 100644 index 0000000..f9b83cb --- /dev/null +++ b/sddm-theme/test.qml @@ -0,0 +1,279 @@ +/***********************************************************************/ + + +import QtQuick 2.0 + +import SddmComponents 2.0 + + +Rectangle { + width: 640 + height: 480 + color: "black" + + TextConstants { id: textConstants } + + Connections { + target: sddm + + onLoginSucceeded: { + errorMessage.color = "steelblue" + errorMessage.text = textConstants.loginSucceeded + } + + onLoginFailed: { + errorMessage.color = "red" + errorMessage.text = textConstants.loginFailed + } + } + + Repeater { + model: screenModel + Background { + x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height + source: config.background + fillMode: Image.Tile + onStatusChanged: { + if (status == Image.Error && source != config.defaultBackground) { + source = config.defaultBackground + } + } + } + } + + Rectangle { + property variant geometry: screenModel.geometry(screenModel.primary) + x: geometry.x; y: geometry.y; width: geometry.width; height: geometry.height + color: "transparent" + transformOrigin: Item.Top + + Rectangle { + width: 300 + height: 300 + radius: 200 + anchors.centerIn: parent + anchors.verticalCenterOffset: -300 + color: "black" + + // border.color: "#1793d1" + border.color: "white" + border.width: 5 + Image { + id: archlogo + width: 175 + height: 175 + anchors.centerIn: parent + anchors.verticalCenterOffset: -10 + fillMode: Image.PreserveAspectFit + transformOrigin: Item.Center + source: "archlinux.png" + } + } + + + Rectangle { + id: archlinux + anchors.centerIn: parent + height: 200 + width: 600 + // anchors.verticalCenterOffset: height * 2 / 3 + anchors.verticalCenterOffset: 100 + color: "#0C0C0C" + border.color: "#1793d1" + border.width: 5 + radius: 50 + + Column { + id: mainColumn + anchors.centerIn: parent + width: parent.width * 0.9 + spacing: 20 + + Row { + width: parent.width + spacing: Math.round(archlinux.height / 70) + Text { + id: lblName + width: parent.width * 0.20; height: archlinux.height / 4 + color: "white" + text: textConstants.userName + verticalAlignment: Text.AlignVCenter + font.bold: true + font.pixelSize: 18 + font.family: "HackNerdFont" + + } + + TextBox { + id: name + width: parent.width * 0.8; height: archlinux.height / 4 + text: userModel.lastUser + font.pixelSize: 16 + radius: 50 + font.family: "HackNerdFont" + + KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, session.index) + event.accepted = true + } + } + } + } + + Row { + width: parent.width + spacing : Math.round(archlinux.height / 70) + Text { + id: lblPassword + width: parent.width * 0.2; height: archlinux.height / 4 + color: "white" + text: textConstants.password + verticalAlignment: Text.AlignVCenter + font.bold: true + font.pixelSize: 18 + font.family: "HackNerdFont" + } + + PasswordBox { + id: password + width: parent.width * 0.8; height: archlinux.height / 4 + font.pixelSize: 16 + radius: 50 + tooltipBG: "lightgrey" + focus: true + Timer { + interval: 200 + running: true + onTriggered: password.forceActiveFocus() + } + + KeyNavigation.backtab: name; KeyNavigation.tab: session + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, session.index) + event.accepted = true + } + } + } + } + + + + + + + + } + } + } + + // Session + Rectangle { + x: 50 + y: 975 + width: 225 + height: 75 + // spacing: 25 + color: "black" + border.color: "#1793d1" + border.width: 3 + radius: 50 + + Text { + id: lblSession + text: textConstants.session + verticalAlignment: Text.AlignVCenter + color: "white" + wrapMode: TextEdit.WordWrap + font.bold: true + font.pixelSize: 18 + font.family: "HackNerdFont" + anchors.centerIn: parent + anchors.horizontalCenterOffset: -60 + } + + ComboBox { + id: session + width: 100 + height: 25 + font.pixelSize: 14 + font.family: "HackNerdFont" + anchors.centerIn: parent + anchors.horizontalCenterOffset: 40 + + arrowIcon: "angle-down.png" + + model: sessionModel + index: sessionModel.lastIndex + + KeyNavigation.backtab: password; KeyNavigation.tab: layoutBox + } + } + + // Buttons + Rectangle { + x: 1670 + y: 975 + width: 200 + height: 75 + color: "black" + border.color: "#1793d1" + border.width: 3 + radius: 50 + + + Button { + id: shutdownButton + + width: 40 + height: 40 + text: "" + color: "black" + anchors.centerIn: parent + anchors.horizontalCenterOffset: 40 + + Image { + source: "shutdown.png" + fillMode: Image.PreserveAspectFit + anchors.fill: parent + } + + onClicked: sddm.powerOff() + + KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton + } + + Button { + id: rebootButton + text: "" + width: 40 + height: 40 + color: "black" + anchors.centerIn: parent + anchors.horizontalCenterOffset: -40 + + Image { + source: "reboot.png" + fillMode: Image.PreserveAspectFit + anchors.fill: parent + } + + onClicked: sddm.reboot() + + KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name + } + } + + + + Component.onCompleted: { + if (name.text == "") + name.focus = true + else + password.focus = true + } +} diff --git a/sddm-theme/theme.conf b/sddm-theme/theme.conf new file mode 100644 index 0000000..60807b0 --- /dev/null +++ b/sddm-theme/theme.conf @@ -0,0 +1,2 @@ +[General] +background=background.png