Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
linux_utils.hpp
Go to the documentation of this file.
1
9#ifndef LINUX_UTILS_HPP
10#define LINUX_UTILS_HPP
11
12#pragma once
13#include <iostream>
14#include <string>
15#include <algorithm>
16#include <cstdlib>
17#include <unistd.h>
18#include <termios.h>
19#include <sys/ioctl.h>
20#include <fcntl.h>
21#include <vector>
22#include <sstream>
23#include <iomanip>
24
25using namespace std;
26
27namespace UtilsOSDependable{
36 int convert_16_bit_to_8_bit(const string& hex16);
37
46
55 tuple<int, int, int> parse_terminal_color_response(const string& response);
56
65
73 bool is_bg_color_dark();
74};
75
76#endif
string capture_terminal_response()
Captures terminal response to color query.
tuple< int, int, int > parse_terminal_color_response()
Parses terminal color response into RGB components on Windows.
bool is_bg_color_dark()
Determines if terminal background color is dark.
int convert_16_bit_to_8_bit(const string &hex16)
Converts a 16-bit hex color string to 8-bit RGB components.
float get_terminal_bg_color_luminance()
Gets the luminance of terminal background color.
Definition json.hpp:5678